Classes are missing on editor.gethtml()
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()
Answers (3)
Don't think gjs- prefixed classes will return
When you use the editor.getHtml it returns just the html . If you need the css too, you can use the editor.getCss().
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.
Issue #843
[QUESTION] - CssComposer - removes unused classes
hi @artf , I import a html , using import from grapesjs-preset-newsletter, with some css classes inside the <style> tag. After the import,...
Issue #948
[Question] Grapejs import allow body class
I've imported full html string include head, body tag, and body tag has some classes. When I use editor.getHtml() => I can't get body tag....
Issue #1128
Bug in dragging selected text
hi @artf as you can see my screenshot when you drag textblock than select text in that element and drag it to bottom of content than text g...
Issue #981
[Question] Set "production" mode
Hi. Like the "Preview" mode, i'm like to show only the canvas (without bars on the side/top), without the eye icon at corner. Has any "prod...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.