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()
.
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 inhtmltools::p()
.- ...
Any additional parameters.
Value
Returns an htmltools::tagList()
.
Examples
htmltools::div(
lorem::ipsum(paragraphs = 3)
)
#> <div>
#> <p>Sit ultrices nisl: in est dictumst nascetur habitant suspendisse torquent hac viverra! Tortor proin ultricies rhoncus iaculis: pretium lacus quis ac nibh. Nunc accumsan diam, dignissim porttitor, rhoncus in sollicitudin mollis. Vel libero nibh suscipit morbi pulvinar vitae imperdiet natoque cubilia nibh ridiculus?</p>
#> <p>Sit posuere tellus, quisque odio quis viverra fringilla, ridiculus risus diam. Ornare id aliquam suspendisse, blandit iaculis praesent dictum ligula duis dis platea. Elementum cursus venenatis blandit aenean bibendum pulvinar odio egestas. Pharetra parturient pellentesque mus dapibus ornare cras quisque mi faucibus. Hendrerit tellus nam, gravida tellus erat.</p>
#> <p>Consectetur aenean malesuada risus etiam porttitor, diam fringilla iaculis torquent purus porttitor himenaeos? Massa justo cubilia – enim, donec justo, enim scelerisque nascetur aliquet. Maecenas eleifend malesuada, vel nibh placerat porta vivamus pulvinar aliquet pulvinar ante hendrerit. Blandit magna vivamus cras vel fames, rhoncus convallis at venenatis praesent per. Ad netus non, duis tristique lacinia nulla libero sagittis ornare viverra.</p>
#> </div>
htmltools::tags$ul(
htmltools::as.tags(
lorem::ipsum(paragraphs = 3, sentences = 1),
wrapper = htmltools::tags$li
)
)
#> <ul>
#> <li>Consectetur rutrum integer proin tellus habitasse potenti himenaeos semper semper proin.</li>
#> <li>Lorem ultricies suscipit nullam suspendisse penatibus dui fermentum?</li>
#> <li>Ipsum hac curae curabitur tortor semper eu interdum.</li>
#> </ul>