I’m trying to create resizable
nodes to wrap some block-level elements.
The action of resizing, though, triggers a transaction that redraws the view.
I’ve looked into setting a flag to ignore certain transactions via handleDOMEvents
, but the event transactions and “DOM-resize” transactions seem to be separate instances.
Any thoughts?
CSS resize seems to set width
and height
styles on the element, which will trigger ProseMirror’s DOM mutation observer and cause the element to be reparsed and then redrawn. I think that to work around that you’ll need a node view that handles such changes in a custom way and handles updates to avoid redraws.
ignoreMutation
as part of a nodeView
is working great thus far.
Thanks for the suggestion.