ueberdosis / hocuspocus

The CRDT Yjs WebSocket backend for conflict-free real-time collaboration in your app.
https://tiptap.dev/docs/hocuspocus/introduction
MIT License
1.19k stars 115 forks source link

How to implement document versioning on Hocuspocus #840

Closed ZhangMingZhao1 closed 1 month ago

ZhangMingZhao1 commented 1 month ago

The problem I am facing How to implement document versioning on Hocuspocus. How tiptap's versioning plugin is implemented。I see that tiptap is storing data in full volume, how does the data flow through Hocuspocus when restoring a certain version and how does everyone else synchronize it

The solution I would like I'm assuming it's using the yjs snapshot api?

Additional context I would like to implement version restoration on my slate rich text in conjunction with Hocuspocus, so that when one person restores a version, others can synchronize to that version as well, and I'm not sure where would be a good place to do that

janthurau commented 1 month ago

Hi @ZhangMingZhao1, the versioning feature is part of Tiptap Collab and thus not available in the open source version Hocuspocus. Tiptap Collab is compatible with slate, so feel free to just use the cloud offering :)