more styling
[roojs1] / Roo / htmleditor / FilterBlock.js
1  
2
3 /**
4  * @class Roo.htmleditor.FilterBlock
5  * removes id / data-block and contenteditable that are associated with blocks
6  * usage should be done on a cloned copy of the dom
7  * @constructor
8 * Run a new Attribute Filter { node : xxxx }}
9 * @param {Object} config Configuration options
10  */
11 Roo.htmleditor.FilterBlock = function(cfg)
12 {
13     Roo.apply(this, cfg);
14     var qa = cfg.node.querySelectorAll;
15     this.removeAttributes('data-block');
16     this.removeAttributes('contenteditable');
17     this.removeAttributes('id');
18     
19 }
20
21 Roo.apply(Roo.htmleditor.FilterBlock.prototype,
22 {
23     node: true, // all tags
24      
25      
26     removeAttributes : function(attr)
27     {
28         var ar = this.node.querySelectorAll('*[' + attr + ']');
29         for (var i =0;i<ar.length;i++) {
30             ar[i].removeAttribute(attr);
31         }
32     }
33         
34         
35         
36     
37 });