Quill is an open-source JavaScript library to generate rich text editors. This R package makes it easy to create Quill editors from R.
library(quill)
quill()
You can install the development version of quill from GitHub with:
# install.packages("pak")
pak::pak("svalvaro/quill")
Checkout the example shiny app at inst/examples/shiny/app.R.
## basic example of functioning in Shiny
library(quill)
ui <- fluidPage(
...
quillOutput("text_editor")
...
)
server <- function(input, output, ...) {
...
output$text_editor <- renderQuill({
quill(toolbar = toolbar_options(code = TRUE))
})
# You can listen what the user is writing in HTML, JSON, and plain text
observeEvent(input$text_editor_content, {
get_editor_content(input$text_editor_content, format = "HTML")
}
...
}