GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
624 stars 222 forks source link

editor.runCommand('mjml-get-code'); undefined result #299

Closed graphixx closed 1 year ago

graphixx commented 1 year ago

I try to get de HTML full inline code and in use of: editor.runCommand('mjml-get-code'); I get a "undefined" response.

In the same way the use of: var Css = editor.getCss(); var Html = editor.getHtml(); var cmdGetCode = Css + Html; contentEl.value = cmdGetCode; I get the MJML code instead the FULL HTML code.

Please what is the correct way to GET the FULL HTML code, please, BEST REGARDS.

artf commented 1 year ago

Use this command editor.runCommand('mjml-code-to-html')

graphixx commented 1 year ago

Soo perfect I use: var Email = editor.runCommand('mjml-code-to-html').html; Thanks for the guide bro, best regards.