$normalizeCaret
functionNormalize a caret to the deepest equivalent PointCaret. This will return a TextPointCaret with the offset set according to the direction if given a caret with a TextNode origin or a caret with an ElementNode origin with the deepest ChildCaret having an adjacent TextNode. If given a TextPointCaret, it will be returned, as no normalization is required when an offset is already present.
Import
import { $normalizeCaret } from '@modular/sdk/editor';Notes
- returns
- The normalized PointCaret