bruno 2004/04/15 11:10:49
Modified: src/blocks/forms/samples/resources forms-htmlarea-styling.xsl Log: Allow to specify a custom "initFunction" to setup the HTMLArea. This enables to modify the HTMLArea configuration and configure plugins. Revision Changes Path 1.3 +8 -1 cocoon-2.1/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl Index: forms-htmlarea-styling.xsl =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- forms-htmlarea-styling.xsl 11 Mar 2004 02:56:31 -0000 1.2 +++ forms-htmlarea-styling.xsl 15 Apr 2004 18:10:49 -0000 1.3 @@ -45,7 +45,14 @@ <xsl:apply-templates select="fi:value/node()" mode="htmlarea-copy"/> </textarea> <xsl:apply-templates select="." mode="common"/> - <script language="JavaScript">HTMLArea.replace('<xsl:value-of select="@id"/>');</script> + <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> </xsl:template> <xsl:template match="@*|*" mode="htmlarea-copy">