Simple way to prevent an invalid edit?

I have a rather unconventional schema, and there’s a situation where certain invalid edits are prevented by ProseMirror, but with an exception. I was wondering if there’s a simple way to tell ProseMirror to silently disallow those.

In my schema I have a special kind of list that can contains “links”, and regular paragraphs:

{name: 'list', content: 'heading (paragraph | linkItem)*'}

The linkItems are essentially atoms, although I don’t mark them as such because I want to be able to place the caret before or after them, so you can press enter an insert a paragraph.

This all mostly works just from the schema content definition.

An example of the exception:

[link item]

[link item]

It looks like this post is unfinished.

In any case, ProseMirror shouldn’t be crashing on edits — if you can reduce the setup needed for this to happen to the very minimal elements, I can try to debug it.

Oh it got posted! I did a weird mis-key/mis-click thing while editing and thought I’d lost the whole thing.

I managed to get the behaviour I wanted by setting isolating: true, but if this is a ProseMirror bug I will try to find a minimal repro.

I’ll add it to the (growing!) list of things to do when I’ve finally gotten off TipTap.