zalify / easy-email-editor

Easy Email Editor is a feature-rich, top open-source SaaS email editor based on React and MJML.
https://email.maocanhua.cn/
MIT License
1.59k stars 329 forks source link

Export MJML not working on demo? #215

Closed Robw94 closed 1 year ago

Robw94 commented 1 year ago

Was just trying out the dynamic data demo, when clicking 'export HTML or export mjml' the template variables are not replaced when chucking them into a html/mjml viewer.

Am I doing something wrong? I have not changed anything on the link, just wanted to see if it replaced the merge tags on export

https://email.maocanhua.cn/editor?id=834&userId=107

m-Ryan commented 1 year ago

The mergetag in the demo is only used as variables. The exported template does not do the replacement step. To replace template variables, just add the following code. https://github.com/zalify/easy-email/blob/2b0739c4068e6ee3ed05c87552e2244babada687/demo/src/pages/Editor/index.tsx#L357-L359

image