Alex Rivera | Logout

Firefox - designMode: disable image resizing handles

Asked 2008-11-14T07:27:53.790
14

How can I prevent the user from being able to resize an image in designMode? (disable the handles when image is clicked)

Edit
Report

2 Answers

16

This works fine for Firefox:

document.execCommand("enableObjectResizing", false, false);

For IE i've used:

image.attachEvent("onresizestart", function(e) { e.returnValue = false; }, false);

answered 2010-06-12T14:16:18.160
1

Well, you cannot remove those resize handlers neither in Firefox nor IE... at least I couldn't find a solution.

At the end I managed that in Firefox by editing some configuration files from FF installation folder and we don't want to do that, right?

Anyway, if you want to disable resizing if images (but resize handlers will still be visible) just add some css style like:

img {
    width: auto !important;
    height: auto !important;
}

regards, Mihailo

answered 2009-02-05T11:32:29.150

Your Answer