CKEDITOR.plugins.add("ipsautosave",{init:function(a){if(a.config.ipsAutoSaveKey&&ips.utils.db.enabled)a.on("instanceReady",function(){var b=ips.utils.db.get("editorSave",a.config.ipsAutoSaveKey);!a.getData()&&b&&a.setData(b);var c=setInterval(function(){ips.utils.db.set("editorSave",a.config.ipsAutoSaveKey,a.getData())},2E3);$("."+a.id).closest("form").on("submit",function(){window.clearInterval(c);ips.utils.db.remove("editorSave",a.config.ipsAutoSaveKey)})})}});