CKEditor (Successor to FCKEditor) no longer uses width
and height
attributes to resize images. Instead it uses inline styles, e.g., style="width: 100px; height="100px"
.
Unfortunately there is no setting in the config that can be overridden.
See: Ticket #4246 Avoid deprecated image attributes (closed bug: fixed)
(Note: width
and height
were not among the deprecated attributes for img
in XHTML strict, nor are the deprecated in HTML5, so I'm not sure why they were included in the fix)
Ironically, I used to hate how these editors used width
/ height
attributes instead of css, but I finally came around to it in certain situations.
Regardless of their decision to use style, CKEditor is one of the best editors around and it would be great if there was some way to use it in conjunction with image_resize_filter.
Does image_resize_filter have to use width
/ height
attributes, or is there a way it could support style properties? Any thoughts?
Comments
Comment #1
quicksketchImage Resize filter already works with CSS height/width instead of properties if they are available. However there's an existing issue relating to border (see #698506: Setting border width causes image to resize as that width).
Comment #2
okeedoak CreditAttribution: okeedoak commentedsubscribing - CKEditor is impressive.
Comment #3
blasthaus CreditAttribution: blasthaus commentedOddly enough, I have Image Resize working with latest stable version of CKEditor when using Firefox and Drupal 6.16, but it won't work using Safari on a Mac. Maybe its a java thing because when you click on the inserted image, it selects the whole thing like text.
Comment #4
quicksketchImage Resize Filter has nothing to do with what browser you're using. It reads the HTML on save. If you can't resize an image in your WYSIWYG, it's an issue with the WYSIWYG. Safari in particular doesn't support the resize handles within FCK/CKeditor.
Comment #5
willemtaildeman CreditAttribution: willemtaildeman commentedYou need to download the latest version with CVS Zach Harkey
Comment #6
quicksketchI've confirmed again that Image Resize Filter works fine with style tags instead of width/height, and checked that it works with CKeditor just fine.
Comment #8
eelke CreditAttribution: eelke commentedIt doesn't seem to work for me though, when I resize an image in CKeditor, the resized image image gets created just fine after I save the node. But when I re-edit the node, the orginal image is displayed in CKeditor so I have to resize the image again.
When I manually edit the HTML to set the img width/height attributes it works just fine.
Is this an issue with CKeditor and the style attributes?
Comment #9
quicksketchImage Resize Filter does absolutely nothing to the original HTML or the editing page, so I don't believe this issue is related.
Comment #10
lunk rat CreditAttribution: lunk rat commentedI found this after trying to resize using Chrome. I tried with Firefox and all was well ...
Comment #11
protools CreditAttribution: protools commentedit's really difficult when 10 image on node, every edit resize again ?
Comment #12
protools CreditAttribution: protools commentedi find this happend when Limit allowed HTML tags was enabled
How I can configurate "allowed HTML tags" right ?
Comment #13
petu CreditAttribution: petu commentedI have the same case. Inline size for images resets inside CKEditor if "Limit allowed HTML tags" was enabled.
How to configure "allowed HTML tags"?
I've solved this issue for me. http://drupal.org/project/htmlpurifier helps me filter tags instead of "Limit allowed HTML tags" option.
Comment #14
quicksketchPer the README.txt, you need to put Image Resize Filter *before* "Limit allowed HTML tags" in the filter order. It is in this position by default, but may need to be adjusted if you have reordered your filters previously.