Body background color/image not saving?
Question
When I set the color or background image on the body it does not appear to save within the html/css/components. Is there a trick to get the background canvas to save? See attached for example.
<img width="1345" alt="Screenshot 2020-06-19 at 08 01 56" src="https://user-images.githubusercontent.com/1400982/85105890-2e521a00-b203-11ea-8c64-ac2fa9fb9476.png">Answers (1)
avoidInlineStyles: 1
resolves it.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1083
Import template
Hi . I have a json string like this '{ "assets": "[{\"type\":\"image\",\"src\":\"./img/team1.jpg\",\"unitDim\":\"px\",\"height\":0,\"width\...
Issue #1266
Could not load updates images in the assetmanager
We are saving the components to the MySQL database .So when we load the components we don't get updated value for example in asset manager...
Issue #1282
AvoidInlineStyle true breaks saving properties
Case:Set avoidInlineStyle to trueDrag an image to the canvas, set it's width to 100% via Layout > WidthSave the canvasReload the canvas Exp...
Issue #3252
Does getHtml() remove the inline style property?
I was fiddling with ways that you could change the style of elements inside the canvas and i noticed that by using the color-picker trait t...
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 Much Does It Cost to Build a SaaS Page Builder in 2026?
How much does it cost to build a SaaS page builder in 2026? Explore realistic development costs, timelines, features, and how using GrapesJS can reduce
Tutorial
PageKit: the GrapesJS application you'd have to build anyway
A source-available Next.js app around the open-source GrapesJS core — publishing, custom domains, leads, checkout and a plugin loader.
Tutorial
UnStudio for GrapesJS: 4 Plugins to Build Better Visual Editors
Meet UnStudio, a new GrapesJS plugin studio with four tools, safer and better editor: Command Palette, Responsive Pack, Autosave & Restore, and Autofill
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.