Class: RootNode
lexical.RootNode
Hierarchy
-
RootNodeBase
↳
RootNode
Constructors
constructor
• new RootNode(): RootNode
Returns
Overrides
RootNodeBase.constructor
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:36
Methods
exportJSON
▸ exportJSON(): SerializedRootNode
<SerializedLexicalNode
>
Returns
SerializedRootNode
<SerializedLexicalNode
>
Overrides
RootNodeBase.exportJSON
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:89
getTextContent
▸ getTextContent(): string
Returns
string
Overrides
RootNodeBase.getTextContent
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:48
getTopLevelElementOrThrow
▸ getTopLevelElementOrThrow(): never
Returns
never
Overrides
RootNodeBase.getTopLevelElementOrThrow
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:41
insertAfter
▸ insertAfter(nodeToInsert
): LexicalNode
Parameters
Name | Type |
---|---|
nodeToInsert | LexicalNode |
Returns
Overrides
RootNodeBase.insertAfter
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:73
insertBefore
▸ insertBefore(nodeToInsert
): LexicalNode
Parameters
Name | Type |
---|---|
nodeToInsert | LexicalNode |
Returns
Overrides
RootNodeBase.insertBefore
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:69
remove
▸ remove(): never
Returns
never
Overrides
RootNodeBase.remove
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:61
replace
▸ replace<N
>(node
): never
Type parameters
Name | Type |
---|---|
N | LexicalNode |
Parameters
Name | Type |
---|---|
node | N |
Returns
never
Overrides
RootNodeBase.replace
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:65
clone
▸ clone(): RootNode
Returns
Overrides
RootNodeBase.clone
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:32
getType
▸ getType(): string
Returns
string
Overrides
RootNodeBase.getType
Defined in
packages/lexical/src/nodes/LexicalRootNode.ts:28
importJSON
▸ importJSON(serializedNode
): RootNode
Parameters
Name | Type |
---|---|
serializedNode | SerializedRootNode <SerializedLexicalNode > |
Returns
Overrides
RootNodeBase.importJSON