Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Latest commit

 

History

History
9 lines (5 loc) · 832 Bytes

README.md

File metadata and controls

9 lines (5 loc) · 832 Bytes

prosemirror + automerge

You almost certainly want to use peritext to do what I was trying to do here!

This is a 100% experimental, not-actually-working-yet attempt to get Automerge (p2p-friendly CRDT implementation) working with ProseMirror (best-in-class rich text library).

The basic idea is to have a ProseMirror plugin that works similarly to the collab plugin: steps which originate from the editor are translated to an Automerge document, and changes to a "remote" Automerge document are translated back to the ProseMirror document as steps.

A demo implementation, with two editors that are synced via Automerge, be viewed by running npm run build & opening demo.html in the browser. Inserting characters works, deleting (and basically everything else) doesn't work.