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:
How to replace ALL textareas on one page using the new HTMLArea RC 3


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.

 


Kayn
New User

Feb 9, 2005, 2:39 PM

Post #1 of 1 (3235 views)
Shortcut
How to replace ALL textareas on one page using the new HTMLArea RC 3 Can't Post

I had a hard time replacing all the textareas with the HTMLArea editor. So I got crazy and tried something different. If you've got multiple textareas on one page and you want all of them to use the HTMLArea editor, here's how.

This code:


Code
 <script type="text/javascript"> 
var editor = null;
function initEditor() {
editor = new HTMLArea("ta");
// comment the following two lines to see how customization works
editor.generate();
return false;
};</script>



Should be replaced with this code.


Code
  

<script type="text/javascript">
var editor = null;
function initEditor() {
editor = new HTMLArea.replaceAll();
// comment the following two lines to see how customization works
editor.generate();
return false;
};


</script>



And that's it! The older versions did not work using this old method. The noteable change is when you define the editor variable - see how it goes from editor = new HTMLArea("ta"); to editor = new HTMLArea.replaceAll();

 
 
 


Search for (options)