/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\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
- editor = this.getParentEditor();\r
-\r
- setTimeout( function()\r
- {\r
- editor.fire( 'paste', { 'text' : text } );\r
- }, 0 );\r
- },\r
+ onShow : function(){ this.setupContent(); },\r
+ onOk : function(){ this.commitContent(); },\r
\r
contents :\r
[\r
html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'\r
},\r
{\r
- type : 'html',\r
+ type : 'textarea',\r
id : 'content',\r
- style : 'width:340px;height:170px',\r
- html :\r
- '<textarea style="' +\r
- 'width:346px;' +\r
- 'height:170px;' +\r
- 'resize: none;' +\r
- 'direction:' + editor.config.contentsLangDirection + ';' +\r
- 'border:1px solid black;' +\r
- 'background-color:white">' +\r
- '</textarea>',\r
+ className : 'cke_pastetext',\r
\r
onLoad : function()\r
{\r
var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(),\r
- input = this.getElement();\r
+ input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 );\r
\r
input.setAttribute( 'aria-labelledby', label.$.id );\r
+ input.setStyle( 'direction', editor.config.contentsLangDirection );\r
},\r
\r
focus : function()\r
{\r
this.getElement().focus();\r
+ },\r
+ setup : function()\r
+ {\r
+ this.setValue( '' );\r
+ },\r
+ commit : function()\r
+ {\r
+ var value = this.getValue();\r
+ setTimeout( function()\r
+ {\r
+ editor.fire( 'paste', { 'text' : value } );\r
+ }, 0 );\r
}\r
}\r
]\r