Posted  11 Sep 2009 - 20:35:50

Category: Ruby on Rails

generated iframe designMode have no effect

I was trying to set an iframe to be editable using the designMode property. I was setting this on a generated iframe in a partial, so somehow it would not take. The exact same code worked on a "hard coded" iframe in an "offline" example.

In my case a bit of time to actually generate the iframe seems to do the trick. Seems a bit dodgy but it works fine.

setTimeout( function() { document.getElementById('editorWindow').contentDocument.designMode = "on"; }, 200 );


© SolutionCottage 2008-2011 9/23/2017 11:47:36 AM