as.tags.lorem {lorem}R Documentation

Render placeholder text as HTML tags

Description

Renders ipsum() placeholder text as HTML tags using htmltools::as.tags(). By default, paragraphs are rendering ⁠<p>⁠ tags with htmltools::p(), but you may provide your own paragraph wrapper function. In general, you won't need to manually call this function, instead you can just drop ipsum() text into another htmltools::tag().

Usage

## S3 method for class 'lorem'
as.tags(x, wrapper = NULL, ...)

Arguments

x

Object to be converted.

wrapper

A function that takes a character string of a paragraph or chunk of placeholder text and returns an htmltools::tag(). By default, lorem ipsum text is wrapped in htmltools::p().

...

Any additional parameters.

Value

Returns an htmltools::tagList().

Examples

htmltools::div(
  lorem::ipsum(paragraphs = 3)
)

htmltools::tags$ul(
  htmltools::as.tags(
    lorem::ipsum(paragraphs = 3, sentences = 1),
    wrapper = htmltools::tags$li
  )
)


[Package lorem version 1.0.0 Index]