Add ability to restrict the list of allowed inner blocks to core blocks #35966
Labels
[Feature] Extensibility
The ability to extend blocks or the editing experience
[Package] Block library
/packages/block-library
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
When working with custom blocks there are examples of blocks like for example a custom image carousel that should never be allowed within a core cover block. Or a custom grid block that should not be inserted in a column block. This currently is not possible.
What is your proposed solution?
Either adding a filter in the core blocks that allows you to use the
wp.hooks.addFilter
function to modify the list ofallowedBlocks
passed to the inner blocks component within the core blocks.There also is an old proposal here: #16560 that feels very similar that would add the allowed inner blocks to the blocks attributes / supports.
The text was updated successfully, but these errors were encountered: