This commit is contained in:
Ulion 2021-01-29 00:09:12 +00:00 committed by GitHub
commit c16f4f38da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,10 +99,14 @@ export const AutomergeEditor = {
e.docSet.setDoc(docId, mergedDoc)
Editor.withoutNormalizing(e, () => {
e.children = toJS(mergedDoc).children
e.onChange()
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.
Editor.normalize(e, { force: true })
e.onChange()
},
/**