Nesting ProseMirror editor inside NodeView causes state changes on outer ProseMirror editor

Hello! We are trying to nest a ProseMirror editor (“NestedEditor”) inside a NodeView (within another ProseMirror editor, “OuterEditor”). This all works, except that when we type into the NestedEditor, it causes OuterEditor’s state to change. In particular, we notice OuterEditor’s selection changing while we make changes in NestedEditor. As a consequence, all of our NodeViews in OuterEditor are re-rendering on every key stroke. How do we stop this? Thank you!

I expect you need to define an ignoreMutation method on your node view, and make it ignore selection changes.

2 Likes