How to limit the selection of the first level block in Gutenberg editor
I have my own custom block with an
InnerBlock component which is kind of a container for the contents of each section in the document.
The whole process of adding content always starts with adding this block.
Therefore, I would like to limit the selection of first level blocks to only this one block.
Once the user has added this block, then he can add other blocks inside.
This is a question without a code example as I have no idea where to start. I’ve seen an idea like
insert_template action, but that’s not appropriate in this case. Templates are something diffrent.
Goal to be achieved (in simple words):
- the user creates a new post
- can only select one specific block
- only in this block he can select other available blocks
- it can happen multiple times in one post