Problem/Motivation

Currently the site-builder can upload a custom icon when creating an embed button, or rely on the default button provided by the button plugins.

Not always (and specially for small sites) the user is able to create a custom icon, but would appreciate the ability of easily creating different buttons on the UI. It would be a good feature to be able to map characters to buttons, for example allowing the user to input "N" to create a button for nodes, an "M" for media entities, etc.

Proposed resolution

Add a new form element on the button creation, allowing the user to enter a character (A - Z) that will map to a pre-defined icon png file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcoscano created an issue. See original summary.

marcoscano’s picture

Assigned: marcoscano » Unassigned
Status: Active » Needs review
FileSize
6.8 KB

First proof-of-concept.

For testing purposes, only "A" and "B" are allowed for now. This needs to be extended to the other characters (A - Z) and proper .png icons need to be created (the ones here are very rough). If the feature is approved and the approach looks OK, I can go on and perform the remaining tasks.

Status: Needs review » Needs work

The last submitted patch, 2: allow-character-based-buttons-2771865-2.patch, failed testing.

The last submitted patch, 2: allow-character-based-buttons-2771865-2.patch, failed testing.

marcoscano’s picture

Status: Needs work » Needs review
FileSize
7.56 KB
Dave Reid’s picture

I'm curious if this would have a lot of real-world use? Or would it be better to spend time on something more like #2565115: Integrate with the Icon module for embed buttons?

marcoscano’s picture

Status: Needs review » Closed (won't fix)

Yes! +1 for integrating with the icon module, whenever it's ready.
Closing this in favor of #2565115: Integrate with the Icon module for embed buttons then.