I have actions available to the user that only modify some local application state, no document changes, but I would like these to be undoable via the same history plugin undo flow as normal edits since that is how they appear to the user.
My idea was to create a new Step thinking I could get the collab plugin to ignore them (ie no version increment or sendable steps, keeping them totally local) but it does not seem possible.
A hacky idea: you could store an invisible Mark on the root node for each user I think ( although it won’t work with YJS unless you patch y-prosemirror ).
Or you could create an external history that tracks both editor and visualisation change events, and passes the undo/redo command to the ProseMirror history if that’s on top.