views:

90

answers:

1

Is there a way to remove the attribute '_moz_resizing="true"' added by Firefox from <TABLE> to avoid giving user the possibility to resize table in design mode (when contentEditable=true).

A: 

Yes.

document.designMode = "on";
document.execCommand("enableObjectResizing", false, "false");
document.execCommand("enableInlineTableEditing", false, "false");

In Firefox, the resizing controls on a table often appear at the same time as the inline table editing controls, so you probably really want to turn off both of them.

If your editable content is inside an iframe, be aware that changes to the CSS position of the ancestor iframe will reset the effects of these commands.

I have prepared a simplified test page that shows this solution in action.

Chris Nielsen