11 lines
8.8 KiB
JavaScript
11 lines
8.8 KiB
JavaScript
/**
|
|
* 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.3 (2019-03-19)
|
|
*/
|
|
|
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return function(){return e}};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var n,r,o,a,i,c,u=t(!1),l=t(!0),s=u,m=l,f=function(){return p},p=(a={fold:function(e,t){return e()},is:s,isSome:s,isNone:m,getOr:o=function(e){return e},getOrThunk:r=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:o,orThunk:r,map:f,ap:f,each:function(){},bind:f,flatten:f,exists:s,forall:m,filter:f,equals:n=function(e){return e.isNone()},equals_:n,toArray:function(){return[]},toString:t("none()")},Object.freeze&&Object.freeze(a),a),y=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return y(e(n))},ap:function(e){return e.fold(f,function(e){return y(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:p},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(s,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},h={some:y,none:f,from:function(e){return null===e||e===undefined?p:y(e)}},k=(i="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===i}),g=(c=Array.prototype.indexOf)===undefined?function(e,t){return A(e,t)}:function(e,t){return c.call(e,t)},v=function(e,t){return-1<g(e,t)},b=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var a=e[o];r[o]=t(a,o,e)}return r},A=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},C=(Array.prototype.slice,k(Array.from)&&Array.from,[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Header 1"},{shortcuts:["Access + 2"],action:"Header 2"},{shortcuts:["Access + 3"],action:"Header 3"},{shortcuts:["Access + 4"],action:"Header 4"},{shortcuts:["Access + 5"],action:"Header 5"},{shortcuts:["Access + 6"],action:"Header 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}]),M=Object.keys,S=Object.hasOwnProperty,O=tinymce.util.Tools.resolve("tinymce.Env"),P=function(e){var o=O.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},t=e.split("+"),n=b(t,function(e){var t,n,r=e.toLowerCase().trim();return t=o,n=r,S.call(t,n)?o[r]:e});return O.mac?n.join("").replace(/\s/,""):n.join("+")},w=function(){return{title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:b(C,function(e){var t=b(e.shortcuts,P).join(" or ");return[e.action,t]})}]}},x=function(e,o){return e.replace(/\$\{([^{}]*)\}/g,function(e,t){var n,r=o[t];return"string"==(n=typeof r)||"number"===n?r.toString():e})},T=tinymce.util.Tools.resolve("tinymce.util.I18n"),_=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"advcode",name:"Advanced Code Editor*"},{key:"formatpainter",name:"Format Painter*"},{key:"powerpaste",name:"PowerPaste*"},{key:"tinydrive",name:"Tiny Drive*"},{key:"tinymcespellchecker",name:"Spell Checker Pro*"},{key:"a11ychecker",name:"Accessibility Checker*"},{key:"linkchecker",name:"Link Checker*"},{key:"mentions",name:"Mentions*"},{key:"mediaembed",name:"Enhanced Media Embed*"}],F=function(e){var t,n,r,o,a,i,c,u,l,s,m=d(x,'<a href="${url}" target="_blank" rel="noopener">${name}</a>'),f=function(t,n){return function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return h.some(o)}return h.none()}(_,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?m(e()):n},function(e){return m({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+e.key})})};return{title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[(n=e,null==n?"":'<div data-mce-tabstop="1" tabindex="-1">'+(r=n,i=M((o=r).plugins),c=o.settings.forced_plugins===undefined?i:function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];t(a,r,e)&&n.push(a)}return n}(i,(a=d(v,o.settings.forced_plugins),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!a.apply(null,e)})),u=b(c,function(e){return"<li>"+f(r,e)+"</li>"}),l=u.length,s=u.join(""),"<p><b>"+T.translate(["Plugins installed ({0}):",l])+"</b></p><ul>"+s+"</ul>")+"</div>"),(t=b(["Accessibility Checker","Advanced Code Editor","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","PowerPaste","Spell Checker Pro"],function(e){return"<li>"+T.translate(e)+"</li>"}).join(""),'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+T.translate("Premium plugins:")+"</b></p><ul>"+t+'<li style="list-style: none; margin-top: 1em;"><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+T.translate("Learn more...")+"</a></li></ul></div>")].join("")}]}},H=tinymce.util.Tools.resolve("tinymce.EditorManager"),j=function(){var e,t,n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(e=H.majorVersion,t=H.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>";return{type:"htmlpanel",html:"<p>"+T.translate(["You are using {0}",n])+"</p>",presets:"document"}},E=function(e){return e.getParam("help_version",j,"function")()},D=function(e){return{title:"Version",items:[E(e)]}},I=function(t){return function(){var e={type:"tabpanel",tabs:[w(),F(t),D(t)]};t.windowManager.open({title:"Help",size:"medium",body:e,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}},L=function(e){e.addCommand("mceHelp",I(e))},B=function(e){e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:I(e)}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:I(e)})};e.add("help",function(e){B(e),L(e),e.shortcuts.add("Alt+0","Open help dialog","mceHelp")}),function N(){}}();
|