Features
mj-validator
provides validation to MJML documents with 3 levels ( skip/soft/strict)mj-include
is now recursive, so you can usemj-include
insidemj-include
(related: https://i.imgflip.com/1beg53.jpg)- New tag
mj-style
can be used inmj-head
to add CSS that will be inlined in the generated HTML.mj-style
doesn't support media queries at the moment. mj-font
now enables users to override default MJML fonts like Robotomj-section
now support thedirection
attribute to change the way columns display on desktopmj-social
now supportsinner-padding
to add padding between social networksmj-button
now supports theborder-left/right/bottom/top
andwidth
attributesmj-section
now supports theborder-left/right/bottom/top
attributesmj-column
now supports theborder-left/right/bottom/top
attributes
API Update
mjml
&mj-body
is now mandatory, old MJML syntax with onlymj-body
is removedmjml2html
andMJMLRenderer
will not return a string anymore, it will return an object with :{ errors, html }
Fixes
- Fixed a bug when registering twice a MJML element with the same name
mj-button
should now render correctly on old outlook ( 2000/2003)- Glob pattern ( *.mjml ) should now work in
mjml-cli
- When importing a MJML file using
mj-include
, the.mjml
extension is optional .mjmlconfig
should now finally accepts relative path 🎉- Fixed the
package.json
version lockout to download a specific version - Fixed
mj-group
so it renders correctly on Outlook 2000/2003 &background-color
works as expected