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, 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.
Comment | File | Size | Author |
---|---|---|---|
#6 | example-no-float.png | 142.76 KB | danielstrum |
#4 | Capture_01.png | 169.31 KB | Fulgor |
#4 | Capture_02.png | 159.82 KB | Fulgor |
#4 | Capture_03.png | 145.06 KB | Fulgor |
Comments
Comment #1
acke CreditAttribution: acke commentedYes, it seems lika copy style or copy class is no longer working. I'll try to look into that.
Comment #2
marktheshark CreditAttribution: marktheshark commentedNote 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...
Comment #3
Fulgor CreditAttribution: Fulgor commentedIf 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.
Comment #4
Fulgor CreditAttribution: Fulgor commentedHi 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.
Comment #5
danielstrum CreditAttribution: danielstrum commentedComment #6
danielstrum CreditAttribution: danielstrum commentedHi... 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.
Comment #7
marktheshark CreditAttribution: marktheshark commentedFor me actually any floating / alignment was stripped from the original picture (despite "Copy style" being enabled).
Centering the image via CSS at the moment.
Comment #8
acke CreditAttribution: acke commentedThe 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.
Comment #9
acke CreditAttribution: acke commentedFixed and pushed to HEAD. Going into 1.3 release.
Comment #10
danielstrum CreditAttribution: danielstrum commentedThanks so much acke... worked like a charm.
Comment #11
Fulgor CreditAttribution: Fulgor commentedWorks perfectly, thank you very much acke for your response and your efficiency .... and for this great module !