SolutionCottage.com
Posted  11 Sep 2009 - 20:35:50

Category: Ruby on Rails


generated iframe designMode have no effect

Issue:
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.

Solution:
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 );








0 comments:








© SolutionCottage 2008-2011 7/26/2017 1:44:44 AM