more styling
[roojs1] / Roo / htmleditor / FilterEmpty.js
1 /**
2  * @class Roo.htmleditor.FilterEmpty
3  * filter empty elements (normally <B> on paste)
4  * @constructor
5  * Run a new Empty Filter
6  * @param {Object} config Configuration options
7  */
8
9 Roo.htmleditor.FilterEmpty = function(cfg)
10 {
11     // no need to apply config.
12     this.walk(cfg.node);
13 }
14
15 Roo.extend(Roo.htmleditor.FilterSpan, Roo.htmleditor.FilterBlack,
16 {
17      
18     tag : 'B',
19      
20  
21     replaceTag : function(node)
22     {
23         if (node.innerHTML.trim() != '') {
24             return true;
25         }
26         if (node.attributes && node.attributes.length > 0) {
27             return true; // walk if there are any.
28         }
29         Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this, node);
30         return false;
31      
32     }
33     
34 });