JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
a0dfe48b5ba1abf9acabf5a322d0e58898929a0a
[ckeditor.git] / _source / plugins / pastetext / dialogs / pastetext.js
1 /*\r
2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 (function()\r
7 {\r
8         CKEDITOR.dialog.add( 'pastetext', function( editor )\r
9                 {\r
10                         return {\r
11                                 title : editor.lang.pasteText.title,\r
12 \r
13                                 minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,\r
14                                 minHeight : 240,\r
15 \r
16                                 onShow : function()\r
17                                 {\r
18                                         // Reset the textarea value.\r
19                                         this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' );\r
20                                 },\r
21 \r
22                                 onOk : function()\r
23                                 {\r
24                                         // Get the textarea value.\r
25                                         var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue();\r
26 \r
27                                         // Inserts the text.\r
28                                         this.getParentEditor().insertText( text );\r
29                                 },\r
30 \r
31                                 contents :\r
32                                 [\r
33                                         {\r
34                                                 label : editor.lang.common.generalTab,\r
35                                                 id : 'general',\r
36                                                 elements :\r
37                                                 [\r
38                                                         {\r
39                                                                 type : 'html',\r
40                                                                 id : 'pasteMsg',\r
41                                                                 html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'\r
42                                                         },\r
43                                                         {\r
44                                                                 type : 'html',\r
45                                                                 id : 'content',\r
46                                                                 style : 'width:340px;height:170px',\r
47                                                                 html :\r
48                                                                         '<textarea style="' +\r
49                                                                                 'width:346px;' +\r
50                                                                                 'height:170px;' +\r
51                                                                                 'resize: none;' +\r
52                                                                                 'border:1px solid black;' +\r
53                                                                                 'background-color:white">' +\r
54                                                                         '</textarea>',\r
55                                                                 focus : function()\r
56                                                                 {\r
57                                                                         this.getElement().focus();\r
58                                                                 }\r
59                                                         }\r
60                                                 ]\r
61                                         }\r
62                                 ]\r
63                         };\r
64                 });\r
65 })();\r