Skip to main content

$getChildCaretAtIndex

function

Get a caret pointing at the child at the given index, or the last caret in that node if out of bounds.

function $getChildCaretAtIndex<D extends CaretDirection>(parent: ElementNode, index: number, direction: D): NodeCaret<D>

Import

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

Notes

returns
A caret pointing towards the node at that index