Though probably not a Wysiwyg but a TinyMCE issue, I hope someone listening here can shed a light on this:
I can resize images in both Firefox and IE, but in IE the new image size is not saved back into the HTML. In Firefox this works perfectly ok. IE7, Fx3 and tinyMCE 2.1.3 if that matters. Does anyone have a pointer how to get this resolved?

CommentFileSizeAuthor
#5 tinymce_style.patch638 bytestoniw

Comments

toniw’s picture

To be more specific: resizing by dragging the corner controls on the the image after you select it does not work. Clicking the image button and typing new dimensions in the properties window does work though.

sun’s picture

Status: Active » Fixed

Sorry, please move your question over to: http://tinymce.moxiecode.com/punbb/index.php

toniw’s picture

Status: Fixed » Active

Thanks for the pointer. I have now spent a couple of hours reading their forum and have found a couple of bugs that sound related, but they were either fixed in an earlier release or left open to starve. I don't get the impression they are eager to look into issues with the 2.x version anyway...

So I did some further testing. Before I installed the Wysiwyg-module I was using the TinyMCE-module. I was pretty sure this resizing thing used to work back then. Luckily I had just disabled the module and it was still on my system. So I disabled Wysiwyg and re-enabled TinyMCE, and yes! resizing does work again!
Looking at the generated HTML I notice that after inserting an image it has width and height set like so:

<img width="120" src="/files/images/IMG_2866.thumbnail.JPG" height="120">

After resizing a style attribute is added:

<img width="120" src="/files/images/IMG_2866.thumbnail.JPG" height="120" style="width: 292px; height: 160px">

This style-adding is not happening in Wysiwyg.
It must be some setting Wysiwyg is (not) feeding tinymce, or differently from the TinyMCE-module, but I can't find it...

Please note that both Wysiwyg and TinyMCE are using the exact same version of the tinymce library, so it is almost impossible that this is a moxiecode issue.

sun’s picture

This might be caused by #304243: JavaScript interprets the string "0" as true, which claims that the profile configuration is not properly passed to the JavaScript, which in turn could affect the editor's behavior albeit you have the same profile configuration in both modules.

toniw’s picture

Project: Wysiwyg » Image Assist
Version: 5.x-1.x-dev » 5.x-2.x-dev
Component: Miscellaneous » Wysiwyg Editor Plugin (TinyMCE)
Category: support » bug
StatusFileSize
new638 bytes

Ah, got it!
It appears to be more of a img_assist issue than a Wysiwyg API issue, so moving it to that project's queue.

Since TinyMCE running in IE insists in using the style attribute in the img tag to feed the new image size into the HTML, this style attribute should be included in the extended_valid_elements setting.

 'extended_valid_elements' => array('img[class|src|border=0|alt|title|width|height|align|name|style]'),

This patch fixes the image resizing problem for me.

sun’s picture

Status: Active » Fixed

Well, that's a patch I can apply without any testing.

Thanks, committed to all branches.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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