shiny html5代码,r - Shiny with HTML UI: - Stack Overflow

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!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值