X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=Roo%2FHtmlEditorCore.js;fp=Roo%2FHtmlEditorCore.js;h=a1bb73db092ee4f6225dfe4aa4ba0a412c15b23f;hp=bc051230ed621e796562a45fb60c8e38116e164b;hb=95d78328468f1edb0352fa1b0999841ae361327e;hpb=8243a30daf04298fc849760aa49bd3045a075e1a diff --git a/Roo/HtmlEditorCore.js b/Roo/HtmlEditorCore.js index bc051230ed..a1bb73db09 100644 --- a/Roo/HtmlEditorCore.js +++ b/Roo/HtmlEditorCore.js @@ -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;