This page implements the core idea from Matthew Weidner’s post: every character gets a stable ID, clients send
insert-after and delete-by-ID operations, the server stores tombstones, and each
client rebuilds optimistic local state from confirmed server state plus pending local ops.[1]
What This Demo Shows
1
Cursor positions are converted into IDs. Inserting text means “insert X after ID Y”, not “insert at index 17”.[1]
2
Deletes do not remove anchors from storage. Entries stay in the list as tombstones so later inserts can still target them.[1]
3
When a client receives server updates while it still has local pending edits, it recomputes optimistic state from confirmed state plus pending ops.[1]
Preset Scenarios
The presets script a few operations, but the page stays interactive afterwards. Click the green caret gaps to move each client cursor.
Server
Authoritative order • literal insert-after
Stored List
Event Log
Source notes: the operational model, tombstones, and reconciliation behavior on this page are derived from Matthew
Weidner’s article “Collaborative Text Editing without CRDTs or OT” and its description of insert-after IDs,
delete markers, and replaying pending local operations over confirmed server state.[1]