Open elad-barack opened 1 year ago
@dmonad Is there any chance someone will take a look and merge? Many people reacted to the PR, so it might help others as well..
Would be great to have it!
Maybe I don't understand this feature, but wouldn't the changes be merged into Yjs the next time a change is emitted? Have you been able to test that this works?
In any case, I feel there is a better solution to this problem.
It would be nice to see Yjs in nextcloud. Could you explain in more detail what you are trying to achieve?
YJS integration with our editor encountered a problem. We have some PM nodes & marks that are per-session. We do not want to update other sessions about their existence and changes when they are in the doc.
We just used
addToHistory
flag until we added YJS. It worked great :) The change is basically a very small one. We added a state param calledaddToYDoc
that is true by default, and false only when a user passesaddToYDoc
in the transaction meta. When it's false, the change won't be reflected in the doc history, so we won't update other sessions about the redundant change.