Skip to main content

$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';