Jess's Lab Notebook

Peritext: A CRDT for Rich-Text Collaboration

rw-book-cover

Metadata

Highlights

We could store each contiguous span of formatted text as an object containing the string text contents and a list of format markers (View Highlight)

Unfortunately, when we use the Automerge semantics for merging JSON documents, this representation does a poor job at preserving user intent. (View Highlight)

Our goal is to produce a data structure that contains only the current text of the document (no deleted text), annotated with its current formatting. This is in line with how rich-text editing user interface components, such as ProseMirror, represent their document state. (View Highlight)

To produce this data structure, we can iterate over the list of characters, converting each set of mark operations into a current formatting state for the corresponding span. (View Highlight)

New highlights added April 11, 2023 at 2:49 PM

For the editor UI, we chose to build on ProseMirror, a popular library which is already used in many collaborative editing contexts. Its modular design gave us the necessary flexibility to intervene in the editor’s dataflow at appropriate points. (View Highlight)

A CRDT for Rich-Text Collaboration
Interactive graph
On this page
Peritext: A CRDT for Rich-Text Collaboration
Metadata
Highlights
New highlights added April 11, 2023 at 2:49 PM