grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

[Question] Custom icons

Open francesca-cicileo opened this issue 8 years ago • 2 comments

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).

francesca-cicileo avatar Apr 11 '18 21:04 francesca-cicileo

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

artf avatar Apr 14 '18 12:04 artf

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.

lock[bot] avatar Sep 17 '19 18:09 lock[bot]