I created a custom Node View for one of my nodes and have it updating the view using Steps similar to how jstleger0 described here (except using node.attrs[key] instead of doc.attrs[key]) whenever the content of the node changes. Essentially I’ll pass in the node and node view to the Step then update one of the nodes attributes and rerender the node view.
I noticed that when I undo long enough to the point that the node is removed from dom then redo that node back into existence, a new Node gets constructed with a new Node View (I assume) because continuing to redo causes the node attrs to update but any commands I run on the Node View are not visible. Using console.log, I can see the Node View still exists in memory but it is not the same Node View.
I think the solution might be either to get the corresponding Node View from the Node and use that to update the view… am I on to something?..