[Question] Custom icons
Question
I want to add a custom icon to the grapesjs panel at the top of the editor page. Is it possible to do this with any SVG or with text? If so, can you explain how? I've tried the following but couldn't get an icon to show:
var pnm = editor.Panels;
pnm.addButton('options', {
label: '<svg ... </svg>',
...
});
I've also tried this to use text as an icon, but couldn't get that working either:
var pnm = editor.Panels;
pnm.addButton('options', {
label: 'words',
className: 'fa fa-text',
...
});
(I'm also using the newsletter plugin).
Answers (2)
At the moment, there is no label property on buttons so you can edit them only via className. BTW I like the idea, I'll make it available in the next release
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 #1210
[Question] Replace Devices icon ASP.net / Javascript
Bonjour, I want replace icon for selected devices like in preset-webpage but i don't understand why this code doesn't work and nothing appe...
Issue #1814
[Question]: How to fire event which triggers component:selected with my component
I want to select my component whenever it is dragged from blocks to canvas and rendered, I have tried with registering events on component:...
Issue #1522
[Question] is it possible to add some text to content body where the cursor is ?
I'd like to have a button that is outside the editor and if i click this button, some text should be generated in the body where my cursor...
Issue #1669
[Question] Custom link modal doesn't update the current text but add another text with link
Hello Artur, I'm trying to have a custom modal when clicked link button in RTE. but it doesn't convert selected text to link but what it do...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.