ijlyttle / bsplus

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

`bsplus` only works for `html_document` but not `bookdown`? #94

Open chunyunma opened 3 years ago

chunyunma commented 3 years ago

I wanted to include a modal window in an rmarkdown file. The following code worked perfectly in a output: html_document, but when I plugged the same code into a output: bookdown::gitbook chapter, it stopped working. The content of body would be displayed above the button, and the button would not be responsive. This happens even if I replace body with plain text. Curious if I missed something or the bsplus package is not designed for bookdown type of files?

Thank you in advance!

# sample code
bsplus::bs_modal(
                id = "test", 
                title = "A test", 
                body = bsplus::bs_carousel_image(
                    src=knitr::image_uri(
                    here::here("images", "test.png")))
                )

bsplus::bs_button("click me", button_type="primary") %>% 
  bsplus::bs_attach_modal("test")