tinymce.PluginManager.add("save",function(e){functiont(){vart;if(t=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty",!0)||e.isDirty())returntinymce.triggerSave(),e.getParam("save_onsavecallback")?(e.execCallback("save_onsavecallback",e),voide.nodeChanged()):void(t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeoft.submit?t.submit():n(e.translate("Error: Form submit field collision."))),e.nodeChanged()):n(e.translate("Error: No form element found.")))}functionn(t){e.notificationManager.open({text:t,type:"error"})}functionr(){vart=tinymce.trim(e.startContent);returne.getParam("save_oncancelcallback")?voide.execCallback("save_oncancelcallback",e):(e.setContent(t),e.undoManager.clear(),voide.nodeChanged())}functioni(){vart=this;e.on("nodeChange dirty",function(){t.disabled(e.getParam("save_enablewhendirty",!0)&&!e.isDirty())})}e.addCommand("mceSave",t),e.addCommand("mceCancel",r),e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:i}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:i}),e.addShortcut("Meta+S","","mceSave")});