Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

block_text

A block of text


Description

With block_text() we can define a text area and this can be easily combined with other block_*() functions. The text will take the entire width of the block and will resize according to screen width. Like all block_*() functions, block_text() must be placed inside of blocks() and the resultant blocks object can be provided to the body, header, or footer arguments of compose_email().

Usage

block_text(text, align = c("left", "center", "right", "justify"))

Arguments

text

Plain text or Markdown text (via md()).

align

The text alignment to be used for this block of text. The default is "left".

Examples

# Create a block of two, side-by-side
# articles with two `article()` calls
# inside of `block_articles()`, itself
# placed in `blocks()`; also, include some
# text at the top with `block_text()`
email <-
  compose_email(
    body =
      blocks(
        block_text(
          "These are two of the cities I visited this year.
          I liked them a lot, so, I'll visit them again!"),
        block_articles(
          article(
            image = "https://i.imgur.com/dig0HQ2.jpg",
            title = "Los Angeles",
            content =
              "I want to live in Los Angeles.
              Not the one in Los Angeles.
              No, not the one in South California.
              They got one in South Patagonia."
          ),
          article(
            image = "https://i.imgur.com/RUvqHV8.jpg",
            title = "New York",
            content =
              "Start spreading the news.
              I'm leaving today.
              I want to be a part of it.
              New York, New York."
          )
        )
      )
    )

if (interactive()) email

blastula

Easily Send HTML Email Messages

v0.3.2
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>), Joe Cheng [aut], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Ted Goas [cph] (cerberus-meta.html)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.