yjs / y-prosemirror

ProseMirror editor binding for Yjs
https://demos.yjs.dev/prosemirror/prosemirror.html
MIT License
328 stars 115 forks source link

Does `prosemirrorToYXmlFragment` really lose hystory? #147

Open remorses opened 10 months ago

remorses commented 10 months ago

The prosemirrorToYXmlFragment documentation says "note that this function should not be used to rehydrate a Y.Doc from a database once collaboration has begun as all history will be lost"

But reading the code it doesn't look like the yjs doc history is being lost, it seems it applies any update from the prosemirror node to the yjs doc, am i right?

https://github.com/yjs/y-prosemirror/blob/e0e5e951614abe1be2295e5ab8987ab5916bcaec/src/lib.js#L231

websiddu commented 7 months ago

Yes.