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:
Problem with HTMLArea.init() and using on the fly


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.

 


kelly13
New User

Feb 8, 2005, 5:55 PM

Post #1 of 3 (34715 views)
Shortcut
Problem with HTMLArea.init() and using on the fly Can't Post

Hello!

I use htmlarea alternatively to normal textareas: When a user checks a checkbox the mode toggles and the editor will load on the fly. I have the problem, that sometimes - not always - the error "ERROR! You must called HTMLArea.init() first." appears.
I tried many variants: to call HTMLArea.init() while pageloading or to call just before call the .generate-object-function or to use windows.settimeout()-function to delay the .generate after call the .HTMLArea.init()-function

I can't use the "HTMLArea.onload=function() {" method, because it seems not possible to initialize this function in another function (which I need to load the editor on the fly).

any Ideas?

Thanks in advance

Kelly.


krys
New User

Feb 17, 2005, 7:27 AM

Post #2 of 3 (34561 views)
Shortcut
Re: [kelly13] Problem with HTMLArea.init() and using on the fly [In reply to] Can't Post

I've the same problem.

I'm using HTMLarea in a CMS, on page start where the body is sent, i'cant send the init just because the cms-body isn't inserted and the code doesn't know which name the editor has. This is initiated within the body-tag:


Code
  	</tr>	<tr>		<td>		<script type="text/javascript">			_editor_url = "/includes/htmlarea/";			_editor_lang = "de";		</script>		<script type="text/javascript" src="/includes/htmlarea/htmlarea.js"></script>		<script type="text/javascript">			HTMLArea.init();						function initDocument(area,height) {									var editor = new HTMLArea.replaceAll(); 												editor.generate();			}								</script><script type="text/javascript">HTMLArea.onload = initDocument('content_editor','350px')</script>	<TABLE width="100%" CELLPADDING=0 CELLSPACING=0 BORDER=0>		<FORM ACTION="/dcms/content_list&content_id=332&action=save_content" METHOD=post>



with the old version this wasn't a problem ...



what can i do?


jamirae
Novice

Feb 17, 2005, 8:47 AM

Post #3 of 3 (34543 views)
Shortcut
Re: [krys] Problem with HTMLArea.init() and using on the fly [In reply to] Can't Post

check out this post I think your answer may be here.. at least it worked for me! :)

http://www.htmlarea.com/forum/htmlArea_3_(beta)_C4/htmlArea_v3.0_-_Discussion_F14/htmlArea_fails_to_load_properly_P28794/

 
 
 


Search for (options)