CodeMirror 6: How to set up collaborative editing with clients and server?

and a question:
is it possible to scroll the position (linenumber) where actually things from other instance are showing up?
(usecase working in the middle of a long document)

Of course this may result in trouble if both people are adding things at the same time, but often there is a lead of one person for some time before the other takes over.

It’s possible, but as you mention, it wouldn’t be a good default. You can add a scrollIntoView flag to transactions created with receiveUpdates (something like state.update(receiveUpdates(...), {scrollIntoView: true})).

1 Like