How to create TextArea as input in a Shiny webapp in R?

前端 未结 6 2042
春和景丽
春和景丽 2020-12-13 00:47

I am trying to create simple webapp where I want to take in multiline input from user using HTML textarea control. Is there any out of the box way of creating such an input

6条回答
  •  [愿得一人]
    2020-12-13 01:03

    You can add a textarea using tags and it should be picked up by Shiny automatically:

    tags$textarea(id="foo", rows=3, cols=40, "Default value")
    

    Or if you're more comfortable with straight HTML you can also do

    HTML('')
    

    In either case, input$foo should reflect the textarea's value.

提交回复
热议问题