"> supports-preserve-symlinks-flag 30f7226d9a first commit il y a 3 ans tailwind-color-palette 30f7226d9a first commit il y a 3 ans tailwindcss 30f7226d9a first commit il y a 3 ans thenify 30f7226d9a first commit il y a 3 ans thenify-all 30f7226d9a first commit il y a 3 ans to-regex-range 30f7226d9a first commit il y a 3 ans tr46 30f7226d9a first commit il y a 3 ans ts-interface-checker 30f7226d9a first commit il y a 3 ans uglify-js 30f7226d9a first commit il y a 3 ans underscore 30f7226d9a first commit il y a 3 ans upper-case 30f7226d9a first commit il y a 3 ans util-deprecate 30f7226d9a first commit il y a 3 ans valid-data-url 30f7226d9a first commit il y a 3 ans web-resource-inliner 30f7226d9a first commit il y a 3 ans webidl-conversions 30f7226d9a first commit il y a 3 ans whatwg-url 30f7226d9a first commit il y a 3 ans wrap-ansi 30f7226d9a first commit il y a 3 ans wrappy 30f7226d9a first commit il y a 3 ans y18n 30f7226d9a first commit il y a 3 ans yallist 30f7226d9a first commit il y a 3 ans yaml 30f7226d9a first commit il y a 3 ans yargs 30f7226d9a first commit il y a 3 ans yargs-parser 30f7226d9a first commit il y a 3 ans .yarn-integrity 30f7226d9a first commit il y a 3 ans tum/network_report_server - Gogs: Simplico Git Service

暫無描述

tum 30f7226d9a first commit 3 年之前
..
LICENSE.md 30f7226d9a first commit 3 年之前
README.md 30f7226d9a first commit 3 年之前
package.json 30f7226d9a first commit 3 年之前

README.md

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>

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 :

  • put the mj-raw inside the <mjml> tag, outside of mj-head and mj-body
  • add this attribute on this mj-raw : 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>