Wondering what’s next for npm?Check out our public roadmap! »

    mjml-raw

    4.10.0 • Public • Published

    mj-raw

    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>

    try it live

    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>

    Keywords

    none

    Install

    npm i mjml-raw

    DownloadsWeekly Downloads

    185,545

    Version

    4.10.0

    License

    MIT

    Unpacked Size

    4.26 kB

    Total Files

    4

    Homepage

    mjml.io

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar