Issue #974✓ SolvedOpened March 21, 2018by ghost5 reactions

Removing the deviceManager and ViewCode buttons

Quick answerby ryandeba4

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)

👍 Most helpfulryandebaMarch 22, 2018

Hi @PCPLTodd,

Here's an example of how you can remove the device switcher and view code button: https://jsfiddle.net/fjkk8w6k/2/

hlo2109May 11, 2025

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();

ghostMarch 22, 2018

Thanks Ryan, that worked great! :D

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.