-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
What problem does this address?
Hello👋
I would like a hook for the navigation block allowedFormats.
Adding a hook here makes it easier to customize from plugins.
For example, adding inline icon markup.
In the classic theme, you could add HTML tags to the menu label.
(Although this may not have been very good security practice.)
<span class="dashicons dashicons-admin-home"></span>WordPress
This is how it looks in Twenty Twenty-One
Twenty Twenty-Five example
In block themes, you can only add formats allowed by allowedFormats.
Adding a hook to allowedFormats will allow customization from plugins, allowing for a variety of design expressions.
Thank you for your consideration.
What is your proposed solution?
Add a hook to add allowedFormats
.
gutenberg/packages/block-library/src/navigation-link/edit.js
Lines 529 to 534 in 968131a
allowedFormats={ [ | |
'core/bold', | |
'core/italic', | |
'core/image', | |
'core/strikethrough', | |
] } |
gutenberg/packages/block-library/src/navigation-submenu/edit.js
Lines 576 to 581 in 82d7ad7
allowedFormats={ [ | |
'core/bold', | |
'core/italic', | |
'core/image', | |
'core/strikethrough', | |
] } |
label
[Block] Navigation
[Block] Navigation Link