I want to have an infobox show text over two lines. For example, if I were to combine html and and shiny (like one does for the popups in leaflet):
output$myInfoBox <- renderInfoBox({infobox(paste("Output1: ", myout1, "<br>", "Output2: ", myout2, sep = ""))})
I've tried "<br>", "\n"
, etc. Nothing works.
Thanks!
I was struggling with this as well. The solution I found is to use the shiny HTML() function which explicitly marks text as HTML to avoid escaping.
For example, if you execute infoBox("test_id",paste("test_value",br()))
in the R console, you'll see that the break tag br() is escaped as <br/>
. Thus, the solution is to specify that it is html.
infoBox("test_id",HTML(paste("test_value",br())))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With