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:
multiple areas insertHTML editor is not defined error


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.

 


vhawk
New User

Jan 26, 2005, 2:35 AM

Post #1 of 1 (2590 views)
Shortcut
multiple areas insertHTML editor is not defined error Can't Post

I'm using multiple htmlareas and all is fine except when I try and use the insertHTML function to try and reset any of the areas to default values. The error I get is:

Error: editor is not defined

on the line when I call the insertHTML function ie editor.insertHTML('my html code').

FYI I've tried to use editor.focusEditor() before insertHTML() but get the same error when I call editor.focusEditor()


Code
  <script type="text/javascript">   
<!--
HTMLArea.loadPlugin("ContextMenu");
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("SpellChecker");

function initDocument() {
var editor = new HTMLArea("proDevBrd");
editor.registerPlugin(ContextMenu);
editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();

var editor2 = new HTMLArea("stuNum");
editor2.registerPlugin(ContextMenu);
editor2.registerPlugin(TableOperations);
editor2.registerPlugin(SpellChecker);
editor2.generate();

var editor3 = new HTMLArea("resBreakdown");
editor3.registerPlugin(ContextMenu);
editor3.registerPlugin(TableOperations);
editor3.registerPlugin(SpellChecker);
editor3.generate();
}


function resetTable(){
editor.insertHTML('my html code');
}
function resetTable2(){
editor2.insertHTML('my html code');
}
function resetTable3(){
editor3.insertHTML('my html code');
}
//-->
</script>



(This post was edited by vhawk on Jan 26, 2005, 2:45 AM)

 
 
 


Search for (options)