BUG / Feature? Applying background color to body component isn't part of the exported HTML.
@mhowey I have seen this also, but I always assumed that the body is just the placeholder canvas for the content. Changes to the body do not export since the content placed in the body is the only thing being exported. In my application use, the body color change is used just to visualize what the content will look li...
Read full answer below βQuestion
Hi Art, thanks for creating such a fantastic project! I'm not sure if this would be considered a bug or feature request...but I'm having issues deciding how to hande the background color on the body while using the newsletter plugin with GrapesJS. Steps to Reproduce:Select the body (root element) in the canvas.In the style palette under "decorations" >> "Background" -- select a color to fill the body withClick export HTML, only the children elements are provided, so when the output HTML is used, it has no wrapper to apply the background color with. If there is a way to handle this correctly t...
Answers (3)
@mhowey I have seen this also, but I always assumed that the body is just the placeholder canvas for the content. Changes to the body do not export since the content placed in the body is the only thing being exported. In my application use, the body color change is used just to visualize what the...
You can use this option
grapesjs.init({
exportWrapper: true,
})
Thanks for the reply @JoshLucio . I'm using the newsletter preset plugin, which I believe is more targeted toward HTML email, rather than site building. I was actually thinking what you said to be the case, and I've explored all the getWrapper and getWrapperEl methods that Grapes provides, but they...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4447
Style manager does not accurately reflect inherited color
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 103.0.5060.114 Reproducible demo link http...
Issue #2928
Select the initial background color doesn't work
Version: 0.16.18 Bug: Select the initial background color is not working How to reproduce it: https://imgur.com/xqkt46E Actually:Component'...
Issue #2069
`allowScripts: true` still deletes <script> tags
Hi all. Thanks for creating and maintaining this amazing project. π Bug Description I have a block that inserts a script as specified here...
Issue #5691
Undo not working while seleting background or text color through color picker
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 122.0.1 Reproducible demo link htt...
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
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.