[Question] How do I get <body> tag and its attributes
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)
There is an option for it
editor.init({
...
exportWrapper: true,
})
Thanks @artf , it works :)
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.
Issue #1163
[Question] How do I set <body> attributes
Hi @artf, On the previous issue #1132 about export <body my="attributes"> code, I think it's done using exportWrapper: true. But now experi...
Issue #822
[QUESTION] How to get the html and css code in view code tool?
or how to get all the html code and css so that I could save it in my database. Or there is already a functionality in the documentation? y...
Issue #1831
[Question] How to run command for a block component?
I'd like to do something like this. so once a user drops the test component into the canvas, I'd like to open up asset manager modal where...
Issue #1059
[Question]: Load html content from a file dynamically
Hi, I need to load content from a html file from server onto editor after or while initializing editor. How this can be implemented? HTML w...
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.