Component not draggable - grapesjs@0.21.2, grapesjs-mjml@1.0.2
oreshkin-ay opened this issue · comments
oreshkin-ay commented
Hey! I'm trying to run some simple code with the latest versions - grapesjs-mjml plugin , but I'm getting an error on DnD. Found similar questions, but all the solutions do not work, could you help?
<link href="https://cdn.jsdelivr.net/npm/grapesjs@0.21.2/dist/css/grapes.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/combine/npm/grapesjs@0.21.2,npm/grapesjs-mjml@1.0.2/dist/index.js"></script>
<style>
body,
html {
height: 100%;
margin: 0;
}
</style>
<div id="gjs">
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-text>My Company</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
</div>
<script type="text/javascript">
const editor = grapesjs.init({
height: '100%',
container : '#gjs',
fromElement: true,
canvas: {
frameContent: '', // default is '<!DOCTYPE html>'
},
plugins: [
'grapesjs-mjml'
],
pluginsOpts: {
'grapesjs-mjml': {
resetDevices: false // so we can use the device buttons
}
}
});
</script>
Artur Arseniev commented
In MJML, components can't be dropped everywhere you want, each one has a specific component/s where it could be placed. By checking your snippet it seems to behave properly so I guess you're simply trying to drop a component in an invalid place.