CKEDITOR.plugins.add("uploadfile",{requires:"uploadwidget,link",init:function(e){if(this.isSupportedEnvironment()){var i=CKEDITOR.fileTools;i.getUploadUrl(e.config)?i.addUploadWidget(e,"uploadfile",{uploadUrl:i.getUploadUrl(e.config),fileToElement:function(e){var i=new CKEDITOR.dom.element("a");return i.setText(e.name),i.setAttribute("href","#"),i},onUploaded:function(e){this.replaceWith('<a href="'+e.url+'" target="_blank">'+e.fileName+"</a>")}}):CKEDITOR.error("uploadfile-config")}},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}});