Skip to main content

$splitAtPointCaretNext

function

Split a node at a PointCaret and return a NodeCaret at that point, or null if the node can't be split. This is non-recursive and will only perform at most one split.

function $splitAtPointCaretNext(pointCaret: PointCaret<'next'>, { $copyElementNode, $splitTextPointCaretNext, rootMode, $shouldSplit, removeEmptyDestination, }?: SplitAtPointCaretNextOptions): null | NodeCaret<'next'>

Import

import { $splitAtPointCaretNext } from '@modular/sdk/editor';

Notes

returns
The NodeCaret pointing to the location of the split (or null if a split is not possible)