ijlyttle / bsplus

Shiny and R Markdown addons to Bootstrap 3
http://ijlyttle.github.io/bsplus/
Other
147 stars 23 forks source link

Trouble loading markdown file for modal body #69

Closed simondorfman closed 4 years ago

simondorfman commented 4 years ago

Hello, I'm following the modal example from here:

bs_modal( id = "modal_large", title = "I'm a modal", size = "large", body = includeMarkdown(system.file("markdown", "modal.md", package = "bsplus")) )

I changed modal.md to documentation_modal.md. I have the documentation_modal.md file in the same folder as my .Rmd file. But when I knit the html file and click the button, the model shows a blank body. It doesn't show any of my text in my documentation_modal.md. Have I found a bug? Or am I doing something wrong? Any tips? Thanks!

ijlyttle commented 4 years ago

When you use

system.file("markdown", "modal.md", package = "bsplus")

you are telling R to get "modal.md" from a directory included with the package.

I'd suggest you try

includeMarkdown("documentation_modal.md") 
simondorfman commented 4 years ago

Well that makes a lot of sense. Thanks so much for your help!