view_html <- function(x) {
# 'force' is necessary because htmltools changes the working directory
html <- force(x)
htmltools::html_print(html)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.