2

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?

Ólafur Waage
  • 68,817
  • 22
  • 142
  • 198
  • IE design mode? How do you do that? – Eduardo Molteni Mar 11 '09 at 16:46
  • You need to post quite a bit more information. What application are you using that has an "IE design Mode"? Also, are you trying to disable the controls when others are making changes to your source or is this a problem in the end product? iframe's don't normally have resize controls. – NotMe Mar 11 '09 at 17:10

1 Answers1

3

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.