Closed zerodayz closed 1 year ago
You should call the action after editor load finished.
const { editor, getInstance, getDom, loading } = useEditor(/* creator */);
effect(() => {
if (!loading) {
const editor = getInstance();
editor.action(ctx => {
// connect
})
}
})
Initial checklist
Affected packages and versions
6.5.4
Link to runnable example
No response
Steps to reproduce
I am setting up milkdown editor in Vue3 with composition API and script setup with collaborative plugin:
Did I forget to setup the
collabServiceCtx
in any way? Websockets for the wsProvider works fine, as I can see connection established.Expected behavior
Show the editor window with collaborative plugin enabled.
Actual behavior
Doesn't show the editor window.
Runtime
Safari
OS
macOS
Build and bundle tools
Other (please specify in steps to reproduce)