views:

460

answers:

1

I have a web application, HTML wysiwyg editor based on TinyMCE (javascript). The content editing is enabled in Internet Explorer with designMode="on".

If I put an iframe in the edited content:

This is the content I am editing as HTML source.

<iframe src="..."></iframe>
<b>I just added an iframe to my content</b>

The iframe will become visible however Internet Explorer will create resize controls for it. That means that I, as a user, can resize the iframe with the mouse.

I would like to disable that. Does anybody know if it is possible?

+1  A: 

Kind of embarrassing I haven't thought of it before.

The solution is - of course (in javascript):

var comp = doc.getElementById('my_iframe_comp');
comp.oncontrolselect = function() { return false; };

By returning false on controlselect event, the propagation stops and the resize controls do not show up.