includes/clientside/tinymce/plugins/paste/editor_plugin_src.js
changeset 543 dffcbfbc4e59
parent 476 f26a69c40431
child 588 20484deb89cd
equal deleted inserted replaced
542:5841df0ab575 543:dffcbfbc4e59
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 650 2008-02-27 13:41:02Z spocke $
     2  * $Id: editor_plugin_src.js 738 2008-03-20 20:00:48Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
    15 			t.editor = ed; 
    15 			t.editor = ed; 
    16 
    16 
    17 			// Register commands
    17 			// Register commands
    18 			ed.addCommand('mcePasteText', function(ui, v) {
    18 			ed.addCommand('mcePasteText', function(ui, v) {
    19 				if (ui) {
    19 				if (ui) {
    20 					ed.windowManager.open({
    20 					if ((ed.getParam('paste_use_dialog', true)) || (!tinymce.isIE)) {
    21 						file : url + '/pastetext.htm',
    21 						ed.windowManager.open({
    22 						width : 450,
    22 							file : url + '/pastetext.htm',
    23 						height : 400,
    23 							width : 450,
    24 						inline : 1
    24 							height : 400,
    25 					}, {
    25 							inline : 1
    26 						plugin_url : url
    26 						}, {
    27 					});
    27 							plugin_url : url
       
    28 						});
       
    29 					} else
       
    30 						t._insertText(clipboardData.getData("Text"), true);
    28 				} else
    31 				} else
    29 					t._insertText(v.html, v.linebreaks);
    32 					t._insertText(v.html, v.linebreaks);
    30 			});
    33 			});
    31 
    34 
    32 			ed.addCommand('mcePasteWord', function(ui, v) {
    35 			ed.addCommand('mcePasteWord', function(ui, v) {
    33 				if (ui) {
    36 				if (ui) {
    34 					ed.windowManager.open({
    37 					if ((ed.getParam('paste_use_dialog', true)) || (!tinymce.isIE)) {
    35 						file : url + '/pasteword.htm',
    38 						ed.windowManager.open({
    36 						width : 450,
    39 							file : url + '/pasteword.htm',
    37 						height : 400,
    40 							width : 450,
    38 						inline : 1
    41 							height : 400,
    39 					}, {
    42 							inline : 1
    40 						plugin_url : url
    43 						}, {
    41 					});
    44 							plugin_url : url
       
    45 						});
       
    46 					} else
       
    47 						t._insertText(t._clipboardHTML());
    42 				} else
    48 				} else
    43 					t._insertWordContent(v);
    49 					t._insertWordContent(v);
    44 			});
    50 			});
    45 
    51 
    46 			ed.addCommand('mceSelectAll', function() {
    52 			ed.addCommand('mceSelectAll', function() {