How to change device from dropdown to icon
The above examples didn't work for me in version 0.17.28 (I presume the API has changed). This worked:
Read full answer below ↓Question
I'm trying to replace the dropdown with icon for the devices following the example in the newsletter template yet it doesn't work.
Answers (3)
The above examples didn't work for me in version 0.17.28 (I presume the API has changed). This worked:
@petervandeput https://github.com/artf/grapesjs/issues/1507#issuecomment-496280105 After grapesjs init. ```// Add device icons on panels bar editor.getConfig().showDevices = 0; editor.Panels.addPanel({ id: "devices-c" }).get("buttons").add([ { id: "set-device-desktop", command: function(e) { return...
You should also create those commands https://github.com/artf/grapesjs-preset-newsletter/blob/04f1eb21c1ae45f8d2b2912323e79354d8e72f18/src/commands.js#L30-L44
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2360
[Question] How to add a new property type(integer) to StyleManager?
Hi, I am trying to create a custom StyleManager property with 'integer' type. My ultimate goal is to 're-define' how certain units are disp...
Issue #2189
[Question] How to add "Ordered/Unordered List" option in rte/custom block
Hi I'm trying to create an ordered list with grapesjs. I tried adding the following to the rte: And this works if my page is pre-filled wit...
Issue #665
Custom component and save
Sorry, me again ! I'm trying to save my template with my new component "img-link" : But when I save my template using the gjs-get-inlined-h...
Issue #2144
[QUESTION] how to create custom element
Hi guys, I'm new in this so I'm sorry for my question. I'm trying to use grapesjs to edit email templates. Is it possible to have dynamic f...
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 →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.