Collab editor: selections that survive edits

Both panels edit the same live.doc text; only the selection layer differs. The left room declares selections: 'offset' (raw { start, end } stamped on the presence roster), the right one selections: 'crdt' bound to the document via room.bindDoc(doc). Try it in two tabs: select a word in tab A, then type text before it in tab B - the offset panel's highlight drifts onto the wrong characters, the CRDT panel's stays glued to the word.

Editing as Bouncy Muffin

0 chars syncing...

Offset selections (drift) selections: 'offset'

0 others in this room

No remote selections. Open a second tab and select some text there.

CRDT selections (glued) selections: 'crdt'

0 others in this room

No remote selections. Open a second tab and select some text there.