Skip to main content

Class: EXPERIMENTAL_DecoratorElementNode<T>

lexical.EXPERIMENTAL_DecoratorElementNode

Type parameters

Name
T

Hierarchy

Constructors

constructor

new EXPERIMENTAL_DecoratorElementNode<T>(key?): EXPERIMENTAL_DecoratorElementNode<T>

Type parameters

Name
T

Parameters

NameType
key?string

Returns

EXPERIMENTAL_DecoratorElementNode<T>

Inherited from

ElementNode.constructor

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:76

Properties

constructor

constructor: KlassConstructor<typeof EXPERIMENTAL_DecoratorElementNode>

Overrides

ElementNode.constructor

Defined in

packages/lexical/src/nodes/LexicalDecoratorElementNode.ts:16

Methods

append

append(...nodesToAppend): this

Parameters

NameType
...nodesToAppendLexicalNode[]

Returns

this

Inherited from

ElementNode.append

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:348


canBeEmpty

canBeEmpty(): boolean

Returns

boolean

Inherited from

ElementNode.canBeEmpty

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:534


canIndent

canIndent(): boolean

Returns

boolean

Inherited from

ElementNode.canIndent

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:514


canInsertAfter

canInsertAfter(node): boolean

Parameters

NameType
nodeLexicalNode

Returns

boolean

Inherited from

ElementNode.canInsertAfter

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:531


canInsertTextAfter

canInsertTextAfter(): boolean

Returns

boolean

Inherited from

ElementNode.canInsertTextAfter

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:540


canInsertTextBefore

canInsertTextBefore(): boolean

Returns

boolean

Inherited from

ElementNode.canInsertTextBefore

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:537


canMergeWith

canMergeWith(node): boolean

Parameters

NameType
nodeElementNode

Returns

boolean

Inherited from

ElementNode.canMergeWith

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:553


canReplaceWith

canReplaceWith(replacement): boolean

Parameters

NameType
replacementLexicalNode

Returns

boolean

Inherited from

ElementNode.canReplaceWith

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:528


clear

clear(): this

Returns

this

Inherited from

ElementNode.clear

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:342


collapseAtStart

collapseAtStart(selection): boolean

Parameters

NameType
selectionRangeSelection

Returns

boolean

Inherited from

ElementNode.collapseAtStart

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:522


decorate

decorate(editor, config): T

The returned value is added to the LexicalEditor._decorators

Parameters

NameType
editorLexicalEditor
configEditorConfig

Returns

T

Defined in

packages/lexical/src/nodes/LexicalDecoratorElementNode.ts:23


excludeFromCopy

excludeFromCopy(destination?): boolean

Parameters

NameType
destination?"clone" | "html"

Returns

boolean

Inherited from

ElementNode.excludeFromCopy

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:525


exportJSON

exportJSON(): SerializedElementNode<SerializedLexicalNode>

Controls how the this node is serialized to JSON. This is important for copy and paste between Lexical editors sharing the same namespace. It's also important if you're serializing to JSON for persistent storage somewhere. See Serialization & Deserialization.

Returns

SerializedElementNode<SerializedLexicalNode>

Inherited from

ElementNode.exportJSON

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:497


extractWithChild

extractWithChild(child, selection, destination): boolean

Parameters

NameType
childLexicalNode
selectionnull | BaseSelection
destination"clone" | "html"

Returns

boolean

Inherited from

ElementNode.extractWithChild

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:556


getAllTextNodes

getAllTextNodes(): TextNode[]

Returns

TextNode[]

Inherited from

ElementNode.getAllTextNodes

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:133


getChildAtIndex

getChildAtIndex<T>(index): null | T

Type parameters

NameType
Textends LexicalNode

Parameters

NameType
indexnumber

Returns

null | T

Inherited from

ElementNode.getChildAtIndex

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:214


getChildren

getChildren<T>(): T[]

Type parameters

NameType
Textends LexicalNode

Returns

T[]

Inherited from

ElementNode.getChildren

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:98


getChildrenKeys

getChildrenKeys(): string[]

Returns

string[]

Inherited from

ElementNode.getChildrenKeys

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:107


getChildrenSize

getChildrenSize(): number

Returns

number

Inherited from

ElementNode.getChildrenSize

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:116


getDescendantByIndex

getDescendantByIndex<T>(index): null | T

Type parameters

NameType
Textends LexicalNode

Parameters

NameType
indexnumber

Returns

null | T

Inherited from

ElementNode.getDescendantByIndex

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:170


