Understanding ReplaceStep / ReplaceAroundStep


#1

I’m trying to map Steps/Transactions into its equivalent operations for Operational Transformation in my dispatchTransaction function. I don’t understand the ReplaceStep object, especially the ‘from’ and ‘to’ properties. The ‘from’ and ‘to’ are equal when inserting however many characters, and if they are indexes they are off-by-one.

Is there a better way to retrieve ProseMirror’s Insert/Delete operations?


#2

from and to point into the pre-change document. They are not off by one—take a look at the docs.