Trouble displaying HTML reactively using uiOutput() with renderUI() and includeHTML()?

16 views
Skip to first unread message

bloosnail g

unread,
Aug 26, 2016, 2:49:36 PM8/26/16
to Shiny - Web Framework for R
Hello all, 

We are trying to display a corresponding .html file when the user has picked a certain dataset. We can use includeHTML() from mainPanel() to correctly display a set .html file, but when we try to display them reactively by using uiOutput() from the mainPanel() and renderUI and includeHTML() from shinyServer it does not display. An example of the code would be something like:

#ui.R
shinyUI(fluidPage(
  ..
  ..
  mainPanel(
    uiOutput("webpage")
  )
))

#server.R
shinyServer(function(input, output){
  output$webpage<-renderUI({
    includeHTML("./path./to/file.html")
  })
})


I was reading some other threads and some suggested only using the HTML code between <body> and </body>, which did display some but none of the formatting was correct. Does anyone have any ideas on what might be the problem? Thanks.

Daniel
Reply all
Reply to author
Forward
0 new messages