Sha256: 2a2e85928bbc3b0de7890e3a3b57eef8bbb2cdd16c490aaf8a9de672ae410e7d

Contents?: true

Size: 1.79 KB

Versions: 35

Compression:

Stored size: 1.79 KB

Contents

/**
 * Copyright (c) Tiny Technologies, Inc. All rights reserved.
 * Licensed under the LGPL or a commercial license.
 * For LGPL see License.txt in the project root for license information.
 * For commercial licenses see https://www.tiny.cloud/
 *
 * Version: 5.0.11 (2019-07-04)
 */
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(n){return n.getParam("save_enablewhendirty",!0)},i=function(n){return!!n.getParam("save_onsavecallback")},c=function(n){return!!n.getParam("save_oncancelcallback")},r=function(n,e){n.notificationManager.open({text:e,type:"error"})},e=function(n){var e;if(e=t.DOM.getParent(n.id,"form"),!a(n)||n.isDirty()){if(n.save(),i(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();e?(n.setDirty(!1),e.onsubmit&&!e.onsubmit()||("function"==typeof e.submit?e.submit():r(n,"Error: Form submit field collision.")),n.nodeChanged()):r(n,"Error: No form element found.")}},u=function(n){var e=o.trim(n.startContent);c(n)?n.execCallback("save_oncancelcallback",n):n.resetContent(e)},l=function(n){n.addCommand("mceSave",function(){e(n)}),n.addCommand("mceCancel",function(){u(n)})},s=function(t){return function(n){var e=function(){n.setDisabled(a(t)&&!t.isDirty())};return t.on("NodeChange dirty",e),function(){return t.off("NodeChange dirty",e)}}},d=function(n){n.ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:s(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:s(n)}),n.addShortcut("Meta+S","","mceSave")};!function m(){n.add("save",function(n){d(n),l(n)})}()}();

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
card-mod-tinymce_editor-0.15.5 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.15.4 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.15.3 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.15.2.pre1 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.15.1.1 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.15.1 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.15.0 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.14.2 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.14.1 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.14.0 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.13.4 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.13.3 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.13.2 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.13.1 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.13.0 public/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.11.7 public/assets/tinymce/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.12.0 public/assets/tinymce/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.11.6 public/assets/tinymce/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.11.5 public/assets/tinymce/plugins/save/plugin.min.js
card-mod-tinymce_editor-0.11.4 public/assets/tinymce/plugins/save/plugin.min.js