A directory of browser-based WYSIWYG editors


Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
htmlArea inserted in an iframe don' load

The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.



Nov 18, 2004, 4:55 AM

Post #1 of 4 (3081 views)
htmlArea inserted in an iframe don' load Can't Post

Hi folks,

I just installed htmlArea and found it wonderfull.
It will be an ideal replacement for another similar module.

But, It works successfully as long as I insert it directly in a top level webpage ... and I need to use it as a component between other in an Iframe.

For instance, the following code is reduced at max. It produces dynamically the content of the iframe in wich the htmlarea should be inserted.

The code written by the document.write() works perfectly when inserted in a separated webpage and starts a new editor . But it does nothing ( more strange, IE hangs with no error, and Mozilla javascript console displays no errors but the page never finish to load ).

<script language=javascript >
function start () {
ref_iframe_des_solutions = document.getElementById('iframe_des_solutions');;
'<script language=javascript > _editor_lang = "en"; _editor_url = "htmlarea/"; <\/script>'+
"<script language=javascript src='htmlarea/htmlarea.js' ><\/script>\n"+
"<script language=javascript >\n"+
'function lance () { '+
'editor = new HTMLArea("ta");'+
"</head><body onLoad=lance() bgcolor=lightgrey id=conteneur topmargin=0 leftmargin=1 >"+
'<textarea id=ta rows=10 cols=50></textarea></body></html>');

<iframe id='iframe_des_solutions' width=400 height=300 ></iframe>
<br><input type=button value='Start' OnClick=start() >

New User

Nov 18, 2004, 10:40 AM

Post #2 of 4 (3063 views)
Re: [lucky] htmlArea inserted in an iframe don' load [In reply to] Can't Post


I'm using HTMLArea in an IFrame, but I put the editor code into a seperate file, then load it into the target IFrame. Maybe you can try that instead. It definitely works, I've been using it that way for ages.


Nov 18, 2004, 10:59 AM

Post #3 of 4 (3057 views)
Re: [talcyon] htmlArea inserted in an iframe don' load [In reply to] Can't Post

good idea ! I'll try it tomorrow
I've only a little doubt, because I need to dynamically add/delete dom elements in the iframe from the parent window, and I'm not sure that I'll be allowed to do so when the src property of the iframe is set.

But, anyway, thanks you for this good idea Wink
I'll tell you wether it works or not in my case, tomorrow Smile


Nov 19, 2004, 1:41 AM

Post #4 of 4 (3036 views)
Re: [lucky] htmlArea inserted in an iframe don' load [In reply to] Can't Post

I just tested the solution to call a static html page in the iframe, with the editor code in it: it works fine Wink

And I can use any dom methods to change the static html page from the parent ( no security error: now I remember that a security error only happens when you try to modify a (i)frame which is loaded from another domain name ).

So, problem solved Smile


Search for (options)