Roo/htmleditor/TidySerializer.js
[roojs1] / Roo / htmleditor / TidySerializer.js
index d05ba33..5b8be83 100644 (file)
@@ -21,6 +21,12 @@ Roo.htmleditor.TidySerializer = function(settings)
 
 };
 Roo.apply(Roo.htmleditor.TidySerializer.prototype, {
+    
+    /**
+     * @param {boolean} inner do the inner of the node.
+     */
+    inner : false,
+    
     /**
     * Serializes the specified node into a string.
     *
@@ -34,6 +40,7 @@ Roo.apply(Roo.htmleditor.TidySerializer.prototype, {
         
         // = settings.validate;
         var writer = this.writer;
+        var walk  = this.walk;
         this.handlers = {
             // #text
             3: function(node) {
@@ -69,9 +76,10 @@ Roo.apply(Roo.htmleditor.TidySerializer.prototype, {
         };
         writer.reset();
         1 != node.nodeType || this.inner ? handlers[11](node) : walk(node);
-    return writer.getContent();
+        return writer.getContent();
+    },
 
-    function walk(node) {
+    walk: function(node) {
         var name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule, handler = handlers[node.type];
         if (handler) {
             handler(node);