html_2_R | R Documentation |
Convert HTML content to R Shiny tags
html_2_R(html, path = "/html/body/*", prefix = TRUE)
html |
HTML string |
path |
Path where to extract elements. Default to body content. |
prefix |
Whether to prefix elements by tag$... |
A list of R Shiny tags
Alan Dipert, RStudio
if (interactive()) { library(charpente) bs4_card <- '<div class="card" style="width: 18rem;"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some quick example text.</p> <a href="#" class="btn btn-primary">Go somewhere</a> </div> </div>' html_2_R(bs4_card) ## With non standard attributes tag <- "<div data-toggle='accordion'></div>" html_2_R(tag) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.