Style Manager Not Working
Had the same problem, adding widthMedia: '' to my custom device fixed it. I think there is some problem when using millimeters in media queries so the styles aren't applied because it thinks your canvas is too big.
Read full answer below ↓Question
Hi
When I choose a block and try to change the styles, nothing happens. (I'm using the web preset)

Here is my config:
const editor = grapesjs.init({
canvas: {
styles: ['/css/canvas.css']
},
styleManager: {
clearProperties: true
},
container: '#gjs',
fromElement: true,
height: '100vh',
width: '100%',
storageManager: false,
plugins: ["gjs-preset-webpage"],
pluginsOpts: {
"gjs-preset-webpage": {
blocks: [],
blocksBasicOpts: {
flexGrid: true,
},
navbarOpts: false,
countdownOpts: false
}
}
});
editor.setStyle('html {direction: rtl}')
Answers (3)
Had the same problem, adding widthMedia: '' to my custom device fixed it. I think there is some problem when using millimeters in media queries so the styles aren't applied because it thinks your canvas is too big.
It seems that there is a problem with custom device size. When I set default size to desktop, it works.
const deviceManager = editor.DeviceManager;
deviceManager.add('paper-a4', '210mm', {
height: '297mm',
name: 'A4',
});
const panelsManager = editor.Panels;
const panelDevices = panelsManager.getPanel('devices-c');
panelDevices.get('buttons').add([{
id: 'set-paper-a4',
command: editor => {
editor.setDevice('A4')
},
className: 'fa fa-desktop',
active: 1,
}]);
@VojtechLanka Thank you
Related Questions and Answers
Continue research with similar issue discussions.
Issue #595
Cannot drag with fast actions
When I move a block on the canvas before showing clone element, editor does nothing. Only move clone of the block symbol.
Issue #2265
able to fetch my local html file using load url and getting status ok how can i load this fetched url into editor currently im getting blank screen inside editor
here is my code const LandingPage = { html: '', css: null, components: null, style: null, }; this.editor = grapesjs.init({ container: "#gjs...
Issue #4138
Unexpected behavior in style manager
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.35.101 Chromium: 98.0.4758.87 (Off...
Issue #4116
Flex Property not working in style manager
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Version 1.34.81 Chromium: 97.0.4692.99 (Of...
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 →Related tutorials
In-depth guides on the same topic.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.