verbatim_popup | R Documentation |
shiny
module that pops up verbatim text.This module consists of a button that once clicked pops up a modal window with verbatim-styled text.
verbatim_popup_ui(id, button_label, type = c("button", "link"), ...)
verbatim_popup_srv(
id,
verbatim_content,
title,
style = FALSE,
disabled = shiny::reactiveVal(FALSE)
)
id |
( |
button_label |
( |
type |
( |
... |
additional arguments to |
verbatim_content |
( |
title |
( |
style |
( |
disabled |
( |
the UI function returns a shiny.tag.list
object
ui <- shiny::fluidPage(verbatim_popup_ui("my_id", button_label = "Open popup"))
srv <- function(input, output) {
verbatim_popup_srv(
"my_id",
"if (TRUE) { print('Popups are the best') }",
title = "My custom title",
style = TRUE
)
}
if (interactive()) shiny::shinyApp(ui, srv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.