Gutenberg InnerBlocks predefined block supports

Your template for InnerBlocks has a small typo in supports: { classname: false } (it’s case-sensitive) and should be className:

const MY_TEMPLATE = [
  [ 'my-block/icon', { supports: { className: false } } ],

The supports definition is correct in your my-block/icon block registration. Assuming your save() function handles <InnerBlocks.Content>correctly, with the className typo fixed, it should work.

When in the Editor view and inspecting the classes applied to your block, there will still be many more classes (eg. “wp-block-my-block etc”) applied to your block – they are needed to enable the Editors functionality. To confirm if the supports on the inner blocks are working, check the classes applied on the frontend once the post/page is published.

Leave a Comment