fix msword paste
[roojs1] / roojs-bootstrap-debug.js
index 93c44f8..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);
     }
@@ -27037,20 +27037,23 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             },
             {
                 xtype : 'Button',
-                text: 'Edit Src',
+                text: 'Change Image URL',
                  
                 listeners : {
                     click: function (btn, state)
                     {
-                        
+                        var b = block();
                         
                         Roo.MessageBox.show({
                             title : "Image Source URL",
                             msg : "Enter the url for the image",
                             buttons: Roo.MessageBox.OKCANCEL,
-                            fn: function(val){
-                                block().image_src = val;
-                                block().updateElement();
+                            fn: function(btn, val){
+                                if (btn != 'ok') {
+                                    return;
+                                }
+                                b.image_src = val;
+                                b.updateElement();
                                 syncValue();
                                 toolbar.editorcore.onEditorEvent();
                             },
@@ -27058,7 +27061,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             prompt:true,
                             //multiline: multiline,
                             modal : true,
-                            value : block().image_src
+                            value : b.image_src
                         });
                     }
                 },
@@ -27066,24 +27069,53 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             },
          
             {
-                xtype : 'TextField',
-                allowBlank : false,
-                width : 150,
-                name : 'image_src',
+                xtype : 'Button',
+                text: 'Change Link URL',
+                 
                 listeners : {
-                    keyup : function (combo, e)
-                    { 
-                        toolbar.editorcore.selectNode(toolbar.tb.selectedNode);
+                    click: function (btn, state)
+                    {
                         var b = block();
-                        b.image_src = this.getValue();
-                        b.updateElement();
-                        syncValue();
-                        toolbar.editorcore.onEditorEvent();
+                        
+                        Roo.MessageBox.show({
+                            title : "Link URL",
+                            msg : "Enter the url for the link - leave blank to have no link",
+                            buttons: Roo.MessageBox.OKCANCEL,
+                            fn: function(btn, val){
+                                if (btn != 'ok') {
+                                    return;
+                                }
+                                b.href = val;
+                                b.updateElement();
+                                syncValue();
+                                toolbar.editorcore.onEditorEvent();
+                            },
+                            minWidth:250,
+                            prompt:true,
+                            //multiline: multiline,
+                            modal : true,
+                            value : b.href
+                        });
                     }
                 },
-                xns : rooui.form
-                
+                xns : rooui.Toolbar
             },
+            {
+                xtype : 'Button',
+                text: 'Show Video URL',
+                 
+                listeners : {
+                    click: function (btn, state)
+                    {
+                        Roo.MessageBox.alert("Video URL",
+                            block().video_url == '' ? 'This image is not linked ot a video' :
+                                'The image is linked to: <a target="_new" href="' + block().video_url + '">' + block().video_url + '</a>');
+                    }
+                },
+                xns : rooui.Toolbar
+            },
+            
+            
             {
                 xtype : 'TextItem',
                 text : "Width: ",
@@ -29175,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 });
@@ -30104,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???