Visual only cursors

Hi there.

I’ll be integrating codemirror into a real-time multi-user collaboration application.
I was wondering if there is any simple trick to show others users cursor visually, without actually setting internal codemirror cursor that affect current user.

Right now I’m considering using doc.markText with custom styling, which should make this easy to toggle on and off with classes on wrapping elements.

There is also the possiblility to use SetBookmark like Firepad does with a custom widget.

Any better solution I would have missed ? Advantages/drawbacks of one method VS another ?

Thanks !

Using setBookmark with a widget option is probably the best way to do this.

1 Like