Hi, even with the "Copy Style" checked jcaption does not copy the styles applied to the image with CKeditor. Only the width of the image appears in the code (class="caption none"). The "float" and "margin" styles are not copied and applied (although they appear in "img class"). So the text is below the image instead of the surround.
I use CKeditor, Insert and Colorbox modules.

CommentFileSizeAuthor
#6 example-no-float.png142.76 KBdanielstrum
#4 Capture_01.png169.31 KBFulgor
#4 Capture_02.png159.82 KBFulgor
#4 Capture_03.png145.06 KBFulgor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acke’s picture

Assigned: Unassigned » acke
Category: support » bug

Yes, it seems lika copy style or copy class is no longer working. I'll try to look into that.

marktheshark’s picture

Note that the Copy Style option mentions "Copy style from image to container div.", but the container is a paragraph (p), at least in 7.x. Did it use to be a div?

Anyway, as long as it's an inline element like the img it captions, it should be OK...

Fulgor’s picture

If you look in my code it seems to be a div. And the Copy Style only copy the width in the div. Margin and float are missing. The styles applied in CKEditor are : width: 218px; height: 170px; float: left; margin-left: 20px; margin-right: 20px;
I made a mistake somewhere ? Thanks for help.

<div class="field-item even" property="content:encoded">
<p>
<div class="caption none" style="width: 258px;">
<a class="colorbox colorbox-insert-image init-colorbox-processed cboxElement" title="Une belle légende" rel="gallery-all" href="http:/sites/default/files/images_partie_3/test_image.jpg" style="">
<p style="font-size: 10px; color: #333333; font-style: italic; text-align: center; line-height: normal;">Une belle légende</p>
</div>
Blah Blah Blah....
</p>
</div>
Fulgor’s picture

FileSize
145.06 KB
159.82 KB
169.31 KB

Hi Acke and marktheshark,
In CKEditor I changed (p) in (div), but it changes nothing.
I can not run properly Colorbox and jCaption together through CKEditor.
jCaption works perfectly integrating the images by a field.
Could you take a look at my screenshots, I do not know what to do.
- Capture_01: without the Colorbox class.
- Capture_02: I added the Colorbox class.
- Capture_03: I added a link to the image in addition to the class Colorbox.
Note that the caption container is not align in the 2 first captures.
Thank you both for your help.

danielstrum’s picture

danielstrum’s picture

FileSize
142.76 KB

Hi... I am having a similar problem with exactly the same set-up. My problem is that the float is not being copied. See attached screen-shot.
Thanks for the great module.

marktheshark’s picture

For me actually any floating / alignment was stripped from the original picture (despite "Copy style" being enabled).

Centering the image via CSS at the moment.

acke’s picture

The problem is extra element (an a) between the img and the div. When the image isn't linked the copyClass works fine. I'll try to find a solution for this.

acke’s picture

Status: Active » Fixed

Fixed and pushed to HEAD. Going into 1.3 release.

danielstrum’s picture

Thanks so much acke... worked like a charm.

Fulgor’s picture

Works perfectly, thank you very much acke for your response and your efficiency .... and for this great module !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.