Roo/HtmlEditorCore.js
authorEdward <edward@roojs.com>
Tue, 8 Jul 2014 06:04:09 +0000 (14:04 +0800)
committerEdward <edward@roojs.com>
Tue, 8 Jul 2014 06:04:09 +0000 (14:04 +0800)
Roo/HtmlEditorCore.js

index bba51c5..ed69e18 100644 (file)
@@ -936,13 +936,14 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
     // private? - in a new class?
     cleanUpPaste :  function()
     {
-        if(this.clearUp){
-            this.cleanUpChildren(this.doc.body);
+        if(!this.clearUp){
+            return;
         }
         
         // cleans up the whole document..
         Roo.log('cleanuppaste');
         
+        this.cleanUpChildren(this.doc.body);
         var clean = this.cleanWordChars(this.doc.body.innerHTML);
         if (clean != this.doc.body.innerHTML) {
             this.doc.body.innerHTML = clean;