Gutenberg block “This block appears to have been modified externally” on save

You are getting this error because your edit and save function output doesn’t match. save({attributes}) { return ( <button class=”usa-button”> { attributes.text } </button> ); } precisely, { attributes.text } is the save function is not being called or used in edit function. Either add attributes.text in edit function or remove that from save function. … Read more

Define multiple Gutenberg editor widths

You may need to use the same approach that conditional editor stylesheets require now (for TinyMCE). function my_theme_add_editor_styles() { global $post; $post_type = get_post_type( $post->ID ); $editor_style=”editor-style-” . $post_type . ‘.css’; add_editor_style( $editor_style ); } add_action( ‘pre_get_posts’, ‘my_theme_add_editor_styles’ ); This snippet is from a Hongkiat article describing the process. Note: You would then have a … Read more