(function(){var a={exec:function(b){var c=CKEDITOR.tools.tryThese(function(){var d=window.clipboardData.getData('Text');if(!d)throw 0;return d;});if(!c){b.openDialog('pastetext');return false;}else b.fire('paste',{text:c});return true;}};CKEDITOR.plugins.add('pastetext',{init:function(b){var c='pastetext',d=b.addCommand(c,a);b.ui.addButton('PasteText',{label:b.lang.pasteText.button,command:c});CKEDITOR.dialog.add(c,CKEDITOR.getUrl(this.path+'dialogs/pastetext.js'));if(b.config.forcePasteAsPlainText){b.on('beforeCommandExec',function(e){var f=e.data.commandData;if(e.data.name=='paste'&&f!='html'){b.execCommand('pastetext');e.cancel();}},null,null,0);b.on('beforePaste',function(e){e.data.mode='text';});}b.on('pasteState',function(e){b.getCommand('pastetext').setState(e.data);});},requires:['clipboard']});})();
