2 * @class Roo.htmleditor.FilterEmpty
3 * filter empty elements
5 * Run a new Empty Filter
6 * @param {Object} config Configuration options
9 Roo.htmleditor.FilterEmpty = function(cfg)
11 // no need to apply config.
15 Roo.extend(Roo.htmleditor.FilterEmpty, Roo.htmleditor.FilterBlack,
21 replaceTag : function(node)
23 // start from leaf node
24 if(node.hasChildNodes()) {
28 // only filter empty leaf element with certain tags
30 ['B', 'I', 'U', 'S'].indexOf(node.tagName) < 0
32 node.attributes && node.attributes.length > 0
36 return false; // don't walk
39 Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this, node);
40 return false; // don't walk