X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FHtmlEditorCore.js;h=eee4f0510ebe13a027ce581ca569b3b7b726b364;hb=825a74c132eae7b97e43866ab3c00ff122fb239c;hp=7757bdadf947bef8bbd79c74452c2bfc97393221;hpb=4ba5d2fa97640d038bf3d0472e9ed284dbf6ebfa;p=roojs1 diff --git a/Roo/HtmlEditorCore.js b/Roo/HtmlEditorCore.js index 7757bdadf9..eee4f0510e 100644 --- a/Roo/HtmlEditorCore.js +++ b/Roo/HtmlEditorCore.js @@ -72,55 +72,13 @@ Roo.HtmlEditorCore = function(config){ * @param {Roo.HtmlEditorCore} this */ editorevent: true + }); // at this point this.owner is set, so we can start working out the whitelisted / blacklisted elements // defaults : white / black... - - var w = typeof(this.owner.white) != 'undefined' && this.owner.white ? this.owner.white : []; - var b = typeof(this.owner.black) != 'undefined' && this.owner.black ? this.owner.black : []; - - this.white = []; - this.black = []; - Roo.each(Roo.HtmlEditorCore.white, function(tag) { - if (b.indexOf(tag) > -1) { - return; - } - this.white.push(tag); - - }, this); - - Roo.each(w, function(tag) { - if (b.indexOf(tag) > -1) { - return; - } - if (this.white.indexOf(tag) > -1) { - return; - } - this.white.push(tag); - - }, this); - - - Roo.each(Roo.HtmlEditorCore.black, function(tag) { - if (w.indexOf(tag) > -1) { - return; - } - this.black.push(tag); - - }, this); - - Roo.each(b, function(tag) { - if (w.indexOf(tag) > -1) { - return; - } - if (this.black.indexOf(tag) > -1) { - return; - } - this.black.push(tag); - - }, this); + this.applyBlacklists(); @@ -175,7 +133,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { black: false, white: false, - + bodyCls : '', /** * Protected method that will not generally be called directly. It @@ -185,7 +143,6 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { getDocMarkup : function(){ // body styles.. var st = ''; - Roo.log(this.stylesheets); // inherit styels from page...?? if (this.stylesheets === false) { @@ -203,23 +160,27 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { st = ''; - } else { - Roo.each(this.stylesheets, function(s) { - st += '' - }); - + } else { + st = ''; } st += ''; + var cls = 'roo-htmleditor-body'; + + if(this.bodyCls.length){ + cls += ' ' + this.bodyCls; + } return '
' + st + //' + - ' '; + '