cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Configuring the HTMLarea for table operations
Date Mon, 06 Sep 2004 16:17:49 GMT

On Mon, 2004-09-06 at 16:54, Derek Hohls wrote:
> If anyone has experience with the problem below,
>  I'd appreciate hearing a solution..
> 
> I have modified the forms-htmlarea-styling.xsl to 
> include the following  - inserted after the line:
> <script type="text/javascript"
> src="{$resources-uri}/htmlarea/htmlarea.js"></script>
> 
>     <script type="text/javascript" >
>       //reconfigure HTMLArea toolbar
>       function initTable(areaID) { 
>         // inititalize editor 

do first:
HTMLArea.loadPlugin("TableOperations");

note: if you have multiple htmlareas on one page, this only has to
happen once, so in that case you might rather do this in some <script>
in the <head> tag.

>         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);
>       }     
>     </script>
> 
> The form template page is then configured to use it
> for a textarea as follows:
> 
>    <fi:styling type="htmlarea" rows="15" style="width:90%;">
>      <initFunction>initTable</initFunction>
>     </fi:styling> 
> 
> However the HTMLarea does not work at all (ie. get a plain
> textarea) UNLESS I remove the line:
>       edit.registerPlugin(TableOperations);
> 
> Obviously I want to add in all the functionality of table
> operations found in the TableOperations javascript as
> well to the config.toolbar, but cannot do so until the 
> plugin is working....
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message