Content match error when backspace on multiple inline nodes

Hi,

After hours of trying to debug this, finally reached the conclusion, I need help :slight_smile:

I have a node “textBlock” which takes different inline nodes, paragraph, heading, list items.

The error happens when I select more than one paragraph (or partial select more than one paragraph), and press backspace. I then get “Called contentMatchAt on a node with invalid content”. Deleting one inline node at a time works fine. The issue happens when there is more than one selected.

I tried intercepting the backspace behaviour with various ways to delete the text, with no luck. The inlined content is inside a custom node as per the below.

name: “textBlock”, content: “(paragraph | heading | bulletList | orderedList)*” draggable: false, selectable: false, isolating: false, defining: false,

Are you sure the initial content you put in your node is valid for that node? Calling .check() on your document after loading it should point out any such issues.

It was indeed that. Thank you for pointing that out. Turns out the root of the doc wasn’t aligned with the first child which somehow let all content render and insert, drag, etc but wasn’t following the correct schema.