mirror of
https://github.com/cudr/slate-collaborative.git
synced 2025-06-07 01:44:16 +00:00
Merge 3d0cf7597a
into f65ab040ee
This commit is contained in:
commit
c16f4f38da
@ -99,10 +99,14 @@ 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.onChange()
|
e.onCursor && e.onCursor(doc.cursors)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// onChange expect valid doc, we make sure do normalization before that.
|
||||||
|
Editor.normalize(e, { force: true })
|
||||||
|
e.onChange()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user