Skip to content

How can I persist the data of BlockSuite editors? #6551

Closed Answered by doodlewind
alissa-tung asked this question in Q&A
Discussion options

You must be logged in to vote

You can see the vanilla-indexeddb example about how you can save single BlockSuite doc via providers automatically - you can simply replace this IndexedDB provider with WebSocket provider. This provider-based approach saves Yjs binaries incrementally. More community provider example will be added recently.

And you can also import or export content using the snapshot JSON format and save the JSON to your own API endpoints. This could be easier but doesn't support real-time collaboration.

Regarding @blocksuite/sync, it's designed to sync a DocCollection with multiple documents. The documentation is not complete and we have plan to make it more reusable, but it may take longer time to evolve…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alissa-tung
Comment options

Answer selected by alissa-tung
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants