Is this temporary? I'm not sure it's a good idea to generate HTML from  
business code. The HTML should be generated in the templates IMO.

WDYT?

Thanks
-Vincent

On Sep 30, 2008, at 6:31 PM, mflorea (SVN) wrote:

> Author: mflorea
> Date: 2008-09-30 18:31:41 +0200 (Tue, 30 Sep 2008)
> New Revision: 13101
>
> Modified:
>   platform/web/trunk/standard/src/main/webapp/templates/ 
> editwysiwygnew.vm
> Log:
> I'm using the WysiwygPlugin to generate the HTML input hidden  
> element that will hold the initial HTML content of the editor. This  
> way the HTML special symbols are escaped inside the value attribute.
>
> Modified: platform/web/trunk/standard/src/main/webapp/templates/ 
> editwysiwygnew.vm
> ===================================================================
> --- platform/web/trunk/standard/src/main/webapp/templates/ 
> editwysiwygnew.vm     2008-09-30 16:24:51 UTC (rev 13100)
> +++ platform/web/trunk/standard/src/main/webapp/templates/ 
> editwysiwygnew.vm     2008-09-30 16:31:41 UTC (rev 13101)
> @@ -28,7 +28,7 @@
> ## If JavaScript is disabled the user will still be able to edit the  
> document using this HTML text area.
> $xwiki.getTextArea($tdoc.content)
> ## We separated the hook of the editor (the previous HTML text area)  
> from editor's input source (the following hidden input)
> -<input type="hidden" id="htmlContent" value="$ 
> {xwiki.wysiwyg.toHTML($tdoc.content, $doc.syntaxId)}"  
> disabled="disabled" />
> +$xwiki.wysiwyg.getInput("htmlContent", $tdoc.content, $doc.syntaxId)
> <script type="text/javascript">
> //<![CDATA[
>     var Wysiwyg0 = {

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to