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

Liste Import Event #104

Closed FlashPapa closed 4 years ago

FlashPapa commented 5 years ago

Hi all ! How can we listen 'before import mjml' ? To test if there is & exist in code imported ? Thanks

DRoet commented 4 years ago

In the v0.2.3 release you can now listen for the import event

editor.on('run:mjml-import:change', (mjml) => {
  console.log(mjml);
})

hopefully this covers this use case

karlitaviky811 commented 1 year ago

Hi, I'm using the latest version of grapesjsmjml and this solution doesn't work for me. I need to listen to the event when importing, can someone help me?