$getCaretRangeInDirection
functionReturn the range if it's in the given direction, otherwise construct a new range using a flipped focus as the anchor and a flipped anchor as the focus. This transformation preserves the section of the document that it's working with, but reverses the order of iteration.
Import
import { $getCaretRangeInDirection } from '@modular/sdk/editor';Notes
- returns
- A CaretRange in direction