trvswgnr / bs5-lightbox

A pure JS lightbox gallery plugin for Bootstrap 5 based on the Modal and Carousel components
https://trvswgnr.github.io/bs5-lightbox/
MIT License
129 stars 28 forks source link

Non-Multimedia Content? #10

Closed dwasyl closed 2 years ago

dwasyl commented 2 years ago

Can this lightbox be used to display a <div></div> with a small table of data, or only multimedia content? Seemingly some tweaks would be required, but I wasn't sure where.

trvswgnr commented 2 years ago

Currently you can't directly add HTML into the lightbox, but you could add your content to another page and then create a lightbox with that url as seen here: https://trvswgnr.github.io/bs5-lightbox/#remote-content

dwasyl commented 2 years ago

That makes sense, I was just hoping to avoid the extra http call and add it directly or have an inline div elsewhere on the page.

trvswgnr commented 2 years ago

@dwasyl I agree that would be useful. I’ll definitely consider it in the next release.

trvswgnr commented 2 years ago

@dwasyl I added this in release v.1.8.0. You can see an example here: https://trvswgnr.github.io/bs5-lightbox/#custom-html

dwasyl commented 2 years ago

@trvswgnr amazing! That's great, thanks!