I am converting a small legacy web that currently uses R, RApache and PHP to use only R and Shiny instead. One of the requirements is to use HTML UI instead of the regular Shiny UI.R.
I have a file that includes some HTML text that should be rendered as such in the webpage. Actually it is assigned to a tag that has assigned as id textoIntro and as class shiny-text-output.
I can easily load the content of this file and assign it to the span using following code in server.R:
library(shiny)
shinyServer(function(input, output) {
# loading file info
introFile
textoIntro
output$textoIntro
})
But by doing this the text is not considered by the browser as HTML. Instead it is shown as "raw text":
lorem ipsum
dolor sit amet...I need it to load as HTML, like this:
lorem ipsum dolor sit amet
I have already tried to use renderPrint, but the effect is the same.
I know there is the HTML Shiny function, but I understand it has to be used in conjunction with the tag function, which as far as I know is intended for UI.R.
Anyone can give me a hint on how to do this? Thanks a lot!