Roo/htmleditor/BlockFigure.js
[roojs1] / Roo / htmleditor / Tidy.js
1
2 /**
3  * @class Roo.htmleditor.Tidy
4  * Tidy HTML 
5  * 
6  * @constructor
7  * Create a new Filter.
8  * @param {Object} config Configuration options
9  */
10
11
12 Roo.htmleditor.Tidy = function(cfg) {
13     Roo.apply(this, cfg);
14     
15     this.core.doc.body.innerHTML = this.tidy(this.core.doc.body, '');
16      
17 }
18
19 Roo.htmleditor.Tidy.toString = function(node)
20 {
21     return Roo.htmleditor.Tidy.prototype.tidy(node, '');
22 }
23
24 Roo.htmleditor.Tidy.prototype = {
25     
26     /**
27      *
28      * @cfg {Roo.HtmlEditorCore} core the editor.
29      */
30     core : false,
31     
32  
33     
34     tidy : function(node, indent) {
35         var ser = new Roo.htmleditor.TidySerializer({
36             indent : 2,
37         });
38         return ser.serialize(node);
39          
40     
41     }
42     
43 }