GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS

Home Page:http://grapesjs.com/demo-mjml.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert MJML to Grapesjs JSON data on server side

jay-softsages opened this issue · comments

Hi,
I love the editor!

I have MJML markup and I need to convert them to GrapesJs JSON { styles : [], assets : [], pages : []}
I was using the Unlayer Editor before but now I need to change all the email templates to be supported by GrapesJs.
So I manually converted the Unlayer Json to MJML and now as GrapesJs is a client-side module I need help so that I can run a JS script in the server to change all the Unlayer stored templates to GrapesJs JSON.

My plan -
Unlayer JSON -> MJML -> GrapesJs JSON

If I copy the MJML and paste it into the Import MJML popup of the editor then I get the output and can also get the JSON but I wonder if this is possible in the backend so that I don't have to manually copy and paste the MJML and save hundreds of templates.

I also saw this GrapesJS/grapesjs#3672 which is kind of similar to running GrapesJs on the server side.
I am stuck at the last step to convert MJML to GrapesJs JSON so please help if anybody has already worked with a similar task.

Thanks @artf for solving my issue - GrapesJS/grapesjs#4840