add_script_to_rmd {esmtools} | R Documentation |
This function adds custom CSS and JavaScript code to an R Markdown document. The function reads CSS and JavaScript code from specific files (e.g., 'button.css' and 'button.js') located in the "esmtools" package. It then creates appropriate HTML elements to include the code within the R Markdown document. This function is automatically called when importing the esmtools package and rendering the rmarkdown package.
add_script_to_rmd()
Returns an text object marked as HTML containing the combined CSS and JavaScript code stored within the inst folder of the package.
if (interactive()) {
add_script_to_rmd()
}