CKEDITOR.plugins.add("ipsprefs",{icons:"ipsprefs",hidpi:!0,init:function(a){a.addCommand("ipsprefs",{exec:function(){_.isUndefined($("#editorPreferencesPanel"))||$("#editorPreferencesPanel").remove();$("body").append(ips.templates.render("core.editor.preferences",{checked:ips.utils.db.enabled&&ips.utils.db.get("editorPrefs","papt")}));var a=ips.ui.dialog.create({title:ips.getString("editorPrefsButton"),fixed:!1,content:$("#editorPreferencesPanel")});a.show();$("#papt_submit").click(function(){$("#papt:checked").val()?
ips.utils.db.set("editorPrefs","papt",!0):ips.utils.db.set("editorPrefs","papt",null);a.remove(!0)})}});a.ui.addButton("ipsprefs",{label:ips.getString("editorPrefsButton"),command:"ipsprefs",toolbar:"ipsprefs"})}});