Cursor collaboration

Hello awesome community :heart:

I’ve implemented a prototype for collaborative cursor, the gist is here. It adds a new CursorStep that is clientID + from + to shared between multiple editors using appendTransaction in the plugin.

It lacks:

  1. Disconnect & timeout: the cursor list grows, no cursor get removed over time
  2. Proper cursor repositioning: as I sometimes experience inconsistencies, I played a lot with assoc=1/-1, to get something “good enough”. I think that I have a problem similar to (1)
  3. Block selection: only span decoration, I would love to see blocks selected instead of inline text.
  4. CSS and styling: I use clientID = red, green, blue and have a 10 lines CSS associated with it (.selection-red { background: ... } ).

I’m looking for simple implementations of collaborative features, close to the examples on the website.

Do such plugins already exist? I know that YJS and alternatives exist, but they come with additional complexity, IMO.

Do you think it’s worth pursuing, here? I essentially want something as simple as the collab example.

Thanks for your time!

References

  • (1) @marijn - I guess you want to map with assoc=-1 only for the remote steps, I suppose (link)
1 Like