Removing the deviceManager and ViewCode buttons
Hi @PCPLTodd, Here's an example of how you can remove the device switcher and view code button: https://jsfiddle.net/fjkk8w6k/2/
Read full answer below ↓Question
I'm playing with the default init to try and remove the deviceManager and ViewCode buttons... var editor = grapesjs.init({ showOffsets: 1, noticeOnUnload: 0, container: '#gjs', height: '100%', fromElement: true, assetManager: { upload: false }, storageManager: { autoload: 0 }, styleManager: { sectors: [{ name: 'General', open: false, buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom'] }, { name: 'Dimension', open: false, buildProps: ['width', 'height', 'max-width', 'min-height', 'margin', 'padding'], }, { name: 'Typography', open: false, buildProps: ['font-family',...
Answers (3)
Hi @PCPLTodd,
Here's an example of how you can remove the device switcher and view code button: https://jsfiddle.net/fjkk8w6k/2/
Hi, I know it's late, but this is how I did it right now: editor.Panels.removeButton('devices-c', 'set-device-desktop'); editor.Panels.removeButton('devices-c', 'set-device-tablet'); editor.Panels.removeButton('devices-c', 'set-device-mobile'); editor.DeviceManager.getAll().reset();
Thanks Ryan, that worked great! :D
Related Questions and Answers
Continue research with similar issue discussions.
Issue #507
uploadFile being called twice on drop file?
I have an editor initialized as so: If I add an image to the canvas and try to upload a new image by dragging it into the drop area in the...
Issue #998
[BUG] Asset Manager sends empty request when uploading image
Description: GrapesJS editor is initialized in an editor.html file as follows: localhost:9001 is a local IIS server running PHP5. The conte...
Issue #2245
save html with inline css server side
hello all , I am using version 0.15.3 and want to save html data with inline css to server side this is my code where I am storing html to...
Issue #3442
Error after call `editor.destroy()`
Create editor instance Try destroy Got error
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.