Prevent block variation inside certain parent blocks

A variation is a representation of the original block. if block-1 allows the insertion of block-2; then block-1 will except all variations of block-2. core/columns only allows the insertion of a core/column. If I create a variation of core/column I would expect the core/column to accept my variation. And therefor the reverse should also to … Read more

How can I remove the H1 option from the gutenberg editor

Gutenberg doesn’t give an option to remove specific heading levels from the editor interface. But, I think you can workaround using a bit of custom code (both PHP and some JavaScript). If you’re interested, try this. Add this custom snippet to your theme’s function.php file. function remove_h1_from_editor() { wp_enqueue_script( ‘remove-h1’, get_template_directory_uri() . ‘/js/remove-h1.js’, array(‘wp-blocks’, ‘wp-dom-ready’, … Read more

Replace multiple RichText components in a single block – wp.blockEditor.RichText multiline prop is deprecated

Now I can’t replace these with InnerBlocks as Innerblocks can only be used once in a block A HTML tag has this same restriction yet it hasn’t stopped this from being done, the answer is composition. The core/columns block has this same problem and solves it by only allowing individual core/column blocks as its children, … Read more