mjml-text align="justify" : Attribute align has invalid value
See original GitHub issueDocs (from mjml.io, and the README.md from mjml-text package) says that allowed attributes for align are “left, right, center, justify”. The arguments listed in attributes checking enum from packages/mjml-text/src/index.js
are only left, right and center. So when using align="justify"
the compiler raises an error/warning.
Using 4.1.0 nodejs mjml2html with no option :
[
{
"line": 55,
"message": "Attribute align has invalid value: justify for type Enum, only accepts left, right, center",
"tagName": "mj-text",
"formattedMessage": "Line 55 of /api (mj-text) — Attribute align has invalid value: justify for type Enum, only accepts left, right, center"
},
I couldn’t find a word on align=“justify” being deprecated, so the error should be in enum : https://github.com/mjmlio/mjml/blob/f7051e5054aa88da489a5fa5f16a81176c56b435/packages/mjml-text/src/index.js#L9
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Invalid align attribute HTML - css - Stack Overflow
But I get this strange error: The 'align' attribute is invalid - The value 'middle' is invalid according to its datatype 'Union' -...
Read more >Applying text-justify attribute to List Report does not have ... - IBM
Symptom. All justified text will be simply rendered as a default style. Cause. HTML browser can not recognize the text-align attribute ...
Read more >mjml-divider: Versions - Openbase
Prevent the validator from throwing an error when mjml is provided as Json ... #1272 mjml-text Attribute align="justify" is no longer considered as...
Read more >mjml-text - npm
attribute unit description default value
color color text color #000000
font‑family string font Ubuntu, Helvetica, Arial, sans‑serif
font‑size px text size 13px
Read more >text-align: justify? - OutSystems
But text still have default align left. What am I doing wrong? 0. 0. 19 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @pawl-bb this has been fixed in the new release mjml4.2-beta, which you can install with
npm install mjml
, you can check if it solves the problemhi @pawl-bb thanks for reporting this, it will be fixed in the next version