X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpastetext%2Fdialogs%2Fpastetext.js;h=56143df9334bc1b6f5931605c6b6195c127142f3;hb=1056598c95187351dc58f4991d331e2258d038b5;hp=82e42178dac5ea9624d9a4f6800620fb64545eec;hpb=055b6b0792ce7dc53d47af606b367c04b927c2ab;p=ckeditor.git diff --git a/_source/plugins/pastetext/dialogs/pastetext.js b/_source/plugins/pastetext/dialogs/pastetext.js index 82e4217..56143df 100644 --- a/_source/plugins/pastetext/dialogs/pastetext.js +++ b/_source/plugins/pastetext/dialogs/pastetext.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -13,23 +13,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license 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(), - editor = this.getParentEditor(); - - setTimeout( function() - { - editor.fire( 'paste', { 'text' : text } ); - }, 0 ); - }, + onShow : function(){ this.setupContent(); }, + onOk : function(){ this.commitContent(); }, contents : [ @@ -60,6 +45,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license focus : function() { this.getElement().focus(); + }, + setup : function() + { + this.setValue( '' ); + }, + commit : function() + { + var value = this.getValue(); + setTimeout( function() + { + editor.fire( 'paste', { 'text' : value } ); + }, 0 ); } } ]