Unnecessary Canvas style
it is intended to store canvas styles, styles that do not affect the result of hmtl/css, styles that will not be exported, right? Correctby default the body has a white background, this seems to be the default color in all browsers, no? yeah but the iframe body doesn't have any default background color that's why that...
Read full answer below βQuestion
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Arc Version 1.35.0 / Chromium Engine 123.0Reproducible demo link https://grapesjs.com/demo.htmlDescribe the bug My special case: In my case, all styles from plugins and general styles are located in the header. So, to achieve similar behavior in the editor, I add these styles to the Canvas head. And when I specify the background color in my general styles, it is overridden by the GJS Canvas styles. This obliges me to specify the rule, which I don't want to do. I'm guessing this shouldn't be a rare c...
Answers (4)
it is intended to store canvas styles, styles that do not affect the result of hmtl/css, styles that will not be exported, right? Correctby default the body has a white background, this seems to be the default color in all browsers, no? yeah but the iframe body doesn't have any default background c...
There is canvasCss option for that.
Next time open a Discussion please, as this is not a core bug but wrong usage.
Hey @artf. Thanks for the answer. I'm not sure that we understood each other and I would like to clarify one detail. Yes, I know about the canvasCss property, moreover, I use it to change the styles of the selected component. I understand the essence of the property: it is intended to store canvas...
The issue you're encountering stems from GrapesJS applying a default background-color: #fff; to the body element within the canvas iframe. This is a common practice in web builders to provide a consistent, neutral background for the editing area. When you inject your own body { background-color: bl...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4208
Style click state bug in every element
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Brave Last, tested on chrome last and Safa...
Issue #6663
Symbols break when loading pages progressively (instances lose __symbol link)
Here is a video showing the bug: https://github.com/user-attachments/assets/0fdc76ed-cee5-4481-98b1-cbbf52572b31 GrapesJS version [x] I con...
Issue #6549
Couldnt Resize image
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://code...
Issue #6248
ShowOffsets bug when iframe body has zoom
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://jsfi...
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
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.