mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 23:12:52 +02:00
Add renderText
and leafPosition
(#5850)
* feat * revert * revert * docs * test * refactor * test * revert * refactor * doc * docs * refactor * docs * test * docs * docs * docs * refactor
This commit is contained in:
6
.changeset/slate-react.md
Normal file
6
.changeset/slate-react.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'slate-react': minor
|
||||
---
|
||||
|
||||
- Update `RenderLeafProps` interface to add `leafPosition` property containing `start`, `end`, `isFirst`, and `isLast` when a text node is split by decorations.
|
||||
- Add optional `renderText` prop to `<Editable />` component for customizing text node rendering.
|
5
.changeset/slate.md
Normal file
5
.changeset/slate.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate': minor
|
||||
---
|
||||
|
||||
- Update `Text.decorations` to return the positions in addition to the leaf nodes: `{ leaf: Text, position?: { start: number, end: number, isFirst: boolean, isLast: boolean } }[]`.
|
Reference in New Issue
Block a user