Class: ListItemNode
@lexical/list.ListItemNode
Hierarchy
-
↳
ListItemNode
Constructors
constructor
• new ListItemNode(value?
, checked?
, key?
): ListItemNode
Parameters
Name | Type |
---|---|
value? | number |
checked? | boolean |
key? | string |
Returns
Overrides
Defined in
packages/lexical-list/src/LexicalListItemNode.ts:68
Methods
append
▸ append(...nodes
): this
Parameters
Name | Type |
---|---|
...nodes | LexicalNode [] |
Returns
this
Overrides
Defined in
packages/lexical-list/src/LexicalListItemNode.ts:152
canMergeWhenEmpty
▸ canMergeWhenEmpty(): true
Determines whether this node, when empty, can merge with a first block of nodes being inserted.
This method is specifically called in RangeSelection.insertNodes to determine merging behavior during nodes insertion.
Returns
true
Example
// In a ListItemNode or QuoteNode implementation:
canMergeWhenEmpty(): true {
return true;
}