Navigation block: Added a hook to add allowFormat #67559
Labels
[Block] Navigation Link
Affects the Navigation Link Block
[Block] Submenu
Affects the Submenu Block - for submenus in navigation
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
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
gutenberg/packages/block-library/src/navigation-submenu/edit.js
Lines 576 to 581 in 82d7ad7
label
[Block] Navigation
[Block] Navigation Link
The text was updated successfully, but these errors were encountered: