X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Fpastetext%2Fdialogs%2Fpastetext.js;h=82e42178dac5ea9624d9a4f6800620fb64545eec;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=a0dfe48b5ba1abf9acabf5a322d0e58898929a0a;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/pastetext/dialogs/pastetext.js b/_source/plugins/pastetext/dialogs/pastetext.js index a0dfe48..82e4217 100644 --- a/_source/plugins/pastetext/dialogs/pastetext.js +++ b/_source/plugins/pastetext/dialogs/pastetext.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -22,10 +22,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license onOk : function() { // Get the textarea value. - var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(); + var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(), + editor = this.getParentEditor(); - // Inserts the text. - this.getParentEditor().insertText( text ); + setTimeout( function() + { + editor.fire( 'paste', { 'text' : text } ); + }, 0 ); }, contents : @@ -41,17 +44,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license html : '
' + editor.lang.clipboard.pasteMsg + '
' }, { - type : 'html', + type : 'textarea', id : 'content', - style : 'width:340px;height:170px', - html : - '', + className : 'cke_pastetext', + + onLoad : function() + { + var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(), + input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 ); + + input.setAttribute( 'aria-labelledby', label.$.id ); + input.setStyle( 'direction', editor.config.contentsLangDirection ); + }, + focus : function() { this.getElement().focus();