Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for adding a -top- Toolbar Button #30901

Closed
mostl33 opened this issue Apr 16, 2021 · 5 comments
Closed

API for adding a -top- Toolbar Button #30901

mostl33 opened this issue Apr 16, 2021 · 5 comments
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience General Interface Parts of the UI which don't fall neatly under other labels. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@mostl33
Copy link

mostl33 commented Apr 16, 2021

Hi there,

is there an API to add a Button to the Top-Toolbar? I can't find anything (just unanswered posts):

image

Thanks in advance & thanks for this great project -!-
mostl33

@gziolo gziolo added [Feature] Extensibility The ability to extend blocks or the editing experience General Interface Parts of the UI which don't fall neatly under other labels. labels Apr 19, 2021
@gziolo
Copy link
Member

gziolo commented Apr 19, 2021

Thanks in advance & thanks for this great project -!-

❤️

is there an API to add a Button to the Top-Toolbar? I can't find anything (just unanswered posts):

It isn't possible at the moment with the extension points that exist in the editor. It was discussed many times but it never happened mostly because the primary way to include an item in the toolbar is through the More Menu on the right side and the concept of pinned items. The reasoning always was to improve the current way of extending the UI before opening more places in the editor for extensibility.

Screen Shot 2021-04-19 at 15 46 06

@TomasHurtz
Copy link

TomasHurtz commented May 18, 2022

Hello

I too would like to know how best to add top toolbar button in Gutenberg page / post editor.

Edit-page - top-toolbar-WordPress

Here is a useful example I have not tried yet - but it seems there are few resources on this matter.

For example, if one wishes to replace the "W" logo at the top left of the editor, with a drop down instead...

@gziolo
Copy link
Member

gziolo commented May 19, 2022

This issue #16988 from @ryanwelcher looks like a very similar proposal. There is also a broader discussion in #37448 about making the editor’s interface more extensible.

@ryanwelcher
Copy link
Contributor

ryanwelcher commented May 25, 2022

@TomasHurtz there is an existing SlotFill for that location that you can use to modify the W logo. See - https://developer.wordpress.org/block-editor/reference-guides/slotfills/main-dashboard-button/ Just keep in mind they are marked as __experimental and may change in the future.

If there is interest, I'd love to pick up that old issue/PR and see where we can take :)

@jordesign
Copy link
Contributor

With #16988 looking very similar - I'll close this in favour of that issue.

@gziolo gziolo added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience General Interface Parts of the UI which don't fall neatly under other labels. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

5 participants