-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Describe the bug
I am attempting to follow this guide to add a button to the menu item toolbar:
https://developer.wordpress.org/block-editor/tutorials/format-api/1-register-format/
This is not possible as the toolbar for menu items has a defined set of "AllowedFormats":
This makes it impossible to extend the menu item toolbar with new formats / buttons.
To reproduce
Follow this guide:
https://developer.wordpress.org/block-editor/tutorials/format-api/1-register-format/
(in step 1, you need to use "admin_enqueue_scripts" rather than "enqueue_block_editor_assets" - already reported in #21648)
Notice the format / button is correctly added to the Page/Post editor, but not the menu item toolbar.
Expected behavior
A new format / button would be added to the menu item toolbar.
Editor version:
- WordPress version: 5.4
- Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Gutenberg plugin
- If the Gutenberg plugin is installed, which version is it? 7.9
Can the logic be changed to specify a list of 'DisallowedFormats' rather than 'AllowedFormats'? This could remove the unnecessary core formats as required, whist allowing plugins to register new ones.