Restrict heading level in Gutenberg block `core/heading`

I'm building a simple Gutenberg Block that lets the user create just headlines and lists. I've got a solution, but the user can select any heading level she or he wants to.

How I can I restrict the core/heading block to e.g. heading level H4?

The crucial part in my edit.js is this:

return (
    div {...blockProps}
        InnerBlocks
            onChange = { onChangeContent }
            allowedBlocks={ ['core/list', 'core/heading'] }
        /
    /div
)

Topic block-editor Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.