| text_wrap | R Documentation |
The text_wrap() adjusts how text is wrapped, or not wrapped, in a tag
element.
text_wrap(x, wrap)
x |
A tag element or .style pronoun. |
wrap |
A boolean. One of,
|
An object of the same type as x.
Other text utilities:
text_alignment(),
text_break(),
text_color(),
text_decoration(),
text_height(),
text_selection(),
text_style(),
text_transform(),
text_weight()
library(htmltools)
div(
style = "width: 5rem;",
.style %>%
background_color(theme_primary()) %>%
text_wrap(TRUE),
"Wrap text to fit the element"
)
div(
style = "width: rem;",
.style %>%
background_color(theme_secondary()) %>%
text_wrap(FALSE),
"This text won't wrap onto a new line."
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.