Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[6.x]: No way for custom element types to add top level buttons in toolbar or beside the Save menu

Open
#19,910 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
php
Domain
backend, frontend

Research direction

Start with ElementEditorActions::buttonActions() and the ElementEditorPayloadResolving hook, which the issue says only ever wire buttons to submitAction(), and with the payload.previewTargets path used for the toolbar's View links. The open question is the API design: how a plugin can declare a non-submitting link, download or modal button for the toolbar or beside Save. Done means a maintainer-agreed extension point, not a patch, so check for a decision in the thread before writing code.

Written by the indexing model from the issue text.

Description

bug repo:cms
What happened?

The legacy editor rendered getAdditionalButtons() / additionalButtonsHtml() beside Save, which in Craft 5 sat in the page header, so these buttons were prominent at the top of the edit page. On the Inertia elements/Edit page:

  • editorActions.buttons (beside Save in the footer) is built from core actions (Create a draft, Apply draft, etc.) in ElementEditorActions::buttonActions(). Plugins can append to it via ElementEditorPayloadResolving, but every button is wired to submitAction(), so it submits the editor's form. That suits save variants, not links, downloads or modals.
  • The toolbar's "View" links come from payload.previewTargets. They're front-end URLs that also feed Live Preview, so they're not a fit for CP links.

There doesn't appear to be a way to add a non-submitting button (link, download, or modal) to the toolbar or beside Save, other than preview targets.

As a workaround, I've currently added previous custom plugin buttons that lived in these locations to the ⋯ action menu via extraActionMenuDescriptors(), but they're less discoverable there.

Craft CMS version

6.0.0-alpha.20

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
11h 54m
Merged PRs (30d)
251

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from craftcms/cms

All issues in craftcms/cms

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.