OK, one client forced me to make htmlarea work 100% for him and I finally got it loading 100% of times.
I put this in the header.thtml in the head area:
Text Formatted Code
<script type="text/javascript">
_editor_url = "/htmlarea/";
_editor_lang = "en";
</script>
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
And this replacing the textarea of the "introtext" of the storyeditor.thml:
Text Formatted Code
<textarea name="introtext" id="introtext" cols="98" rows="24" wrap="virtual">{story_introtext}</textarea>
<br>
<script type="text/javascript">
//load the ImageManage + Editor plug-in
HTMLArea.loadPlugin("ImageManager");
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("SpellChecker");
</script>
<script type="text/javascript">
var editor = new HTMLArea("introtext");
// var config = new HTMLArea("content");
var config = editor.config;
config.width = '450px';
config.height = '200px';
editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();
</script>
And this goes to the bodytext:
Text Formatted Code
<textarea name="bodytext" id="bodytext" cols="98" rows="36" wrap="virtual">{story_bodytext}</textarea><br>
<script type="text/javascript">
var editor = new HTMLArea("bodytext");
// var config = new HTMLArea("content");
var config = editor.config;
config.width = '450px';
config.height = '320px';
editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();
</script>
Make sure you add the id="?????" and match it in the Java script.
Tell me if you still have problem. BTW, these codes work with HTMLArea 3.0rc1's htmlarea.jsp version 1.80 from the CVS. I haven't tried them with the new ones yet.
Sam