X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpastetext%2Fdialogs%2Fpastetext.js;fp=_source%2Fplugins%2Fpastetext%2Fdialogs%2Fpastetext.js;h=a0dfe48b5ba1abf9acabf5a322d0e58898929a0a;hb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;hp=0000000000000000000000000000000000000000;hpb=b93873b6532ee7515fb0d6f8b73176c44fad28f7;p=ckeditor.git diff --git a/_source/plugins/pastetext/dialogs/pastetext.js b/_source/plugins/pastetext/dialogs/pastetext.js new file mode 100644 index 0000000..a0dfe48 --- /dev/null +++ b/_source/plugins/pastetext/dialogs/pastetext.js @@ -0,0 +1,65 @@ +/* +Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + CKEDITOR.dialog.add( 'pastetext', function( editor ) + { + return { + title : editor.lang.pasteText.title, + + minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350, + minHeight : 240, + + onShow : function() + { + // Reset the textarea value. + this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' ); + }, + + onOk : function() + { + // Get the textarea value. + var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(); + + // Inserts the text. + this.getParentEditor().insertText( text ); + }, + + contents : + [ + { + label : editor.lang.common.generalTab, + id : 'general', + elements : + [ + { + type : 'html', + id : 'pasteMsg', + html : '
' + editor.lang.clipboard.pasteMsg + '
' + }, + { + type : 'html', + id : 'content', + style : 'width:340px;height:170px', + html : + '', + focus : function() + { + this.getElement().focus(); + } + } + ] + } + ] + }; + }); +})();