Why does Gutenberg adds 4 around blocks? And how to change this?
Why does Gutenberg adds 4 around blocks? And how to change this?
Why does Gutenberg adds 4 around blocks? And how to change this?
How to wrap Gutenberg blocks into a custom container (without using HTML blocks)?
Gutenberg Array push
How to make a block similar to another block
Figured it out, after half a day of banging away and asking a team mate. In the wpscholar link above I changed this line of code. // Surface all Gutenberg blocks in the WordPress REST API $post_types = get_post_types_by_support( [ ‘editor’ ] ); // change this line $post_types = [‘post’, ‘page’, ‘post-revision’]; // to this … Read more
Add a button to the Gutenberg editor header
In a block that I am currently trying to build I am using a RichText control. This has buttons/menu items for Bold, Italic, Code, Link, Inline Image and Strike though. Though there isn’t a button for underlining the text I can just use the key command [cmd+U] and it underlines. This seems to work and … Read more
Custom Image Gutenberg Block With Caption
“Updating failed” if any text includes “$v()”
I think this is due to how you’ve destructured it out. I believe dispatch works as a realtime “action”. So you need call dispatch() when you want to remove the panel. Try this: const { dispatch } = wp.data; dispatch( ‘core/edit-post’ ).removeEditorPanel( ‘discussion-panel’ )