Class: ElementNode
lexical.ElementNode
Hierarchy
↳
ElementNode
↳↳
LinkNode
↳↳
OverflowNode
↳↳
RootNode
↳↳
CodeNode
↳↳
ListItemNode
↳↳
ListNode
↳↳
MarkNode
Constructors
constructor
• new ElementNode(key?
)
Parameters
Name | Type |
---|---|
key? | string |
Overrides
Defined in
lexical/src/nodes/LexicalElementNode.ts:63
Methods
append
▸ append(...nodesToAppend
): ElementNode
Parameters
Name | Type |
---|---|
...nodesToAppend | LexicalNode [] |
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:338
canBeEmpty
▸ canBeEmpty(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:519
canExtractContents
▸ canExtractContents(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:510
canIndent
▸ canIndent(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:496
canInsertAfter
▸ canInsertAfter(node
): boolean
Parameters
Name | Type |
---|---|
node | LexicalNode |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:516
canInsertTab
▸ canInsertTab(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:493
canInsertTextAfter
▸ canInsertTextAfter(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:525
canInsertTextBefore
▸ canInsertTextBefore(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:522
canMergeWith
▸ canMergeWith(node
): boolean
Parameters
Name | Type |
---|---|
node | ElementNode |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:538
canReplaceWith
▸ canReplaceWith(replacement
): boolean
Parameters
Name | Type |
---|---|
replacement | LexicalNode |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:513
clear
▸ clear(): ElementNode
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:332
collapseAtStart
▸ collapseAtStart(selection
): boolean
Parameters
Name | Type |
---|---|
selection | RangeSelection |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:504
excludeFromCopy
▸ excludeFromCopy(destination?
): boolean
Parameters
Name | Type |
---|---|
destination? | "clone" | "html" |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:507
extractWithChild
▸ extractWithChild(child
, selection
, destination
): boolean
Parameters
Name | Type |
---|---|
child | LexicalNode |
selection | null | RangeSelection | NodeSelection | GridSelection |
destination | "clone" | "html" |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:541
getAllTextNodes
▸ getAllTextNodes(): TextNode
[]
Returns
TextNode
[]
Defined in
lexical/src/nodes/LexicalElementNode.ts:120
getChildAtIndex
▸ getChildAtIndex<T
>(index
): null
| T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Parameters
Name | Type |
---|---|
index | number |
Returns
null
| T
Defined in
lexical/src/nodes/LexicalElementNode.ts:207
getChildren
▸ getChildren<T
>(): T
[]
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
T
[]
Defined in
lexical/src/nodes/LexicalElementNode.ts:85
getChildrenKeys
▸ getChildrenKeys(): string
[]
Returns
string
[]
Defined in
lexical/src/nodes/LexicalElementNode.ts:94
getChildrenSize
▸ getChildrenSize(): number
Returns
number
Defined in
lexical/src/nodes/LexicalElementNode.ts:103
getDescendantByIndex
▸ getDescendantByIndex<T
>(index
): null
| T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Parameters
Name | Type |
---|---|
index | number |
Returns
null
| T
Defined in
lexical/src/nodes/LexicalElementNode.ts:163
getDirection
▸ getDirection(): null
| "ltr"
| "rtl"
Returns
null
| "ltr"
| "rtl"
Defined in
lexical/src/nodes/LexicalElementNode.ts:251
getFirstChild
▸ getFirstChild<T
>(): null
| T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
null
| T
Defined in
lexical/src/nodes/LexicalElementNode.ts:183
getFirstChildOrThrow
▸ getFirstChildOrThrow<T
>(): T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
T
Defined in
lexical/src/nodes/LexicalElementNode.ts:188
getFirstDescendant
▸ getFirstDescendant<T
>(): null
| T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
null
| T
Defined in
lexical/src/nodes/LexicalElementNode.ts:135
getFormat
▸ getFormat(): number
Returns
number
Defined in
lexical/src/nodes/LexicalElementNode.ts:73
getFormatType
▸ getFormatType(): ElementFormatType
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:77
getIndent
▸ getIndent(): number
Returns
number
Defined in
lexical/src/nodes/LexicalElementNode.ts:81
getLastChild
▸ getLastChild<T
>(): null
| T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
null
| T
Defined in
lexical/src/nodes/LexicalElementNode.ts:195
getLastChildOrThrow
▸ getLastChildOrThrow<T
>(): T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
T
Defined in
lexical/src/nodes/LexicalElementNode.ts:200
getLastDescendant
▸ getLastDescendant<T
>(): null
| T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Returns
null
| T
Defined in
lexical/src/nodes/LexicalElementNode.ts:149
getTextContent
▸ getTextContent(): string
Returns
string
Overrides
Defined in
lexical/src/nodes/LexicalElementNode.ts:234
hasFormat
▸ hasFormat(type
): boolean
Parameters
Name | Type |
---|---|
type | ElementFormatType |
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:255
insertNewAfter
▸ insertNewAfter(selection
, restoreSelection?
): null
| LexicalNode
Parameters
Name | Type |
---|---|
selection | RangeSelection |
restoreSelection? | boolean |
Returns
null
| LexicalNode
Defined in
lexical/src/nodes/LexicalElementNode.ts:487
isDirty
▸ isDirty(): boolean
Returns
boolean
Overrides
Defined in
lexical/src/nodes/LexicalElementNode.ts:110
isEmpty
▸ isEmpty(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:107
isInline
▸ isInline(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:528
isLastChild
▸ isLastChild(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:115
isShadowRoot
▸ isShadowRoot(): boolean
Returns
boolean
Defined in
lexical/src/nodes/LexicalElementNode.ts:535
select
▸ select(_anchorOffset?
, _focusOffset?
): RangeSelection
Parameters
Name | Type |
---|---|
_anchorOffset? | number |
_focusOffset? | number |
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:265
selectEnd
▸ selectEnd(): RangeSelection
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:321
selectStart
▸ selectStart(): RangeSelection
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:310
setDirection
▸ setDirection(direction
): ElementNode
Parameters
Name | Type |
---|---|
direction | null | "ltr" | "rtl" |
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:341
setFormat
▸ setFormat(type
): ElementNode
Parameters
Name | Type |
---|---|
type | ElementFormatType |
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:346
setIndent
▸ setIndent(indentLevel
): ElementNode
Parameters
Name | Type |
---|---|
indentLevel | number |
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:351
splice
▸ splice(start
, deleteCount
, nodesToInsert
): ElementNode
Parameters
Name | Type |
---|---|
start | number |
deleteCount | number |
nodesToInsert | LexicalNode [] |
Returns
Defined in
lexical/src/nodes/LexicalElementNode.ts:356