Skip to content
Snippets Groups Projects
Commit 3ae53967 authored by chris's avatar chris
Browse files

test

parent de2b0abe
No related branches found
No related tags found
1 merge request!600Application context provider
......@@ -26,11 +26,11 @@ const WaxView = props => {
if (divRef.current) {
divRef.current.replaceChildren(main?.dom);
}
}, [main]);
}, [main, props.configHash]);
useEffect(() => {
initialize();
}, [initialize]);
}, [initialize, props.configHash]);
return (
<EditorContainer>
......
......@@ -40,20 +40,21 @@ class YjsService extends Service {
});
const type = ydoc.getXmlFragment(YjsType || 'prosemirror');
console.log('dsf');
console.log(this.app.PmPlugins.get('ySyncPlugin'));
this.app.PmPlugins.add('ySyncPlugin', ySyncPlugin(type));
if (cursorBuilder) {
this.app.PmPlugins.add(
'yCursorPlugin',
yCursorPlugin(provider.awareness, { cursorBuilder }),
);
} else {
this.app.PmPlugins.add(
'yCursorPlugin',
yCursorPlugin(provider.awareness),
);
}
// if (cursorBuilder) {
// this.app.PmPlugins.add(
// 'yCursorPlugin',
// yCursorPlugin(provider.awareness, { cursorBuilder }),
// );
// } else {
// this.app.PmPlugins.add(
// 'yCursorPlugin',
// yCursorPlugin(provider.awareness),
// );
// }
this.app.PmPlugins.add('yUndoPlugin', yUndoPlugin());
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment