CKEDITOR.plugins.add("ipsattach",{icons:"ipsattach",init:function(d){var a;d.addCommand("ipsAttachInit",{exec:function(c,b){a?void 0!==b&&void 0!==b.file&&$("#"+a.dialogID).find("[data-ipsUploader]").trigger("injectFile",b.file):(a=ips.ui.dialog.create({callback:function(a){void 0!==b&&void 0!==b.file&&setTimeout(function(){a.find("[data-ipsUploader]").trigger("injectFile",b.file)},500)},title:ips.getString("editorAttachmentTitle"),fixed:!0,url:"?app=core&module=system&controller=editor&do=attachments&postKey="+
c.config.ipsPostKey+"&editorId="+$("."+c.id).parent().data("ipseditor-name")}),a.show(!0))}});d.addCommand("ipsAttach",{exec:function(c){c.execCommand("ipsAttachInit");a.show()}})}});