GrapesJS / mjml

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

I'm having trouble loading an external mjml template on Vuejs #254

Closed Bariskau closed 3 years ago

Bariskau commented 3 years ago
<template>
<div id="gjs"></div>
</template>
async mounted() {
    const selectedTemplateId = this.$route.params.emailID
    await this.getEmail(selectedTemplateId)

    grapesJS.init({
      container : '#gjs',
      avoidInlineStyle : false,
      plugins: [grapesJSMJML],
      pluginsOpts: {
        [grapesJSMJML]: {/* ...options */}
      },
      components: this.email.template // string mjml template,
      storageManager: {
        autosave: false,         // Store data automatically
        autoload: false,         // Autoload stored data on init
      }
    });
  }

When I try to import mjml template with Vue, the process is successful. But the styles of the columns are not correct. When I manually check the mjml template that I imported, there is no problem.

the problem i'm having https://ibb.co/1RgdMVx