dimsemenov / photoswipe-dynamic-caption-plugin

A dynamic caption plugin for PhotoSwipe v5. Automatically positions the caption aside or below the image.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use links?

rctneil opened this issue · comments

Hey,

I have added some links into my caption but they don't show up. Are links not allowed?

I have the same question, how to add URLs/links in the caption?
If I use "<a href=..." the URL is shown in the image thumbnail and photoswipe seems to think it's an additional image to show. But it's never shown in the caption text.

There is an example in the demo, you can check the HTML file.

<div class="pswp-gallery__item">
  <a  
    href="https://cdn.photoswipe.com/photoswipe-demo-images/photos/5/img-2500.jpg" 
    data-pswp-width="2500" 
    data-pswp-height="1668" 
    target="_blank">
    <img src="https://cdn.photoswipe.com/photoswipe-demo-images/photos/5/img-200.jpg" alt="Demo image 4" />
  </a>
  <div class="pswp-caption-content">
    Short caption with <a href="https://example.com" target="_blank">the link</a>.
  </div>
</div>
childSelector: '.pswp-gallery__item',

When I use data separation, I use lightbox.loadAndOpen(1) to open the preview, how do I use the plugin