How to disable auto joining of adjacent nodes?

Hi there, I’m running into an issue where I would like two adjacent nodes to stay separate rather than merging into one. I’ve tried looking but haven’t found anything.

If you look at this recording, when I press backspace on the line between the two quote blocks, they merge into one. But ideally they shouldn’t. There’s also another bug shown whereby I press enter when focused on the new line but the group splits into two for some reason.

Any ideas on this would be much appreciated! Great library as usual.

What do you want backspace to do in this situation? Nothing? If so, you could write a command that detects that situation and just returns true without doing anything when it applies, and bind that to enter with a high precedence.

Right, I would want it to do nothing so that the two nodes stay separate. But I read somewhere that there were many edge cases that were missed by just overriding backspace, like for example deleting using the delete button. So is there a more fundamental way to disable auto joining? Also, I’m not sure why when I enter a new line, the group splits into two nodes. That doesn’t seem to be intended behaviour.

I’m not saying you should override it. I’m saying you should keep the old behavior, but insert another command in front of that that selectively blocks it.

1 Like

I see what you mean - thanks for the prompt help and the awesomeness of ProseMirror!