Posted by hixster on May 18, 2010 at 3:23pm
3 followers
| Project: | Image Caption |
| Version: | 6.x-2.5 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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?
Comments
#1
I'm having the same issue. subscribing.
#2
In 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.
#3
I made a few changes to the image_caption.js, seems to fix a lot of issues. Here is the patch.
#4
From 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
var alignment = $(this).css('float')My image wrapper then has the following classes:
<span class="image-caption-container right image-caption-container-right">This means I can now add custom padding or margins depending on which side the image is floated on.
Hope that helps someone..