Add Button To Top Toolbar in Gutenberg

I would like to add a button that triggers some custom JS code to the top roolbar (not the block level editor toolbar):

Shows location of where the button should be added

Is there an official way to do this? I couldn’t find any documentation about extending the top toolbar.

Thanks
Aaron

1 Answer
1

This is presently not offered as an extension point. The source for the post editor’s toolbar shows that these items are hard-coded, and do not offer any filters or Slotfills.

Issue #16174 provides a feature request for such extension points.

Leave a Comment