Skip to contents

Change the text a button will copy to the clipboard from the server.

Usage

updateCopyText(id, text, session = shiny::getDefaultReactiveDomain())

Arguments

id

The id of the button.

text

Value to copy to the clipboard when the button is clicked.

session

The session object passed to function given to shinyServer.

Examples

if (interactive()) {
  ui <- fluidPage(
    # Copy a set value
    copyButton("cp2", text = "The client side text", label = "Copy Text")
  )

  server <- function(input, output, session) {
    updateCopyText("cp2", text = "The new server side text!")
  }

  shinyApp(ui, server)
}