You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a Quill-style Delta for a subsection of the text, using UTF-16 indices. Useful for copying a styled span. Use `sliceDeltaUtf8` if you need UTF-8 byte offsets instead.
2206
+
2207
+
**Parameters:**
2208
+
-`start` - Start UTF-16 code unit index (inclusive)
Get a Quill-style Delta slice for the given UTF-8 byte range.
235
+
227
236
### `toString(): string`
228
237
229
238
Get the plain text value.
@@ -352,6 +361,33 @@ console.log(text.toDelta());
352
361
// ]
353
362
```
354
363
364
+
### Slice a Delta snippet
365
+
366
+
Use `sliceDelta(start, end)` when you only need a portion of the Delta (for example, to copy a styled snippet). It uses UTF-16 indices just like other text APIs; use `sliceDeltaUtf8` if you need to slice by UTF-8 byte offsets instead.
0 commit comments