library(highlighter)
highlight("
highlight <- function(code, width, height) {
# create the widget
htmlwidgets::createWidget('highlighter', code, width = width, height = height)
}", width = "400px", height = "400px")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.