$getTextPointCaretSlice
functionConstruct a TextPointCaretSlice given a TextPointCaret and a signed distance. The distance should be negative to slice text before the caret's offset, and positive to slice text after the offset. The direction of the caret itself is not relevant to the string coordinates when working with a TextPointCaretSlice but mutation operations will preserve the direction.
Import
import { $getTextPointCaretSlice } from '@modular/sdk/editor';Notes
- returns
- TextPointCaretSlice