yjs / y-prosemirror

ProseMirror editor binding for Yjs
https://demos.yjs.dev/prosemirror/prosemirror.html
MIT License
344 stars 119 forks source link

fix: conditionally access ystate binding in cursor plugin #169

Open EricHasegawa opened 3 days ago

EricHasegawa commented 3 days ago

While using y-prosemirror through a Tiptap React/NextJS project, I ran into an issue where the CollaborationCursor extension was clearing marks from my nodes; dug around in there and traced this back to some errors being thrown by cursor-plugin (screenshot below). Adding in a couple conditional accessors fixed this.

Screenshot 2024-10-24 at 3 41 09 PM