mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
Also call onCursor when document loaded.
This commit is contained in:
parent
9ff2ecf29a
commit
3d0cf7597a
@ -99,7 +99,9 @@ export const AutomergeEditor = {
|
|||||||
e.docSet.setDoc(docId, mergedDoc)
|
e.docSet.setDoc(docId, mergedDoc)
|
||||||
|
|
||||||
Editor.withoutNormalizing(e, () => {
|
Editor.withoutNormalizing(e, () => {
|
||||||
e.children = toJS(mergedDoc).children
|
const doc = toJS(mergedDoc)
|
||||||
|
e.children = doc.children
|
||||||
|
e.onCursor && e.onCursor(doc.cursors)
|
||||||
})
|
})
|
||||||
|
|
||||||
// onChange expect valid doc, we make sure do normalization before that.
|
// onChange expect valid doc, we make sure do normalization before that.
|
||||||
|
Loading…
Reference in New Issue
Block a user