View source: R/updateCopyText.R
updateCopyText | R Documentation |
Change the text a button will copy to the clipboard from the server.
updateCopyText(id, text, session = shiny::getDefaultReactiveDomain())
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. |
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) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.