yjs/y-monaco

Add cursor classname for the user

Closed this issue · 2 comments

With the example CSS from here https://github.com/yjs/yjs-demos/blob/ad78d0554de2407bcddb8b9ac09b9bd0e4dc3dbe/monaco/index.html#L12, all users will have orange cursors.

In my application, each user is given a unique color and it would be beneficial to have some way to set the color for the cursor inside Monaco. I can't seem to find any such feature at the moment as only yRemoteSelection is added to all cursors when there are many of them

You will need to use Monaco decoration options instead of css classes to assign colors dynamically. I wonder whether such colors should be shared via awareness that a user color is the same for all users.

This is now possible via #15