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() { |