Skip deleting the wrapper element when pressing backspace

Hi All, I’m trying to replicate a functionality that atlassian editor had with layouts. I was able to successfully implement most of functionality. However in certain cases when I selected content from two columns and press backspace the attributes of one of the column either rest or on column is deleted.

Ideally column width in the row should always add up to 100%, I checked atlassians code but I was not able to figure out how they were able to maintain the sum to 100 always.

Here is a screencast,

in the above example when, ideally it should only delete the text, this happens only in some occasions. I’m using same scheme as attlasian’s layout model. Here is the plugin and here is the schema for section and column.

I’m using tiptap and extending the behavior.

Any help would be greatly appreciated.

It looks like they’re implementing custom behavior. See transformSliceToRemoveOpenLayoutNodes as an example.