getDirection

getDirection(): null | "ltr" | "rtl"

Returns

null | "ltr" | "rtl"

Inherited from

ElementNode.getDirection

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:275


getFirstChild

getFirstChild<T>(): null | T

Type parameters

NameType
Textends LexicalNode

Returns

null | T

Inherited from

ElementNode.getFirstChild

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:190


getFirstChildOrThrow

getFirstChildOrThrow<T>(): T

Type parameters

NameType
Textends LexicalNode

Returns

T

Inherited from

ElementNode.getFirstChildOrThrow

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:195


getFirstDescendant

getFirstDescendant<T>(): null | T

Type parameters

NameType
Textends LexicalNode

Returns

null | T

Inherited from

ElementNode.getFirstDescendant

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:148


getFormat

getFormat(): number

Returns

number

Inherited from

ElementNode.getFormat

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:86


getFormatType

getFormatType(): ElementFormatType

Returns

ElementFormatType

Inherited from

ElementNode.getFormatType

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:90


getIndent

getIndent(): number

Returns

number

Inherited from

ElementNode.getIndent

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:94


getLastChild

getLastChild<T>(): null | T

Type parameters

NameType
Textends LexicalNode

Returns

null | T

Inherited from

ElementNode.getLastChild

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:202


getLastChildOrThrow

getLastChildOrThrow<T>(): T

Type parameters

NameType
Textends LexicalNode

Returns

T

Inherited from

ElementNode.getLastChildOrThrow

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:207


getLastDescendant

getLastDescendant<T>(): null | T

Type parameters

NameType
Textends LexicalNode

Returns

null | T

Inherited from

ElementNode.getLastDescendant

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:159


getTextContent

getTextContent(): string

Returns the text content of the node. Override this for custom nodes that should have a representation in plain text format (for copy + paste, for example)

Returns

string

Inherited from

ElementNode.getTextContent

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:241


getTextContentSize

getTextContentSize(): number

Returns the length of the string produced by calling getTextContent on this node.

Returns

number

Inherited from

ElementNode.getTextContentSize

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:258


hasFormat

hasFormat(type): boolean

Parameters

NameType
typeElementFormatType

Returns

boolean

Inherited from

ElementNode.hasFormat

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:279


insertNewAfter

insertNewAfter(selection, restoreSelection?): null | LexicalNode

Parameters

NameType
selectionRangeSelection
restoreSelection?boolean

Returns

null | LexicalNode

Inherited from

ElementNode.insertNewAfter

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:508


isDirty

isDirty(): boolean

Returns true if this node has been marked dirty during this update cycle.

Returns

boolean

Inherited from

ElementNode.isDirty

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:123


isEmpty

isEmpty(): boolean

Returns

boolean

Inherited from

ElementNode.isEmpty

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:120


isInline

isInline(): boolean

Returns

boolean

Inherited from

ElementNode.isInline

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:543


isLastChild

isLastChild(): boolean

Returns

boolean

Inherited from

ElementNode.isLastChild

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:128


isShadowRoot

isShadowRoot(): boolean

Returns

boolean

Inherited from

ElementNode.isShadowRoot

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:550


select

select(_anchorOffset?, _focusOffset?): RangeSelection

Parameters

NameType
_anchorOffset?number
_focusOffset?number

Returns

RangeSelection

Inherited from

ElementNode.select

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:289


selectEnd

selectEnd(): RangeSelection

Returns

RangeSelection

Inherited from

ElementNode.selectEnd

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:338


selectStart

selectStart(): RangeSelection

Returns

RangeSelection

Inherited from

ElementNode.selectStart

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:334


setDirection

setDirection(direction): this

Parameters

NameType
directionnull | "ltr" | "rtl"

Returns

this

Inherited from

ElementNode.setDirection

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:351


setFormat

setFormat(type): this

Parameters

NameType
typeElementFormatType

Returns

this

Inherited from

ElementNode.setFormat

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:356


setIndent

setIndent(indentLevel): this

Parameters

NameType
indentLevelnumber

Returns

this

Inherited from

ElementNode.setIndent

Defined in

packages/lexical/src/nodes/LexicalElementNode.ts:361


splice

splice(start, deleteCount, nodesToInsert): this

Parameters

NameType
startnumber
deleteCountnumber
nodesToInsertLexicalNode[]

Returns

this

Overrides

ElementNode.splice

Defined in

packages/lexical/src/nodes/LexicalDecoratorElementNode.ts:27