I'm trying to integrate GrapesJS MJML into my Vue based application and I'm not able to configure it properly. The editor seems to be loaded, however, the result I'm getting is as follows:
https://i.stack.imgur.com/eELsI.jpg
- MJML is not rendered properly
- MJML blocks are not available
This is how I'm initializing the GrapesJS MJML in Vue:
<template>
<section>
<div id="gjs"></div>
<div id="blocks"></div>
</section>
</template>
<script>
import grapesjs from 'grapesjs';
import 'grapesjs-mjml';
import 'grapesjs/dist/css/grapes.min.css';
export default {
name: 'dashboard',
data: function () {
return {
editor: null
}
},
mounted: function () {
this.editor = grapesjs.init({
fromElement: 1,
container : '#gjs',
plugins: ['grapesjs-mjml'],
pluginsOpts: {
['grapesjs-mjml']: {/* ...options */}
},
blockManager: {
appendTo: '#blocks',
blocks: [
]
}
});
}
}
</script>
Should I load the blocks manually? All hints are welcome.