Issue #2096💬 AnsweredOpened June 24, 2019by benvmatheson0 reactions

Class not exported for body

Quick answerby florinr1

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

  1. Go to https://grapesjs.com/demo.html
  2. Clear canvas
  3. Click on body, add class, apply background color
  4. Background color now appears
  5. Click Export -> Export to Zip
  6. Open the Zip file and look at the index.html file. While the class was created in style.css, the class name was never applied to <body></body> in the html.

Answers (1)

florinr1December 2, 2019

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.