diff --git a/src/plugins/sync-plugin.js b/src/plugins/sync-plugin.js index 84eddf0..1cf37b7 100644 --- a/src/plugins/sync-plugin.js +++ b/src/plugins/sync-plugin.js @@ -142,7 +142,8 @@ export const ySyncPlugin = (yXmlFragment, { colors = defaultColors, colorMapping update: () => { const pluginState = plugin.getState(view.state) if (pluginState.snapshot == null && pluginState.prevSnapshot == null) { - if (changedInitialContent || view.state.doc.content.size > 2) { + const emptySize = view.state.doc.type.createAndFill().content.size; + if (changedInitialContent || view.state.doc.content.size > emptySize) { changedInitialContent = true binding._prosemirrorChanged(view.state.doc) }