Closed dealancer closed 2 years ago
yes, you may use captionContent
option
captionContent: (slide) => {
console.log(slide.data);
return slide.data.myCaption;
}
assuming slide data is something like:
{
src: 'image.jpg',
width: 300,
height: 300,
myCaption: 'caption text'
}
It looks like this plugin requres PhotoSwipeLighbox object, but we also make it run for PhotoSwipe one?
For now - no, but I'll probably allow it in future versions, feel free to submit pr too.
Thanks!
Is there a way this plugin can be used when using data source? See https://photoswipe.com/data-sources/. If so please provide an example.
It looks like this plugin requres PhotoSwipeLighbox object, but we also make it run for PhotoSwipe one?