Shared cursor support #142
-
Hello BitPhinix, What is your plan for shared cursor support in this library? I noticed your PR has been up for this for a few days now. What else are you waiting for before deploying it? Finally, how difficult was this to do? I'm wondering if it's something I should start working on myself as I would like to use Slate for a collaborative project. Also, thank you for this library. I think Slate and Yjs can make a really powerful collaborative editor together. Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Hey BitPhinix, after checking out the branch and trying the code myself, it seems that this feature is incomplete. Sorry for assuming it was without looking at it. I will spend some time today studying your code and try and complete this feature. I'm somewhat familiar with Yjs, but any advice or guidance would be greatly appreciated. Cheers. |
Beta Was this translation helpful? Give feedback.
-
I was able to use your shared cursor code by rendering a caret leaf when the |
Beta Was this translation helpful? Give feedback.
-
FYI I am new to this kind of JS development. My current workflow is make changes to this repo on a local branch, build, and then copy and replace the library on your slate-yjs-example repo (also local). This seems tedious though. I tried to make an example react project within this repo, and just point the slate yjs dependency at these source files, but react didn't like the import above its |
Beta Was this translation helpful? Give feedback.
-
Hi @chasefarmer, sorry for the late reply, I'm really busy ATM. I've updated to example project to include cursors here: https://github.com/BitPhinix/slate-yjs-example/tree/feat/cursors, but I'm not sure how stable they are at the moment. I'll come back to this once I have more time again |
Beta Was this translation helpful? Give feedback.
-
@chasefarmer2808 The cursor support is now merged (and an edge-case which caused an out of sync editor state as well) |
Beta Was this translation helpful? Give feedback.
Hi @chasefarmer,
sorry for the late reply, I'm really busy ATM. I've updated to example project to include cursors here: https://github.com/BitPhinix/slate-yjs-example/tree/feat/cursors, but I'm not sure how stable they are at the moment. I'll come back to this once I have more time again