$getAdjacentSiblingOrParentSiblingCaret
functionReturns the Node sibling when this exists, otherwise the closest parent sibling. For example R -> P -> T1, T2 -> P2 returns T2 for node T1, P2 for node T2, and null for node P2.
Import
import { $getAdjacentSiblingOrParentSiblingCaret } from '@modular/sdk/editor';Notes
- returns
- An array (tuple) containing the found caret and the depth difference, or null, if this node doesn't exist.