[Collab] Is there a way to override rebaseSteps method?


#1

In some special cases, when receiveTransactions is called, I just want to undo current unconfirmed steps and apply only the new steps that came from server. I don’t want collab to merge unconfirmed steps with new ones the way it does. I would like to create a transaction to apply the unconfirmed changes in my own way.

I saw that the steps are merged in rebaseSteps method. Is there a way to override the rebaseSteps method (https://github.com/ProseMirror/prosemirror-collab/blob/237315d8d17b07435fde817a49820342dd67475c/src/collab.js#L14) to merge the steps in my own way?

Thanks!


#2

No, not really, but it might be possible to write your own variant of receiveTransaction that behaves the way you want (though be warned, the stuff it does gets a little subtle)