mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 10:51:44 +02:00
Add path to Range Points (#2537)
* Add path to Range Points
Otherwise 5d0f53da3f/packages/slate-react/src/components/text.js (L122)
crashes
* Make prettier happy
* prettier knows what prettier knows
So shut up and delete the fucking whitespace ;)
This commit is contained in:
committed by
Ian Storm Taylor
parent
7cbf15e3cc
commit
4cb13ee5ca
@@ -48,11 +48,16 @@ function SlateReactPlaceholder(options = {}) {
|
||||
}
|
||||
|
||||
const others = next()
|
||||
const document = editor.value.document
|
||||
const first = node.getFirstText()
|
||||
const last = node.getLastText()
|
||||
const decoration = {
|
||||
anchor: { key: first.key, offset: 0 },
|
||||
focus: { key: last.key, offset: last.text.length },
|
||||
anchor: { key: first.key, offset: 0, path: document.getPath(first.key) },
|
||||
focus: {
|
||||
key: last.key,
|
||||
offset: last.text.length,
|
||||
path: document.getPath(last.key),
|
||||
},
|
||||
mark: placeholderMark,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user