Skip to main content

$getAdjacentChildCaret

function

Gets the adjacent caret, if not-null and if the origin of the adjacent caret is an ElementNode, then return the ChildCaret. This can be used along with the getParentAdjacentCaret method to perform a full DFS style traversal of the tree.

function $getAdjacentChildCaret<D extends CaretDirection>(caret: null | NodeCaret<D>): null | NodeCaret<D>

Import

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