JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / plugins / pastetext / dialogs / pastetext.js
diff --git a/_source/plugins/pastetext/dialogs/pastetext.js b/_source/plugins/pastetext/dialogs/pastetext.js
new file mode 100644 (file)
index 0000000..a0dfe48
--- /dev/null
@@ -0,0 +1,65 @@
+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+(function()\r
+{\r
+       CKEDITOR.dialog.add( 'pastetext', function( editor )\r
+               {\r
+                       return {\r
+                               title : editor.lang.pasteText.title,\r
+\r
+                               minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,\r
+                               minHeight : 240,\r
+\r
+                               onShow : function()\r
+                               {\r
+                                       // Reset the textarea value.\r
+                                       this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' );\r
+                               },\r
+\r
+                               onOk : function()\r
+                               {\r
+                                       // Get the textarea value.\r
+                                       var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue();\r
+\r
+                                       // Inserts the text.\r
+                                       this.getParentEditor().insertText( text );\r
+                               },\r
+\r
+                               contents :\r
+                               [\r
+                                       {\r
+                                               label : editor.lang.common.generalTab,\r
+                                               id : 'general',\r
+                                               elements :\r
+                                               [\r
+                                                       {\r
+                                                               type : 'html',\r
+                                                               id : 'pasteMsg',\r
+                                                               html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'\r
+                                                       },\r
+                                                       {\r
+                                                               type : 'html',\r
+                                                               id : 'content',\r
+                                                               style : 'width:340px;height:170px',\r
+                                                               html :\r
+                                                                       '<textarea style="' +\r
+                                                                               'width:346px;' +\r
+                                                                               'height:170px;' +\r
+                                                                               'resize: none;' +\r
+                                                                               'border:1px solid black;' +\r
+                                                                               'background-color:white">' +\r
+                                                                       '</textarea>',\r
+                                                               focus : function()\r
+                                                               {\r
+                                                                       this.getElement().focus();\r
+                                                               }\r
+                                                       }\r
+                                               ]\r
+                                       }\r
+                               ]\r
+                       };\r
+               });\r
+})();\r