save: Save

Description Usage Arguments Value Functions See Also Examples

Description

Save your email with .mjml extension.

Usage

1
2
3
4
5
6
7
mj_save_mjml(mjml, output, ...)

mj_validate_mjml(input)

mj_convert_html(input, output)

mj_save(mjml, output, ...)

Arguments

mjml

MJML email as returned by mj_ml.

...

Any other option to be passed to writeLines.

input, output

input and output files.

Value

Path to output.

Functions

See Also

https://mjml.io/documentation/#command-line-interface

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
mj_set("./node_modules/.bin/mjml")

mj_ml(
  mj_body(
    mj_container(
      mj_section(
        mj_column(
          mj_text("First column")
        ),
        mj_column(
          mj_text("Second column")
        )
      ),
      mj_section(
        mj_column(
          mj_image(paste0("https://media.vanityfair.com/photos/",
                          "54cbf3da998d4de83ba3602a/master/w_960,",
                          "c_limit/image.jpg")
                   )
        )
      )
    )
  )
) %>%
  mj_save("email.html")

JohnCoene/mjml documentation built on March 19, 2018, 5:07 a.m.