fix msword paste
[roojs1] / roojs-bootstrap-debug.js
index 7984b4a..e93cd47 100644 (file)
@@ -26025,7 +26025,7 @@ Roo.htmleditor.Filter.prototype = {
         Roo.each( Array.from(dom.childNodes), function( e ) {
             switch(true) {
                 
-                case e.nodeType == 8 && typeof(this.replaceComment) != 'undefined': // comment
+                case e.nodeType == 8 &&  this.replaceComment  !== false: // comment
                     this.replaceComment(e);
                     return;
                 
@@ -26225,7 +26225,7 @@ Roo.extend(Roo.htmleditor.FilterBlack, Roo.htmleditor.Filter,
 {
     tag : true, // all elements.
    
-    replace : function(n)
+    replaceTag : function(n)
     {
         n.parentNode.removeChild(n);
     }
@@ -27048,7 +27048,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             title : "Image Source URL",
                             msg : "Enter the url for the image",
                             buttons: Roo.MessageBox.OKCANCEL,
-                            fn: function(val){
+                            fn: function(btn, val){
+                                if (btn != 'ok') {
+                                    return;
+                                }
                                 b.image_src = val;
                                 b.updateElement();
                                 syncValue();
@@ -27078,7 +27081,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             title : "Link URL",
                             msg : "Enter the url for the link - leave blank to have no link",
                             buttons: Roo.MessageBox.OKCANCEL,
-                            fn: function(val){
+                            fn: function(btn, val){
+                                if (btn != 'ok') {
+                                    return;
+                                }
                                 b.href = val;
                                 b.updateElement();
                                 syncValue();
@@ -29201,7 +29207,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             });
             new Roo.htmleditor.FilterBlack({ node : d, tag : this.black});
             // should be fonts..
-            new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT' ]} );
+            new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT', 'O:P' ]} );
             new Roo.htmleditor.FilterParagraph({ node : d });
             new Roo.htmleditor.FilterSpan({ node : d });
             new Roo.htmleditor.FilterLongBr({ node : d });
@@ -30130,7 +30136,8 @@ Roo.HtmlEditorCore.black = [
         'IFRAME', 'LAYER',  'LINK',     'META',    'OBJECT',   
         'SCRIPT', 'STYLE' ,'TITLE',  'XML',
         //'FONT' // CLEAN LATER..
-        'COLGROUP', 'COL'  // messy tables.
+        'COLGROUP', 'COL'   // messy tables.
+        
         
 ];
 Roo.HtmlEditorCore.clean = [ // ?? needed???