Class: RootNode
lexical.RootNode
Hierarchy
↳
RootNode
Constructors
constructor
• new RootNode()
Overrides
Defined in
lexical/src/nodes/LexicalRootNode.ts:35
Methods
append
▸ append(...nodesToAppend
): RootNode
Parameters
Name | Type |
---|---|
...nodesToAppend | LexicalNode [] |
Returns
Overrides
Defined in
lexical/src/nodes/LexicalRootNode.ts:91
exportJSON
▸ exportJSON(): SerializedElementNode
Returns
Overrides
Defined in
lexical/src/nodes/LexicalRootNode.ts:113
getTextContent
▸ getTextContent(includeInert?
, includeDirectionless?
): string
Parameters
Name | Type |
---|---|
includeInert? | boolean |
includeDirectionless? | false |
Returns
string
Overrides
Defined in
lexical/src/nodes/LexicalRootNode.ts:51
getTopLevelElementOrThrow
▸ getTopLevelElementOrThrow(): never
Returns
never
Overrides
ElementNode.getTopLevelElementOrThrow
Defined in
lexical/src/nodes/LexicalRootNode.ts:44
insertAfter
▸ insertAfter(nodeToInsert
): LexicalNode
Parameters
Name | Type |
---|---|
nodeToInsert | LexicalNode |
Returns
Overrides
ElementNode.insertAfter
Defined in
lexical/src/nodes/LexicalRootNode.ts:79
insertBefore
▸ insertBefore(nodeToInsert
): LexicalNode
Parameters
Name | Type |
---|---|
nodeToInsert | LexicalNode |
Returns
Overrides
ElementNode.insertBefore
Defined in
lexical/src/nodes/LexicalRootNode.ts:75
isTopLevel
▸ isTopLevel(): boolean
Returns
boolean
Overrides
Defined in
lexical/src/nodes/LexicalRootNode.ts:40
remove
▸ remove(): never
Returns
never
Overrides
ElementNode.remove
Defined in
lexical/src/nodes/LexicalRootNode.ts:67
replace
▸ replace<N
>(node
): never
Type parameters
Name | Type |
---|---|
N | LexicalNode |
Parameters
Name | Type |
---|---|
node | N |
Returns
never
Overrides
ElementNode.replace
Defined in
lexical/src/nodes/LexicalRootNode.ts:71
updateDOM
▸ updateDOM(prevNode
, dom
): false
Parameters
Name | Type |
---|---|
prevNode | RootNode |
dom | HTMLElement |
Returns
false
Overrides
ElementNode.updateDOM
Defined in
lexical/src/nodes/LexicalRootNode.ts:85
clone
▸ Static
clone(): RootNode
Returns
Overrides
ElementNode.clone
Defined in
lexical/src/nodes/LexicalRootNode.ts:31
getType
▸ Static
getType(): string
Returns
string
Overrides
ElementNode.getType
Defined in
lexical/src/nodes/LexicalRootNode.ts:27
importJSON
▸ Static
importJSON(serializedNode
): RootNode
Parameters
Name | Type |
---|---|
serializedNode | SerializedElementNode |
Returns
Overrides
ElementNode.importJSON
Defined in
lexical/src/nodes/LexicalRootNode.ts:104