$getTextNodeOffset
functionGet a normalized offset into a TextNode given a numeric offset or a direction for which end of the string to use. Throws in dev if the offset is not in the bounds of the text content size.
Import
import { $getTextNodeOffset } from '@modular/sdk/editor';Notes
- returns
- An absolute offset into the TextNode string