htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

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.

 


lucky
Novice

Nov 18, 2004, 4:55 AM

Post #1 of 4 (2906 views)
Shortcut
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 ).


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

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


talcyon
New User

Nov 18, 2004, 10:40 AM

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

Lucky,

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.


lucky
Novice

Nov 18, 2004, 10:59 AM

Post #3 of 4 (2882 views)
Shortcut
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


lucky
Novice

Nov 19, 2004, 1:41 AM

Post #4 of 4 (2861 views)
Shortcut
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)