Sha256: fa66bec35ace81e4ce6f3037183f5efec1086266285cdaa155b0c8e126d1deaa

Contents?: true

Size: 1.8 KB

Versions: 35

Compression:

Stored size: 1.8 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 e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),a=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},t=function(){return"mce-pagebreak"},r=function(){return'<img src="'+n.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},o=function(o){var c=a(o),n=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");o.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var n,a,t=e.length;t--;)if((a=(n=e[t]).attr("class"))&&-1!==a.indexOf("mce-pagebreak")){var r=n.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,n.remove();continue}n.type=3,n.value=c,n.raw=!0}})})},c=r,u=t,g=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+c()+"</p>"):e.insertContent(c())})},m=function(n){n.on("ResolveName",function(e){"IMG"===e.target.nodeName&&n.dom.hasClass(e.target,u())&&(e.name="pagebreak")})},s=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};!function l(){e.add("pagebreak",function(e){g(e),s(e),o(e),m(e)})}()}();

Version data entries

35 entries across 35 versions & 2 rubygems

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