Module: core/updateSelections/getUpdatedText
Functions
getUpdatedText
▸ getUpdatedText(changeEventInfo
, rangeInfo
, newOffsets
): string
Updates the text of the given rangeInfo to take into account the given change.
The process is to first include any text from the original range that is before the range of the change, then add the text of the change, then add any text that trails the original change range. Then we take a substring corresponding to the range's new offsets.
Parameters
Name | Type | Description |
---|---|---|
changeEventInfo | ChangeEventInfo | The change to incorporate |
rangeInfo | FullRangeInfo | The rangeInfo to update |
newOffsets | RangeOffsets | The new offsets that the rangeInfo will have |
Returns
string
The new text of the range
Defined in
core/updateSelections/getUpdatedText.ts:20