Is it possible to add an element to formatting toolbar of a core block usin PHP?
-
What the title says. I followed the Formatting Toolbar API docs to create a dedicated block (in a plugin) that adds a custom class to selected elements in heading and paragraph core blocks toolbar.
But that’s a “lot of” JSx code and dependencies just to add an element to an existing UI that does something simple (add a class to a specific word or group of words).
I already know that custom block formats can be added from the functions.php file (or else) of a theme. Is there an equivalent way to do it to add toolbar elements in the dropdown?
Maybe it’s not documented yet or I missed something.
Thanks in advance.
ps: if it’s not technically possible I’d be curious to understand why.
The page I need help with: [log in to see the link]
- The topic ‘Is it possible to add an element to formatting toolbar of a core block usin PHP?’ is closed to new replies.