Skip to main content

SplitAtPointCaretNextOptions

interface
interface SplitAtPointCaretNextOptions

Import

import { SplitAtPointCaretNextOptions } from '@modular/sdk/editor';

Members5

$copyElementNodeoptional
(node: ElementNode) => ElementNode

The function to create the right side of a split ElementNode (default $copyNode)

$shouldSplitoptional
(node: ElementNode, edge: 'first' | 'last') => boolean

If `element.canBeEmpty()` and it 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.

$splitTextPointCaretNextoptional
(caret: TextPointCaret<TextNode, 'next'>) => NodeCaret<'next'>

The function to split a TextNode (default $splitTextPointCaret)

removeEmptyDestinationoptional
boolean

If the destination would create an empty split on both sides, then remove it instead of splitting. Default `false`.

rootModeoptional
RootMode

If the parent matches rootMode a split will not occur, default is 'shadowRoot'