Interface: SplitAtPointCaretNextOptions
lexical.SplitAtPointCaretNextOptions
Properties
$copyElementNode
• Optional
$copyElementNode: (node
: ElementNode
) => ElementNode
The function to create the right side of a split ElementNode (default $copyNode)
Type declaration
▸ (node
): ElementNode
Parameters
Name | Type |
---|---|
node | ElementNode |
Returns
Defined in
packages/lexical/src/caret/LexicalCaretUtils.ts:663
$shouldSplit
• Optional
$shouldSplit: (node
: ElementNode
, edge
: "first"
| "last"
) => boolean
If element.canBeEmpty() and would create an empty split, this function will be
called with the element and 'first' | 'last'. If it returns false, the empty
split will not be created. Default is () => true
to always split when possible.
Type declaration
▸ (node
, edge
): boolean
Parameters
Name | Type |
---|---|
node | ElementNode |
edge | "first" | "last" |
Returns
boolean
Defined in
packages/lexical/src/caret/LexicalCaretUtils.ts:675
$splitTextPointCaretNext
• Optional
$splitTextPointCaretNext: (caret
: TextPointCaret
<TextNode
, "next"
>) => NodeCaret
<"next"
>
The function to split a TextNode (default $splitTextPointCaret)
Type declaration
▸ (caret
): NodeCaret
<"next"
>
Parameters
Name | Type |
---|---|
caret | TextPointCaret <TextNode , "next" > |
Returns
NodeCaret
<"next"
>
Defined in
packages/lexical/src/caret/LexicalCaretUtils.ts:665
rootMode
• Optional
rootMode: RootMode
If the parent matches rootMode a split will not occur, default is 'shadowRoot'