Issue #1132πŸ’¬ AnsweredOpened May 25, 2018by agungjanuar0 reactions

How do I get <body> tag and its attributes

Quick answerby artf

There is an option for it

Read full answer below ↓

Question

I have set the background-color for body. But when it will be edit code or export data using command editor.runCommand ('gjs-get-inlined-html'); there is no attribute for body that has been set. How do I solve for the body tag to retrieve when using that command? Or is there another way? Image when set background-color for body: Image when edit html (no attribute for body): Thanks.

Answers (3)

artfβ€’ May 31, 2018

There is an option for it

editor.init({
	...
	exportWrapper: true,
})
agungjanuarβ€’ June 4, 2018

Thanks @artf , it works :)

lock[bot]β€’ September 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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.