Internet Explorer: Resizing Images in Web-based HTML Editor

We had an interesting issue come up with an inline HTML editor at my work. The editor is very robust and is nicely built with Javascript so that it doesn't require any downloads or plugins. However, the one thing that we notice is that Internet Explorer doesn't play well with image resizing within the editor (which is based in a textarea).

Here's an example, using TinyMCE's editor:

If you open this editor in Firefox, you'll notice that dragging the image maintains the aspect ratio of the image:


However, in Internet Explorer, it doesn't maintain the aspect ratio at all. Is it possible to constrain the dimensions of the image as it's dragged in Internet Explorer? I've scoured the net and I'm coming up empty on this one! Has anyone worked around this issue by getting the properties back from the DOM object and then properly proportioning the completed image? Any tips or tricks would be appreciated!


  1. 1

    Just a follow-up… one of our great troubleshooters, Marc, identified that he could utilize a keypress event to modify the image and maintain the aspect ratio after a drag event. Here are some resources he passed on:

    MSDN 1
    MSDN 2
    MSDN 3

  2. 2

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.