Replies: 2 comments 1 reply
|
You can do: lightbox.addFilter('itemData', (itemData, index) => {
if (itemData.type === 'html' && itemData.element) {
return {
html: itemData.element.dataset.pswpHtml
};
}
return itemData;
});
You can also store reference to dom element if it's needed, for example: |
|
In this test album I have a lot of html slides. The local video in slide 2 is declared as follows in the Gallery: The MP3 file in slide 5 is declared as <a id="s4" href= "bensound-theelevatorbossanova.mp3" 'data-cropped="true" data-caption='Bossa Nova, music from Bensound'> The PDF file in slide 11 is declared as:
The vimeo video oin slide 17 is declared as The iframe in slide 20 is declared as:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to figure out how to make HTML slides without loading the dataSource from an array. I can't find any examples of how to do this, so I tried the following. It doesn't work. Is there any way to do this?
All reactions