Skip to main content

Class: RootNode

lexical/src.RootNode

Hierarchy

Constructors

constructor

new RootNode()

Overrides

ElementNode.constructor

Defined in

lexical/src/nodes/LexicalRootNode.ts:35

Methods

append

append(...nodesToAppend): RootNode

Parameters

NameType
...nodesToAppendLexicalNode[]

Returns

RootNode

Overrides

ElementNode.append

Defined in

lexical/src/nodes/LexicalRootNode.ts:87


exportJSON

exportJSON(): SerializedElementNode

Returns

SerializedElementNode

Overrides

ElementNode.exportJSON

Defined in

lexical/src/nodes/LexicalRootNode.ts:109


getTextContent

getTextContent(includeInert?, includeDirectionless?): string

Parameters

NameType
includeInert?boolean
includeDirectionless?false

Returns

string

Overrides

ElementNode.getTextContent

Defined in

lexical/src/nodes/LexicalRootNode.ts:47


getTopLevelElementOrThrow

getTopLevelElementOrThrow(): never

Returns

never

Overrides

ElementNode.getTopLevelElementOrThrow

Defined in

lexical/src/nodes/LexicalRootNode.ts:40


insertAfter

insertAfter(nodeToInsert): LexicalNode

Parameters

NameType
nodeToInsertLexicalNode

Returns

LexicalNode

Overrides

ElementNode.insertAfter

Defined in

lexical/src/nodes/LexicalRootNode.ts:75


insertBefore

insertBefore(nodeToInsert): LexicalNode

Parameters

NameType
nodeToInsertLexicalNode

Returns

LexicalNode

Overrides

ElementNode.insertBefore

Defined in

lexical/src/nodes/LexicalRootNode.ts:71


remove

remove(): never

Returns

never

Overrides

ElementNode.remove

Defined in

lexical/src/nodes/LexicalRootNode.ts:63


replace

replace<N>(node): never

Type parameters

NameType
NLexicalNode

Parameters

NameType
nodeN

Returns

never

Overrides

ElementNode.replace

Defined in

lexical/src/nodes/LexicalRootNode.ts:67


updateDOM

updateDOM(prevNode, dom): false

Parameters

NameType
prevNodeRootNode
domHTMLElement

Returns

false

Overrides

ElementNode.updateDOM

Defined in

lexical/src/nodes/LexicalRootNode.ts:81


clone

Static clone(): RootNode

Returns

RootNode

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

NameType
serializedNodeSerializedElementNode

Returns

RootNode

Overrides

ElementNode.importJSON

Defined in

lexical/src/nodes/LexicalRootNode.ts:100