GrapesJS / mjml

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

Drag and Drop of <mj-wrapper> is not wokring #186

Closed ramkychowdary closed 4 years ago

ramkychowdary commented 4 years ago

HI @artf

Thanks for your hardwork. I am trying to use Grapes JS with MJML plugin I am having multipule issues Can you please tell me how to slove these issues.

I added this code for mj-wrapper for editor

const blockManager = editor.BlockManager; blockManager.add('mj-wrapper', { label: 'Wrapper', content: `

  <mj-section border-left="1px solid #aaaaaa" border-right="1px solid #aaaaaa" padding="20px" border-bottom="1px solid #aaaaaa">
    <mj-column border="1px solid #dddddd">
      <mj-text padding="20px"> First line of text </mj-text>
      <mj-divider border-width="1px" border-style="dashed" border-color="lightgrey" padding="0 20px" />
      <mj-text padding="20px"> Second line of text </mj-text>
    </mj-column>
  </mj-section>
</mj-wrapper>`
});

I can see these wrapper blocks in editor. But when I drag and drop in screen not nothing is coming properly.

1) when I drag the wrapper nothing is coming inside the <mj-body/

2) When I drag and droping the and I want add padding-top and padding-left to 0px by default How I can add these by default while drag and drop

ramkychowdary commented 4 years ago

@artf Can you please provide any solutions for this issue.

DRoet commented 4 years ago

this was fixed by https://github.com/artf/grapesjs-mjml/pull/142, just needs a new release which I will try to setup this week