y-prosemirror
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -220,3 +220,6 @@ 'use strict'; | ||
const binding = new ProsemirrorBinding(yXmlFragment, view); | ||
view.dispatch(view.state.tr.setMeta(ySyncPluginKey, { binding })); | ||
// Make sure this is called in a separate context | ||
setTimeout(() => { | ||
view.dispatch(view.state.tr.setMeta(ySyncPluginKey, { binding })); | ||
}, 0); | ||
return { | ||
@@ -773,3 +776,2 @@ update: () => { | ||
view: view => { | ||
const ystate = ySyncPluginKey.getState(view.state); | ||
const awarenessListener = () => { | ||
@@ -779,2 +781,3 @@ view.updateState(view.state); | ||
const updateCursorInfo = () => { | ||
const ystate = ySyncPluginKey.getState(view.state); | ||
const current = awareness.getLocalState() || {}; | ||
@@ -781,0 +784,0 @@ if (view.hasFocus() && ystate.binding !== null) { |
{ | ||
"name": "y-prosemirror", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Prosemirror bindings for Yjs", | ||
@@ -5,0 +5,0 @@ "main": "./dist/y-prosemirror.js", |
@@ -75,3 +75,2 @@ | ||
view: view => { | ||
const ystate = ySyncPluginKey.getState(view.state) | ||
const awarenessListener = () => { | ||
@@ -81,2 +80,3 @@ view.updateState(view.state) | ||
const updateCursorInfo = () => { | ||
const ystate = ySyncPluginKey.getState(view.state) | ||
const current = awareness.getLocalState() || {} | ||
@@ -83,0 +83,0 @@ if (view.hasFocus() && ystate.binding !== null) { |
@@ -85,3 +85,6 @@ /** | ||
const binding = new ProsemirrorBinding(yXmlFragment, view) | ||
view.dispatch(view.state.tr.setMeta(ySyncPluginKey, { binding })) | ||
// Make sure this is called in a separate context | ||
setTimeout(() => { | ||
view.dispatch(view.state.tr.setMeta(ySyncPluginKey, { binding })) | ||
}, 0) | ||
return { | ||
@@ -88,0 +91,0 @@ update: () => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2333211
20966