What is the difference between ProseMirror, and Quill + ShareDB?

I recently found prose mirror, and saw that it said “ProseMirror has built-in, ground-up, rock solid support for collaborative editing, where multiple people work on the same document in real time.”

I have a product that relies on collaborative editing for which I use Quill and ShareDB.

I thought I could learn something from ProseMirror code to see if I could make my implementation even more solid.

But on my initial examination I am not so sure that ProseMirror uses ShareDB.

Did Prose Mirror write its own operational transforms library or is it using ShareDB? ShareDB should handle syncing of all the operations so the main thing left is to sync the cursors, using Quill’s cursor module.

So is Prose Mirror using ShareDB or not? And if so could you point me to the relevant code where ShareDB is using on both client and server?


No, ProseMirror doesn’t use ShareDB, it has its own collaborative editing system (not based on OT, strictly speaking).

Hello, I was wondering if there was any insight into how PM might work with a ShareDB backend. My team is currently exploring a migration away from Quill + ShareDB to PM + ???.

Right now slowly reading through the docs, including this nicely written primer on collaborative editing, and I’m wondering if there’s some level of incompatibility with using ShareDB and its OT with the system PM has in place. Hopefully this isn’t too naive of a question, just trying to get my head around this issue.

I’ve never done it before, but my impression (please anyone correct me if I’m wrong) is that you should simply save the editor state in JSON to your DB of choice (Firebase, ShareDB, Fauna, etc) and update the editor state on the client(s) whenever there is a change of the state.

Thanks for responding. I think one concern we have right now is how the mechanisms of conflict resolution differ from PM to ShareDB where the latter uses a centralized server-side retry method from what I understand and PM would like clients to ask if their local document is up to date and, if not, rebase them locally. We use ShareDB for other non-rich text fields, so we may be looking to allow both types of mechanisms exist side-by-side…

Hello @Marijn

I’ve read your article about collaborative editing on prosemirror, and I think you’re confused when you say that one of the features of OT is that “no matter in which order concurrent changes are applied, you end up with the same document.”

That explains why in this thread, and further down in that article, and in other articles on the internet, Prosemirror has been understood as a different model from the OT. It is true that many models like ShareDB require convergence in different orders of operations. But if you check the OT literature, you will see that there are other undo-do-redo type algorithms, like GOT, which are still OT after all, since as the name suggests, they somehow “transform operations”.