Skip to content

Instantly share code, notes, and snippets.

@ColinFay
Last active April 22, 2020 11:26
Show Gist options
  • Save ColinFay/849ce29ac5e190302fabf3738648c299 to your computer and use it in GitHub Desktop.
Save ColinFay/849ce29ac5e190302fabf3738648c299 to your computer and use it in GitHub Desktop.
library(shiny)
ui <- function(request){
tagList(
tags$button(
"glop",
onclick = "Shiny.setInputValue('cont', document.documentElement.innerHTML)"
)
)
}
server <- function(
input,
output,
session
){
observeEvent( input$cont , {
cat(input$cont)
})
}
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment