Distinguish cursor or action of 2 people

Hi Yjs team,

I want 2 people to be in the same room and distinguish the pointer or action of the 2 people. (Same thing like a demo at yjs.dev or something like that). I choose Monaco for editor bindings.

Can you guys please show how or document it is to handle it??

Hi @moneymaker11081999,

This is described in the documentation: https://docs.yjs.dev/getting-started/adding-awareness

Thank you, I didn’t expect to receive such a quick response from you, really appreciate that :pray:

Hi, have you managed to have cursor for all users with monaco?

Even adding this:

awareness.setLocalStateField('user', {
    // Define a print name that should be displayed
    name: username.value,
    // Define a color that should be associated to the user:
    color: '#ff9900', // should be a hex color

I don’t have any cursor for the other users.

Hi @laruiss,

Each user needs to set their own color and user-name.