ijlyttle / bsplus

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

Adding code chunks to accordion #51

Closed royfrancis closed 4 years ago

royfrancis commented 6 years ago
bs_accordion(id="id1") %>%
  bs_append(title="Check this", content="This is so cool.")

Instead of just the text, can I add code chunks with formatting into the content? Also, how do I set the state (collapsed/non-collapsed)?

ijlyttle commented 4 years ago

I think you would need to render the code-chunks into HTML, then capture that as the content that you would send to bs_append().

With an accordion, at most one panel can be open at a time - addressing this in #35