Is there a way to determine the cursor position within a textAreaInput in a shiny application?
library(shiny)
ui <- fluidPage(
textAreaInput("hop"
,label="textarea",value = "Supercalifragilisticexpialidocious"),
verbatimTextOutput("out")
)
server <- function(input, output, session) {
output$out <- renderText({
"I am looking to retrieve the cursor position (an integer?) \n inside the textArea field"
})
}
shinyApp(ui, server)
I believe utilizing JavaScript may be necessary, but I'm unsure of where to begin.
Best regards,