How can I apply a ProseMirror (tiptap) transaction to data persisted on the server?

818 views Asked by At

I'm using TipTap to build a document editor. On the server side (node), I've got a postgres db storing tiptap's output as json. My issue is that I'm expecting the content of the editor to get big, and so posting the entire content to the server on each save isn't going to work.

What I'd like to do is take the transactions from tiptap and send them to the server, load the persisted version, apply the transactions, and then persist the result. Does anyone know how I would go about doing this?

It seems that tiptap depends on there being a DOM, so I'm not sure it's possible to load it in node. And even if it was, I'm unclear on how I could apply those transactions, although prosemirror does have the apply and prosemirror-transform commands, which seem promising.

It seems like people would have run into this issue before-any thoughts?

Thanks!

0

There are 0 answers