Skip to main content

$getChildCaret

function

Get a caret that points at the first or last child of the given origin node, which must be an ElementNode.

function $getChildCaret<T extends ElementNode, D extends CaretDirection>(origin: T, direction: D): ChildCaret<T, D>

Import

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

Notes

returns
null if origin is null or not an ElementNode, otherwise a ChildCaret for this origin and direction