Import setAttributes() method in a separated module
Import setAttributes() method in a separated module
Import setAttributes() method in a separated module
Gutenberg Block on Second Edit fails validation
Performance of Gutenberg block attributes with source selectors vs without
How do you manage the Gutenberg block previews in the admin area?
How can I programmatically select a Gutenberg block?
From what I can tell, registering it with ‘customClassName’ => false in the supports array in register_block_type prevents the actual style class from being saved to the raw text of the page. I had assumed it would dynamically insert it during the_content when it parses the blocks. In fact there’s no point in me registering … Read more
You can check out the code of the paragraph (and heading) block. It’s open source code !yay! Let it inspire you. <RichText … onSplit={ ( value ) => { if ( ! value ) { return createBlock( name ); } return createBlock( name, { …attributes, content: value, } ); } } onMerge={ mergeBlocks } … … Read more
Use a React Component in conjunction with Blocks
Use a server side rendered block, use register_block_type to register the block in PHP, and specify a PHP function to render the blocks output using the render_callback option. Then, in the blocks JS implementation, return null in the save method. You can retrieve the current author from the WP Core data store for previewing purposes … Read more
SOLVED — it was a plugin conflict from a very old custom plugin that was on there – turns out its key to the build of the site though so time to figure out which part of the plugin is conflicting