## Not run
if (FALSE) {
library(rclipboard)
library(shiny)
# The UI
ui <- bootstrapPage(
rclipboardSetup(),
# Add a text input
textInput("copytext", "Copy this:", "Zlika!"),
# UI ouputs for the copy-to-clipboard buttons
uiOutput("clip"),
# A text input for testing the clipboard content.
textInput("paste", "Paste here:")
)
# The server
server <- function(input, output) {
# Add clipboard buttons
output$clip <- renderUI({
rclipButton(
inputId = "clipbtn",
label = "rclipButton Copy",
clipText = input$copytext,
icon = icon("clipboard"),
tooltip = "Click me to copy the content of the text field to the clipboard!",
options = list(delay = list(show = 800, hide = 100), trigger = "hover")
)
})
}
shinyApp(ui = ui, server = server)
}
Run the code above in your browser using DataLab