How do I disable the block marketplace for Editors?

The block directory is already disabled for editors. In order to use the block directory you must be logged in as a user that can install plugins. This would be administrators on single sites and super admins on multisites. Unless you have granted this ability to editors, they cannot use the block directory.

“uagb/section and uagb/columns block”

UAGB refers to Ultimate Addons for Gutenberg, a plugin that creates custom blocks for Gutenberg, the block-editor. If you wish to use the uagb/section block (which uses both Gutenberg and UAGB), you’ll need to install and activate the Ultimate Addons for Gutenberg plugin. If you already have that plugin installed and activated and the error … Read more

Custom Gutenberg-Block esnext pass variables

The problem in your “edit” file is that your Edit() function in there is unpacking/destructuring the props, hence props is no longer defined or what you expected it to be. So you should do function Edit( props ) and not function Edit({className, props}) — and it should be noted that className is in that props, … Read more

Passing the name of selected color from the custom component to `render_callback`

If you just want to get the selected color name, then you can use the getColorObjectByColorValue() function in the @wordpress/block-editor package, which is wp.blockEditor.getColorObjectByColorValue in the browser. The function accepts two parameters: a color list (each is an object with color and name as the properties), and the color (a HEX code, e.g. #17a2b8) that … Read more

Add button to Block toolbar: toggleFormat is undefined

Now I can see what the problem is. You are not using the onChange properly. It comes from the props of the edit component: Here you have a complete example that works: registerFormatType( ‘nelio/keyboard’, { title: __( ‘Key’, ‘nelio’ ), tagName: ‘kbd’, className: null, edit: ( { value, onChange } ) => ( <RichTextToolbarButton icon=”editor-removeformatting” … Read more

Moving post title down the page / Removing a block from a post

The solution is/was simple. Use a priority of 1 in the add_filter() function. function carousel_block_remover( $content ) { // Matches <!– wp:client/carousel {“id”:”100″} /–> $regex = ‘/<!– wp:client\/carousel {“id”:”(.*)”} \/–>/’; if ( preg_match( $regex, $content ) ) { // Filter the first block out of the_content $content = preg_replace( $regex, ”, $content, 1); } return … Read more