1

I have a html tag tags$a(href='mailto:email@helloWorld.com?subject=myReport&body=practice level = input$pe', "Click here!") and I want to pass input$pe inside my tag. But right now, I just get raw text. Any help would be appreciated.

Akbar
  • 130
  • 8
  • 2
    Does `tags$a(href=paste0('"mailto:email@helloWorld.com?subject=myReport&body=practice level=",input$pe,"'"), "Click here!")` or something similar work. May need to change slightly to get the levels of quoting to cooeprate. – John Paul Dec 11 '17 at 16:22

1 Answers1

3

You can use paste0:

tags$a(paste0("href='mailto:email@helloWorld.com?subject=myReport&body=practice level = ", input$pe,"'"), "Click here!")

If input$pe = abc:

<a>
  href='mailto:email@helloWorld.com?subject=myReport&amp;body=practice level = abc'
  Click here!
</a>
Florian
  • 24,425
  • 4
  • 49
  • 80
  • HI Florian, thanks for the quick response. But the result is plain text instead of being rendered to HTML. – Akbar Dec 11 '17 at 17:59
  • 1
    Hi Akbar, maybe take a look [here](https://stackoverflow.com/questions/24875943/display-html-file-in-shiny-app). Does that solve your issue? – Florian Dec 12 '17 at 08:20