bs4Dash icon indicating copy to clipboard operation
bs4Dash copied to clipboard

includeRMD messes up the dashboard

Open shambhu112 opened this issue 4 years ago • 1 comments

I have tab in my bs4dash that knits an RMD files and renders the out put in a tab output$markdown <- renderUI({ HTML(markdown::markdownToHTML(knitr::knit(rmd_file, quiet = TRUE))) })

The problem I run into is that doing the above messes the Fonts from bs4dash. Do you know what I should be doing to avoid messing up bs4dash fonts when I use - HTML(markdown::markdownToHTML(knitr::knit(rmd_file, quiet = TRUE)))

shambhu112 avatar Apr 26 '21 19:04 shambhu112

I know that this is a year late, but I was struggling with the same issue and found a solution here:

https://stackoverflow.com/questions/72474086/layout-in-r-shiny-app-that-include-r-markdown-file

output$rec_md_render <-  renderUI({
    HTML(markdown::markdownToHTML(knit(tempLetter, quiet = T), fragment.only = T)) 
})

the "fragment.only=T" part ensures that the resulting HTML made out of the knitted .Rmd does not "propagate" to the whole dashboard. Or so it seems :)

akulumbeg avatar Aug 07 '22 21:08 akulumbeg