Wrap and color HTML span text
Usage
wrap_and_color(text, color, wrap_length)
Arguments
- text
Character string to be wrapped
- color
Color string (hex or named)
- wrap_length
Integer specifying wrap width
Value
Formatted HTML character string
Examples
text <- "This is a long text that needs to be wrapped and colored."
wrap_and_color(text, color = "blue", wrap_length = 30)
#> [1] "<span style = 'color:blue'>This is a long text that needs<br>to be wrapped and colored.</span>"