@marijn If I wanted to implement this, would it be as simple as:
- adding a
destroymethod to theDecorationclass - calling it in all the places that
onRemoveis currently called (https://github.com/ProseMirror/prosemirror-view/blob/master/src/decoration.js#L284) - allowing it to be passed via the
spec, like NodeView’s do: https://github.com/ProseMirror/prosemirror-view/blob/master/src/viewdesc.js#L931-L934
I’d be happy to help take a stab at this but the internals of NodeView/Decoration are very new to me.
Thanks!