Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys,
Have the caption working o.k. but it seems my alignment isn't being propagated. I have assigned the alignment to the image.
The container span has the following class:
image-caption-container image-caption-container-
Any clues?
Comment | File | Size | Author |
---|---|---|---|
#3 | rewrite_image_caption_js.patch | 1.7 KB | pwaterz |
Comments
Comment #1
delmarr CreditAttribution: delmarr commentedI'm having the same issue. subscribing.
Comment #2
delmarr CreditAttribution: delmarr commentedIn image_caption.js If you change line 14 to
$(this).wrap("<span class=\"image-caption-container\" style=\"display:block;" + style + "; \"></span>");
This seems to fix my issue. It's on my list to learn to submit patches, but i hope this will do for now.
Comment #3
pwaterz CreditAttribution: pwaterz commentedI made a few changes to the image_caption.js, seems to fix a lot of issues. Here is the patch.
Comment #4
hixster CreditAttribution: hixster commentedFrom a few goes at getting image captions to work and my experience with this module- it seems that the 'alignment' variable never gets a value.
Maybe its' the way I have my WYSIWYG editor setup -I never get an align="value" in the final out put HMTL, only a style value with float="left" or "right"
So with that in mind , I changed line 9 in the image_caption.js to read
My image wrapper then has the following classes:
This means I can now add custom padding or margins depending on which side the image is floated on.
Hope that helps someone..