Index: src-wad/src/org/openbravo/wad/controls/WADHtmlMemoJSRegistration.xml
===================================================================
--- src-wad/src/org/openbravo/wad/controls/WADHtmlMemoJSRegistration.xml	(revision 0)
+++ src-wad/src/org/openbravo/wad/controls/WADHtmlMemoJSRegistration.xml	(revision 324)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<REPORT>
+  <template file="WADHtmlMemoJSRegistration.html"/>
+  <PARAMETER id="fieldColumnName" name="columnName"/>
+
+  <DISCARD id="discard"/>
+</REPORT>
Index: src-wad/src/org/openbravo/wad/controls/WADHtmlMemoJSRegistration.html
===================================================================
--- src-wad/src/org/openbravo/wad/controls/WADHtmlMemoJSRegistration.html	(revision 0)
+++ src-wad/src/org/openbravo/wad/controls/WADHtmlMemoJSRegistration.html	(revision 324)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+<FIELD_TMP>
+    xinha_editors = null;
+    xinha_init    = null;
+    xinha_config  = null;
+    xinha_plugins = null;
+
+    // This contains the names of textareas we will make into Xinha editors
+    xinha_init = xinha_init ? xinha_init : function() {
+      xinha_plugins = xinha_plugins ? xinha_plugins : [];
+      if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
+      xinha_editors = xinha_editors ? xinha_editors : ['<PARAMETER_TMP id="fieldColumnName"/>'];
+      xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
+      xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
+      HTMLArea.startEditors(xinha_editors);
+    }
+    //window.onunload = HTMLArea.collectGarbageForIE;
+</FIELD_TMP>
Index: src-wad/src/org/openbravo/wad/controls/WADHtmlMemo.java
===================================================================
--- src-wad/src/org/openbravo/wad/controls/WADHtmlMemo.java	(revision 0)
+++ src-wad/src/org/openbravo/wad/controls/WADHtmlMemo.java	(revision 324)
@@ -0,0 +1,24 @@
+package org.openbravo.wad.controls;
+
+import org.openbravo.xmlEngine.XmlDocument;
+
+public class WADHtmlMemo extends WADMemo {
+
+	protected void generateJSCode() {
+		super.generateJSCode();
+		addImport("Xinha", "../../../../../web/js/xinha/htmlarea.js");
+
+		// getHTML()
+		String validation = "frm.inp" + getData("ColumnNameInp") + ".value = xinha_editors."
+				+ getData("ColumnName") + ".getHTML();\n";
+		this.setValidation(validation + this.getValidation());
+
+		XmlDocument xmlDocument = getReportEngine().readXmlTemplate(
+				"org/openbravo/wad/controls/WADHtmlMemoJSRegistration")
+				.createXmlDocument();
+
+		xmlDocument.setParameter("columnName", getData("ColumnName"));
+		this.addJSCode("WADHtmlMemo", replaceHTML(xmlDocument.print()));
+		setOnLoad("xinha_init();");
+	}
+}
Index: src-wad/src/org/openbravo/wad/controls/WADMemo.java
===================================================================
--- src-wad/src/org/openbravo/wad/controls/WADMemo.java	(revision 322)
+++ src-wad/src/org/openbravo/wad/controls/WADMemo.java	(revision 324)
@@ -35,7 +35,7 @@
     generateJSCode();
   }
 
-  private void generateJSCode() {
+  protected void generateJSCode() {
     addImport("ValidationTextArea", "../../../../../web/js/default/ValidationTextArea.js");
     generateMessages();
     if (getData("IsMandatory").equals("Y")) {
Index: src-wad/src/org/openbravo/wad/Template_Edition.html
===================================================================
--- src-wad/src/org/openbravo/wad/Template_Edition.html	(revision 322)
+++ src-wad/src/org/openbravo/wad/Template_Edition.html	(revision 324)
@@ -28,11 +28,17 @@
 <script language="JavaScript" type="text/javascript" id="paramDirection">
 var baseDirection = "../../../../../web/";
 </script>
+<script type="text/javascript">
+var _editor_url  = baseDirection + "js/xinha/";
+</script>
 <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
 <SCRIPT language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></SCRIPT>
 <script language="JavaScript" type="text/javascript" id="paramLanguage">
   LNG_POR_DEFECTO = "en_US";
 </script>
+<script language="JavaScript" type="text/javascript">
+  _editor_lang = LNG_POR_DEFECTO.substring(0,2);
+</script>
 <SCRIPT language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></SCRIPT>
 <SCRIPT language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></SCRIPT>
 <SCRIPT language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></SCRIPT>
Index: database/sourcedata/AD_REFERENCE.xml
===================================================================
--- database/sourcedata/AD_REFERENCE.xml	(revision 322)
+++ database/sourcedata/AD_REFERENCE.xml	(revision 324)
@@ -322,6 +322,7 @@
   <AD_REFERENCE AD_REFERENCE_ID="800104" AD_CLIENT_ID="0" AD_ORG_ID="0" ISACTIVE="Y" CREATED="2007-05-16 10:43:10.0" CREATEDBY="100" UPDATED="2007-05-16 10:43:10.0" UPDATEDBY="100" NAME="Output format" VALIDATIONTYPE="L" ENTITYTYPE="U" />
   <AD_REFERENCE AD_REFERENCE_ID="800105" AD_CLIENT_ID="0" AD_ORG_ID="0" ISACTIVE="Y" CREATED="2007-06-19 13:28:30.0" CREATEDBY="100" UPDATED="2007-06-19 13:35:29.0" UPDATEDBY="100" NAME="AD_Role" DESCRIPTION="User Role" VALIDATIONTYPE="T" ENTITYTYPE="U" />
   <AD_REFERENCE AD_REFERENCE_ID="800106" AD_CLIENT_ID="0" AD_ORG_ID="0" ISACTIVE="Y" CREATED="2007-06-19 18:29:03.0" CREATEDBY="100" UPDATED="2007-06-19 18:29:10.0" UPDATEDBY="100" NAME="AD_Language system" VALIDATIONTYPE="T" ENTITYTYPE="U" />
+  <AD_REFERENCE AD_REFERENCE_ID="1003700000" AD_CLIENT_ID="0" AD_ORG_ID="0" ISACTIVE="Y" CREATED="2008-08-08 10:55:06.0" CREATEDBY="100" UPDATED="2008-08-08 10:55:06.0" UPDATEDBY="100" NAME="HtmlMemo" DESCRIPTION="Memo with HTML editor" HELP="Memo with HTML editor" VALIDATIONTYPE="D" ENTITYTYPE="U" />
 <!--
 ************************
 0. End of Core Range.
