Introduction to Loro’s Rich Text CRDT

Loro is a rich text CRDT algorithm that complies with Peritext’s criteria for seamless collaboration. It can be built on top of any List CRDT algorithm and convert them into rich text CRDTs. Loro’s algorithm, based on the Replayable Event Graph (REG), records the history of user edits on a directed acyclic graph. It simplifies the process of reconstructing the CRDT structure by replaying history and excels in local updates and tombstone collection. Peritext, the first paper on rich text CRDTs, addresses challenges such as conflicting style edits and manages conflicts between style and text edits. Loro’s implementation successfully passes all test cases outlined in the Peritext paper. The algorithm handles various scenarios, including concurrent formatting and insertion, overlapping formatting, text insertion at span boundaries, and styles that support overlapping. Loro’s rich text module can be used by defining configurations for styles. The design and implementation of Loro’s rich text algorithm are continuously refined and open to collaboration and feedback.

https://www.loro.dev/blog/loro-richtext

To top