@marijn in an rfc pull request (https://github.com/ProseMirror/rfcs/pull/3) you suggested tracked changes be done by storing steps like in https://github.com/prosemirror/prosemirror-changeset. I actually did take a look at that and wanted to go in that direction originally but due to my requirements it seemed like the wrong approach.
I am working with an external system that already creates documents with tracked changes. I need to support that document format and be able to output the same format. This existing format wraps inline text in elements and places attributes on nodes. And then inserts corresponding metadata nodes into the documents <head>
element. There are more than just insert and delete operations as well. Wrapping/unwrapping content, attribute changes, and replaces are all forms of tracked changes. I was uncertain how to or if it was even possible to use prosemirror-changeset with the above constraints.
So I took the approach of using marks for the inline text changes. I am still working out a method for applying attributes to nodes that have a tracked change. I am applying these marks by hooking into input handlers such as handlePaste, handleDrop, handleTextInput, and handleDOMEvents.cut. I am worried that I wonāt catch every input type. Iād like to be making changes at a lower level like in prosemirror-changeset.
Does my approach lead to madness? Do you think there is still a way to leverage prosemirror-changeset? FYI these documents are also edited in a collaborative environment.