Closed moomerman closed 7 months ago
Hey @moomerman, thanks for opening the issue. I saw something similar with a template of mine:
Can you try removing your <mj-font>
tag from the template and pass a fonts
option to Mjml.to_html/2
instead, like this:
Mjml.to_html(your_mjml, fonts: %{
"Inter": "https://fonts.googleapis.com/..."
}
Then you should be able to use the configured font as before in your template, and it should add an <mj-font>
tag for that font to the rendered HTML.
@moomerman I just published v3.0 with which the issue should be fixed. (No breaking changes from our side, just it uses mrml v3.0 and we keep our major versions in sync with that, see Changelog).
So if you update to v3.0.0 you can now either put the self-closing <mj-font …/>
or <mj-font …></mj-font>
tag to your email template or you can use the fonts
rendering option as in the example above. Both will work.
Thanks @paulgoetze - I updated to the latest release and all looks good now. Thanks for the help!
I've just upgraded our app to the recently released v2 and I'm now getting errors parsing our MJML templates (they were fine on v1.5.0).
I've tested them in the online editor and they render fine there. Here's an example: