X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpastetext%2Fdialogs%2Fpastetext.js;h=9ff4f7491b8c684d7d9166d3e2263625f1c5f5a5;hb=refs%2Ftags%2Fv3.2;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..9ff4f74 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 : @@ -52,6 +55,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license 'border:1px solid black;' + 'background-color:white">' + '', + + onLoad : function() + { + var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(), + input = this.getElement(); + + input.setAttribute( 'aria-labelledby', label.$.id ); + }, + focus : function() { this.getElement().focus();