Removing resize handlers on contentEditable div

Ben McCann picture Ben McCann · Dec 18, 2009 · Viewed 13.3k times · Source

I created a contentEditable div to use as a rich textarea. It has resize handlers around it that I'd like to get rid of. Any idea how I'd do this?

Edit: This appears to be happening because I am absolutely positioning the div, so Firefox adds an infuriating _moz_resize attribute to the element which I cannot turn off.

alt text

Answer

ZoogieZork picture ZoogieZork · Dec 18, 2009

Just as a side note, you can disable Firefox's automatic resize handle feature by sending the (somewhat poorly-documented) enableObjectResizing command to the document:

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

AFAIK, this can only safely be done once the document has loaded, and there's no way I know of to disable the grabber, which is a separate feature.