Closed thatsjonsense closed 2 years ago
Thanks :+1: I implemented the API and will release it in a bit.
Hey @dmonad , thanks so much for pushing this change. I've been testing it locally though and I'm still not seeing the intended behavior. It looks like when ProseMirror sends multiple transactions in a row, y-prosemirror is batching them together and only checking this meta key for the last one. This means that the whole batch is still actually getting captured.
Is there any way to prevent this?
I think this is fixed in v1.1.1
, can you please verify?
Hey @dmonad unfortunately not. I think the issue remains that when multiple prosemirror transactions happen in short sequence, and Yjs batches them together into its own transaction, only the last prosemirror transaction's addToHistory value is used:
I haven't tested this code, but I suspect a solution would look something like:
@thatsjonsense I think the next release should fix this issue.
If not, please write a test case so I can reproduce it better.
The proposed API mirrors prosemirror-history, for more info see https://github.com/ProseMirror/prosemirror-history/blob/master/src/history.js#L380