2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
8 CKEDITOR.dialog.add( 'pastetext', function( editor )
11 title : editor.lang.pasteText.title,
13 minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,
16 onShow : function(){ this.setupContent(); },
17 onOk : function(){ this.commitContent(); },
22 label : editor.lang.common.generalTab,
29 html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'
34 className : 'cke_pastetext',
38 var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(),
39 input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 );
41 input.setAttribute( 'aria-labelledby', label.$.id );
42 input.setStyle( 'direction', editor.config.contentsLangDirection );
47 this.getElement().focus();
55 var value = this.getValue();
56 setTimeout( function()
58 editor.fire( 'paste', { 'text' : value } );