[Question]: How to change device from dropdown to icon
See original GitHub issueI’m trying to replace the dropdown with icon for the devices following the example in the newsletter template yet it doesn’t work.
//custom commands
// Turn off default devices select and create new one
let pnm = editor.Panels;
editor.getConfig().showDevices = false;
let devicePanel = pnm.addPanel({
id: 'devices-c'
});
let deviceBtns = devicePanel.get('buttons');
devicePanel.get('buttons').add([{
id: 'deviceDesktop',
command: 'set-device-desktop',
className: 'fa fa-desktop',
attributes: {title: 'Desktop'},
active: 1,
}, {
id: 'deviceTablet',
command: 'set-device-tablet',
className: 'fa fa-tablet',
attributes: {title:'Tablet'},
}, {
id: 'deviceMobile',
command: 'set-device-mobile',
className: 'fa fa-mobile',
attributes: {title: 'Mobile'},
}])
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Change Spinner dropdown icon - android - Stack Overflow
Change Spinner dropdown icon · 1. create a custom drawable · 2. Set the drawable as the spinner background:
Read more >How to replace dropdown-toggle icon with another default ...
Step 3: After applying the CSS, copy the embed code of the icon that you want to display on the webpage from the...
Read more >Android : Change Spinner dropdown icon - YouTube
Android : Change Spinner dropdown icon [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android : Change Spinner ...
Read more >Components - Bootstrap
Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more.
Read more >Create Dashboard Layouts for Different Device Types - Tableau
For Phone layouts, either click the lock icon , or choose Edit Layout from the pop-up menu: Anything you can add to your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.