Problem/Motivation
Inline images don't have captioning when entering the photoswipe.
Steps to reproduce
Click on a photoswipe and see there is no caption
Proposed resolution
In PhotoswipeInilne.php add a setAtttribute to the 'data-overlay-title' to pass the caption to the photoswipe module. This could be customized to in settings so the content creator could indicate taking the caption from alt, title, or a figcaption tag within the figure container.
Remaining tasks
Changes to the code
User interface changes
Add something in settings to allow the user to indicate which attribute to pass as the caption (i.e. alt, title, figcaption)
API changes
None that I can see
Data model changes
None
Issue fork photoswipe_inline-3573219
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
nickolajAdds captioning support by setting the `data-overlay-title` attribute on PhotoSwipe anchor elements. Includes a configurable filter setting (alt, title, or figcaption) and config schema.
Comment #7
ivnish