Description Usage Arguments Value Examples
Insert the body into a template that has been created using
highlight_template
.
1 | insert_body(template, body)
|
template |
A template that has been created using
|
body |
The text body (a character vector). |
Returns a template with a body inserted (character vector).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | marks <- c(pos = "lightgreen", neg = "pink", neutral = "yellow")
temp <- highlight_template(marks)
body <- paste0("I like <mark class=\"pos\">good</mark>",
" <mark class=\"neutral\">fish</mark>",
", but <mark class=\"neg\">bad</mark> <mark class=\"neutral\">fish</mark>",
" is <mark class=\"neg\">gross</mark>.")
template2html(insert_body(highlight_template(marks), body), file="")
## Not run:
## To an external file
template2html(insert_body(highlight_template(marks), body))
open_html()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.