经过大量搜索,我很难找到如何:
- MJML处理动态数据和模板插值
我期待类似的东西:
import { mjml2html } from 'mjml';
const context = {
message: 'Hello World'
};
const view = mjml2html(template, context);
<mjml>
<mj-body>
<mj-container>
<mj-section>
<mj-column>
<mj-text>{message}</mj-text>
</mj-column>
</mj-section>
</mj-container>
</mj-body>
</mjml>