$getSiblingCaret
functionGet a caret that points at the next or previous sibling of the given origin node.
function $getSiblingCaret<T extends LexicalNode, D extends CaretDirection>(origin: T, direction: D): SiblingCaret<T, D>
function $getSiblingCaret<T extends LexicalNode, D extends CaretDirection>(origin: null | T, direction: D): null | SiblingCaret<T, D>
Import
import { $getSiblingCaret } from '@modular/sdk/editor';Notes
- returns
- null if origin is null, otherwise a SiblingCaret for this origin and direction