
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Displays raw HTML that is not going to be parsed by the MJML engine. Anything left inside this tag should be raw, responsive HTML.
If placed inside <mj-head>
, its content will be added at the end of the <head>
.
<mjml>
<mj-body>
<mj-raw>
<!-- Your content goes here -->
</mj-raw>
</mj-body>
</mjml>
If you use mj-raw to add templating language, and use the minify
option, you might get a Parsing error
, especially when using the <
character. You can tell the minifier to ignore some content by wrapping it between two <!-- htmlmin:ignore -->
tags.
<mjml>
<mj-body>
<mj-raw>
<!-- htmlmin:ignore -->{% if foo < 5 %}<!-- htmlmin:ignore -->
</mj-raw>
<!-- Some mjml section -->
<mj-raw>
{% endif %}
</mj-raw>
</mj-body>
</mjml>
One more possible use of mj-raw is to add text at the beginning of the generated html, before the <!doctype html>
line. For this you need to :
<mjml>
tag, outside of mj-head
and mj-body
position="file-start"
Note that if you put multiple lines in this mj-raw and use the minify option, these lines will be joined into a single line by the minifier. To prevent this you can wrap the content in <!-- htmlmin:ignore -->
tags as explained above.
<mjml>
<mj-raw position="file-start">This will be added at the beginning of the file</mj-raw>
<mj-body>
<!-- Your content goes here -->
</mj-body>
</mjml>
FAQs
mjml-raw
The npm package mjml-raw receives a total of 650,914 weekly downloads. As such, mjml-raw popularity was classified as popular.
We found that mjml-raw demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.