PhotoSwipe icon indicating copy to clipboard operation
PhotoSwipe copied to clipboard

v5-beta custom html data-attribute on element

Open marwl opened this issue 3 years ago • 3 comments

Hi, I tried out v5-beta and it looks great! One small thing though. It would be really nice if photoswipe could pick up the data-pswp-html attribute from the element, the same way it's handled in the array datasource. Thanks

marwl avatar Jul 14 '21 16:07 marwl

For the meantime I am using: lightbox.on('itemData', (e) => { e.itemData.html = e.itemData.element.dataset.pswpHtml; });

marwl avatar Jul 14 '21 16:07 marwl

I support this request!

acwolff avatar Jul 14 '21 17:07 acwolff

Same. I'd love to more easily add HTML to a gallery if possible.

mattneal-stafflink avatar Aug 23 '21 04:08 mattneal-stafflink