Skip to main content
Modular Documentation
Guides
Reference
Reference
/
@modular/sdk/editor
$getChildCaretOrSelf
function
Gets the ChildCaret if one is possible at this caret origin, otherwise return the caret
function $getChildCaretOrSelf<Caret extends PointCaret | null>(caret: Caret): Caret | ChildCaret<ElementNode, NonNullable<Caret>['direction']>
Import
import { $getChildCaretOrSelf } from '@modular/sdk/editor';