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
BUG: 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
[BUG] `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
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.
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.