diff options
Diffstat (limited to '97suifangqa/staticfiles/tinymce/js/tinymce/plugins/save/plugin.min.js')
-rw-r--r-- | 97suifangqa/staticfiles/tinymce/js/tinymce/plugins/save/plugin.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/save/plugin.min.js b/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/save/plugin.min.js new file mode 100644 index 0000000..050d87c --- /dev/null +++ b/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/save/plugin.min.js @@ -0,0 +1 @@ +tinymce.PluginManager.add("save",function(e){function t(){var t,n;return t=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty")||e.isDirty()?(tinymce.triggerSave(),(n=e.getParam("save_onsavecallback"))?(e.execCallback("save_onsavecallback",e)&&(e.startContent=tinymce.trim(e.getContent({format:"raw"})),e.nodeChanged()),void 0):(t?(e.isNotDirty=!0,(!t.onsubmit||t.onsubmit())&&("function"==typeof t.submit?t.submit():e.windowManager.alert("Error: Form submit field collision.")),e.nodeChanged()):e.windowManager.alert("Error: No form element found."),void 0)):void 0}function n(){var t,n=tinymce.trim(e.startContent);return(t=e.getParam("save_oncancelcallback"))?(e.execCallback("save_oncancelcallback",e),void 0):(e.setContent(n),e.undoManager.clear(),e.nodeChanged(),void 0)}function r(){var t=this;e.on("nodeChange",function(){t.disabled(!e.isDirty())})}e.addCommand("mceSave",t),e.addCommand("mceCancel",n),e.addButton("save",{text:"Save",cmd:"mceSave",disabled:!0,onPostRender:r}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:r}),e.addShortcut("ctrl+s","","mceSave")});
\ No newline at end of file |