cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Customizing HTMLarea for a single form element
Date Mon, 30 Aug 2004 11:21:17 GMT
On Mon, 2004-08-30 at 11:48, Derek Hohls wrote:
> I have tried the following (without success) to customize 
> the  HTMLarea script for a single form element...
> 
> In the calling page of the form:
> 
>     <script type="text/javascript" >
>       //reconfigure HTMLArea toolbar
>       function initFunction(areaID) { 
>         // inititalize editor 
>         editor = new HTMLArea("editor"); 
>         // retrive the config object 
>         var config = editor.config; 
>         // do custom configuration
>       	config.toolbar = [
> 	[ 
> 	  "bold", "italic", "underline", "strikethrough", "separator",
> 	  "subscript", "superscript", "separator",
> 	  "copy", "cut", "paste", "space", "undo", "redo" ],
> 	[ "justifyleft", "justifycenter", "justifyright", "separator",
> 	  "lefttoright", "righttoleft", "separator",
> 	  "insertorderedlist", "insertunorderedlist", "outdent",
> "indent", "separator", "separator",
> 	  "createlink"  ]
>       	];    
>         HTMLArea.replace(areaID,config);
>       }
>     </script>
> 
> 
> and in the form template:
> 
>     <ft:widget id="ind_desc"><fi:styling style="width:90%;"
> type="htmlarea" 
> rows="10"/><ft:initFunction>initFunction</ft:initFunction></ft:widget>

> 
> 
> It *appears* as though this should be processed b the 
> forms-htmlarea-styling.xsl stylesheet here:
> 
>     <xsl:choose>
>       <xsl:when test="fi:styling/initFunction">
>         <script language="JavaScript"><xsl:value-of
> select="fi:styling/initFunction"/>('<xsl:value-of
> select="@id"/>');</script>
>       </xsl:when>
>       <xsl:otherwise>
>         <script language="JavaScript">HTMLArea.replace('<xsl:value-of
> select="@id"/>');</script>        
>       </xsl:otherwise>
>     </xsl:choose>
> 
> but the form ends up with:
> 
> <script language="JavaScript">HTMLArea.replace('ind_desc');</script>   
> 
> 
> and not the expected:
> 
> <script language="JavaScript">initFunction('ind_desc');</script>    
> 
> I have also tried :
> 
>     <ft:widget id="ind_desc"><fi:styling style="width:90%;"
> type="htmlarea" 
> rows="10"/><initFunction>initFunction</initFunction></ft:widget>
 
> 
> without success.
> 
> Any pointers or suggestions here would be welcome!
> 
> Thanks
> Derek

try

<ft:widget id="ind_desc">
  <fi:styling style="width:90%;" type="htmlarea" rows="10">
    <initFunction>initFunction</initFunction>
  </fi:styling>
</ft:widget> 

-- 
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