Skip to main content

Class: RootNode

lexical.RootNode

Hierarchy

  • RootNodeBase

    RootNode

Constructors

constructor

new RootNode(): RootNode

Returns

RootNode

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

NameType
nodeToInsertLexicalNode

Returns

LexicalNode

Overrides

RootNodeBase.insertAfter

Defined in

packages/lexical/src/nodes/LexicalRootNode.ts:73


insertBefore

insertBefore(nodeToInsert): LexicalNode

Parameters

NameType
nodeToInsertLexicalNode

Returns

LexicalNode

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

NameType
NLexicalNode

Parameters

NameType
nodeN

Returns

never

Overrides

RootNodeBase.replace

Defined in

packages/lexical/src/nodes/LexicalRootNode.ts:65


clone

clone(): RootNode

Returns

RootNode

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

NameType
serializedNodeSerializedRootNode<SerializedLexicalNode>

Returns

RootNode

Overrides

RootNodeBase.importJSON

Defined in

packages/lexical/src/nodes/LexicalRootNode.ts:80