Change HTML of Panel buttons from span to button
Right now it's not possible, but I'll add this possibility in the next release, so it'll be something like this:
Read full answer below ↓Question
I have created some Panels and would like to change the element of panel buttons from span to button as its more appropriate and looks better with CSS, how would I configure it?
Answers (3)
Right now it's not possible, but I'll add this possibility in the next release, so it'll be something like this:
editor.Panels.addButton('PANEL-ID', {
id: 'test',
tagName: 'button',
className: 'someClass',
command: editor => alert('Test'),
})
That'd be great!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #921
[QUESTION] Select and focus an html element from a panel button
Hi everyone, Is it possible to set focus in a section html with Grapes, like as an anchor? I have a panel button and it just select the sec...
Issue #916
[Question] why do layers not have element tag name?
I'm playing around with grapes' internals because I would like to contribute in the future. Most of my interest is in making it worth with...
Issue #1639
[Question]: Would it be possible to have change settings under style manager in a way that it has href when a link is created?
I'm using preset newsletter with built-in RTE (do not want to use ck editor like the demo) In order to make any text to link, i need to cli...
Issue #839
[QUESTION] Create custom selected component settings
There is a option in panel to change setting of component (For links, there is an option no change link - HREF - and target, for texts, id...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.