I’ve got an issue where, when a user tries to input an invalid node as a child of another node, Prosemirror allows it by wrapping it in a nonsensical block; a block that’s only used elsewhere for other stuff. FindWrapping seems to iterate over possible nodes to wrap it in, and then chooses one. In my case, it’s one that doesn’t make sense, and the result is a document that’s technically correct, but looks broken.
How can I prevent it from doing this? The schema is legacy and cannot be changed under any circumstances.