Bruno

Thanks for the tip about Mozilla; this is really useful!

I got an error on this line:

Error: HTMLArea is not defined
Source File:
http://localhost:8080/cocoon/myapp/resources/htmlarea/htmlareaconfig.js


So I changed the location of the <script> tag;
now placed in the forms-htmlarea-styling.xsl file
after the line: 
  <script type="text/javascript"
src="{$resources-uri}/htmlarea/htmlarea.js"></script>

I added
  <script type="text/javascript"
src="{$resources-uri}/htmlarea/htmlareaconfig.js"></script>

And voila!

Thanks again
Derek


>>> [EMAIL PROTECTED] 2004/09/07 09:12:36 AM >>>
On Tue, 2004-09-07 at 08:51, Derek Hohls wrote:
> Bruno
> 
> I have now tried the following:
> 
> 1. Create an external htmlareaconfig.js file with the following:
> 
> 
> // Load plugins
> HTMLArea.loadPlugin("TableOperations");
> HTMLArea.loadPlugin("FullPage");
> 
> function initFunction(areaID) { 
>   // inititalize editor 
>   editor = new HTMLArea("editor"); 
>   // retrive the config object 
>   var config = editor.config; 
>   config.statusBar = false;
>   // do custom configuration 
>       config.toolbar = [
>               [ 
>                 "bold", "italic", "underline", "strikethrough",
> "separator",
>                 "subscript", "superscript", "separator",
>                 "justifyleft", "justifycenter", "justifyright",
> "separator",
>                 "insertorderedlist", "insertunorderedlist",
"outdent",
> "indent", "separator",
>                 "createlink", "separator", "undo", "redo", "paste"  ]
>       ];    
>   HTMLArea.replace(areaID,config);
> }
> 
> function initTable(areaID) { 
>   // inititalize editor 
>   edit = new HTMLArea("editor");
>   edit.registerPlugin(TableOperations);  
>   // retrive the config object 
>   var config = edit.config; 
>   config.statusBar = false;
>   // do custom configuration 
>       config.toolbar = [
>               [ 
>                 "bold", "italic", "underline", "strikethrough",
> "separator",
>                 "subscript", "superscript", "separator",
>                 "justifyleft", "justifycenter", "justifyright",
> "separator",
>                 "insertorderedlist", "insertunorderedlist",
"outdent",
> "indent", "separator",
>                 "createlink", "separator", "undo", "redo", "paste"  ]
>       ];    
>   HTMLArea.replace(areaID,config);
> }  
> 
> 2. Linked to that file via a call from the primary stylesheet:
> 
> <script type="text/javascript"
> src="{$resources}/htmlareaconfig.js"></script>
> 
> But I still have the same issue ie. those text areas using
> function  initFunction() work fine, but those trying to use the
> initTable() , which calls the registerPlugin(TableOperations)
> do not!

the easiest way to debug this kind of problem is to use mozilla or
firefox and look at the javascript console.

One thing I do differently is put the tableoperations between quotes:
edit.registerPlugin("TableOperations");

though it should work without them too.

> 
> I did look on the HTMLarea forums, and the advice there was 
> the same as yours, but there must be something else needed 
> to  make it work?  eg. how does HTMLArea know where to 
> locate  the plugins?

just check the htmlarea.js source, you'll see.

-- 
Bruno Dumon                             http://outerthought.org/ 
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED] 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to