Skip to main content

Class: OverflowNode

@lexical/overflow.OverflowNode

Hierarchy

Methods

createDOM

createDOM(config): HTMLElement

Called during the reconciliation process to determine which nodes to insert into the DOM for this Lexical Node.

This method must return exactly one HTMLElement. Nested elements are not supported.

Do not attempt to update the Lexical EditorState during this phase of the update lifecyle.

Parameters

NameTypeDescription
configEditorConfigallows access to things like the EditorTheme (to apply classes) during reconciliation.

Returns

HTMLElement

Overrides

ElementNode.createDOM

Defined in

packages/lexical-overflow/src/index.ts:37


excludeFromCopy

excludeFromCopy(): boolean

Returns

boolean

Overrides

ElementNode.excludeFromCopy

Defined in

packages/lexical-overflow/src/index.ts:58


insertNewAfter

insertNewAfter(selection, restoreSelection?): null | LexicalNode

Parameters

NameTypeDefault value
selectionRangeSelectionundefined
restoreSelectionbooleantrue

Returns

null | LexicalNode

Overrides

ElementNode.insertNewAfter

Defined in

packages/lexical-overflow/src/index.ts:50


updateDOM

updateDOM(prevNode, dom): boolean

Called when a node changes and should update the DOM in whatever way is necessary to make it align with any changes that might have happened during the update.

Returning "true" here will cause lexical to unmount and recreate the DOM node (by calling createDOM). You would need to do this if the element tag changes, for instance.

Parameters

NameType
prevNodethis
domHTMLElement

Returns

boolean

Overrides

ElementNode.updateDOM

Defined in

packages/lexical-overflow/src/index.ts:46