Class not exported for body
I'm experiencing the same problem. The wrapper class attribute is set but the editor.getHtml() returns "<body></body>". I'm initalizing GrapesJS using: { fromElement: true, autorender: 0, // Size of the editor height: '100%', width: '100%', showOffsetsSelected: true, log: true, allowScripts: 1, mediaCondition: 'min-wi...
Read full answer below ↓Question
- Go to https://grapesjs.com/demo.html
- Clear canvas
- Click on body, add class, apply background color
- Background color now appears
- Click
Export-> Export to Zip - Open the Zip file and look at the
index.htmlfile. While the class was created in style.css, the class name was never applied to<body></body>in the html.
Answers (1)
I'm experiencing the same problem. The wrapper class attribute is set but the editor.getHtml() returns "<body></body>". I'm initalizing GrapesJS using: { fromElement: true, autorender: 0, // Size of the editor height: '100%', width: '100%', showOffsetsSelected: true, log: true, allowScripts: 1, med...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5905
Unable to open component settings again, after clicking component and then clicking Blocks
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Opera 10.0.5130.23 | Linux Reproducible de...
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...
Issue #4006
Background color automatically changes to black
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://grap...
Issue #6365
Style Manager Fails to Interpret Descendant Selectors Correctly
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 131.0.6778.205 Reproducible...
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.