library("highlightr") library("tibble") text <- c("This is a good test with some bad words", "bad guy vs good guy") dict <- tibble( feature = c("good", "bad"), bg_colour = c("#2ca25f", "#de2d26") ) highlight(text, dict, output = "tex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.