Prosemirror build variations and yjs shared cursor

Hi. This is my first time here.
Is a wonderful project and I love the cursor sharing feature plugin on prosemirror.
The demo I got working well.


I found this Prosemirror variation that I was interested to use for my project. However it seems like they have modified many components inside so adding the plugin like the instruction didn’t work.

I tried for a long time to get it working, but somewhere in the package, it seems like the editorview has been reinitialized and the docview doesn’t render correctly the second time.
Since the yjs components are quite fragmented between y-prosemirror, y-websocket, yjs, y-protocols…etc, it was quite difficult to understand what was going wrong.

Sorry for such a big question, if anyone has dug deep in prosemirror before, could you point me in the right direction?

Thank you.

Welcome @ted_chou12!

Reading the first error message "unexpected content type in insert operation" I guess that their editor really works quite differently. You should be able to debug this by setting breakpoints. But from the looks of it you’d need to adapt y-prosemirror to work with licit.

So when debugging this issue, you only need to know about y-prosemirror and the yjs module.

yjs is a collection of “shared types” that automatically sync. It has many plugins for doing different things:
• y-websocket connects through a websocket server (internally communicating using y-protocols).
• y-prosemirror is an editor binding that syncs the prosemirror editor using Yjs data types. It literally syncs document updates between prosemirror and Yjs.

1 Like