Fix #6901 - CRM - allow comments in HTML for IE
[roojs1] / Roo / HtmlEditorCore.js
index bc05123..a1bb73d 100644 (file)
@@ -114,6 +114,11 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
      */
     stylesheets: false,
     
+    /**
+     * @cfg {boolean} allowComments - default false - allow comments in HTML source - by default they are stripped - if you are editing email you may need this.
+     */
+    
+    allowComments: false,
     // id of frame..
     frameId: false,
     
@@ -1027,7 +1032,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             // clean up silly Windows -- stuff?
             return; 
         }
-        if (node.nodeName == "#comment") {
+        if (node.nodeName == "#comment" && !this.allowComments) {
             node.parentNode.removeChild(node);
             // clean up silly Windows -- stuff?
             return;