Issue #1743Opened January 23, 2019by sankaran850 reactions

[FEATURE REQUEST] Add command to get actual template imported into editor

Question

Hi Team,

Code SnippetHTML
We are using grapesjs newsletter plugin in our project for importing and preview the template. We are facing some difficulty in retaining the template structure which we import in to grapesjs editor. Please check the below example

IMPORTED HTML

<!DOCTYPE html>
<html>
<body>
<h1>Grapesjs </h1>
<p>My first grapesjs template.</p>
</body>
</html>  


EXPECTED OUTPUT

<!DOCTYPE html>  
<html>
<body>
<h1>Grapesjs </h1>
<p>My first grapesjs template.</p>
</body>
</html>  


ACTUAL OUTPUT , what we get from editor using the command (editor.runCommand('gjs-get-inlined-html'))

<h1 style="box-sizing: border-box;">Grapesjs</h1>
<p style="box-sizing: border-box;">My first grapesjs template..</p>
<style>..</style>

From the output u can see grapesjs has customised the actual template uploaded, by stripping off the html, head and body tags and adds new style tag in the content,  Which we don't want to happen.

 Is it possible for grapesjs editor to output html without altering the basic structure of the imported template. We looked for some options but couldn't find any. 

Please help us in achieving this .

Thanks

Answers (1)

lock[bot]January 24, 20200 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.