Issue #557💬 AnsweredOpened November 22, 2017by krunal0391 reactions

Classes are missing on editor.gethtml()

Quick answerby Geczy1

Don't think gjs- prefixed classes will return

Read full answer below ↓

Question

I can see classes are added on canvas but when I get html via editor.gethtml(), i so some of classes are not included and it is just divs without any classes. attached screenshot with html on canvas and html via editor.gethtml()

capture

Answers (3)

GeczyNovember 22, 2017

Don't think gjs- prefixed classes will return

arthuralmeidapNovember 22, 2017

When you use the editor.getHtml it returns just the html . If you need the css too, you can use the editor.getCss().

GeczyNovember 22, 2017

I use newsletter-plugin and const html = window.grapesjs.editors[0].runCommand('gjs-get-inlined-html')

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.