Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use links? #20

Open
rctneil opened this issue Jun 16, 2023 · 3 comments
Open

Use links? #20

rctneil opened this issue Jun 16, 2023 · 3 comments

Comments

@rctneil
Copy link

rctneil commented Jun 16, 2023

Hey,

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

@thkukuk
Copy link

thkukuk commented Aug 6, 2023

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.

@dimsemenov
Copy link
Owner

dimsemenov commented Aug 6, 2023

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',

@tianmengzhe
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants