Update tinyMCE to version 5.1.5

This commit is contained in:
DariusIII
2019-12-19 10:18:32 +01:00
parent c07236e01f
commit cfe5fb9e5f
94 changed files with 519 additions and 550 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function n(){}function o(n){return function(){return n}}function t(){return d}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},i=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){l(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){l(e,"OL",t["list-style-type"])})},c=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},s=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},f=o(!1),a=o(!0),d=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:a,getOr:m,getOrThunk:p,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:m,orThunk:p,map:t,each:n,bind:t,exists:f,forall:a,filter:t,equals:g,equals_:g,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(e),e);function g(n){return n.isNone()}function p(n){return n()}function m(n){return n}function y(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++){if(t(n[e]))return e}return-1}(t.parents,L),i=-1!==r?t.parents.slice(0,r):t.parents,o=u.grep(i,N(n));return 0<o.length&&o[0].nodeName===e}function O(n,t,e,r,i,o){0<o.length?function(e,n,t,r,i,o){e.ui.registry.addSplitButton(n,{tooltip:t,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(u.map(o,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===i?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:function(n){return n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}(n)}}))},onAction:function(){return e.execCommand(r)},onItemAction:function(n,t){l(e,i,t)},select:function(t){return S(e).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){function n(n){t.setActive(y(e,n,i))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}})}(n,t,e,r,i,o):function(e,n,t,r,i){e.ui.registry.addToggleButton(n,{active:!1,tooltip:t,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:function(t){function n(n){t.setActive(y(e,n,i))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}},onAction:function(){return e.execCommand(r)}})}(n,t,e,r,i)}var v=function(e){function n(){return i}function t(n){return n(e)}var r=o(e),i={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:a,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return v(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?i:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return i},h=function(n){return null===n||n===undefined?d:v(n)},L=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},N=function(t){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&function(n,t){return n.$.contains(n.getBody(),t)}(t,n)}},S=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return h(e)},T=function(n){O(n,"numlist","Numbered list","InsertOrderedList","OL",c(n)),O(n,"bullist","Bullet list","InsertUnorderedList","UL",s(n))};!function b(){r.add("advlist",function(n){var t,e,r;e="lists",r=(t=n).settings.plugins?t.settings.plugins:"",-1!==u.inArray(r.split(/[ ,]/),e)&&(T(n),i(n))})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function e(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},o=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.getAttribute("id")||e.getAttribute("name"):""},r=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},a=function(e){var t=o(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(t){!function(t,e){return n(e)?(r(t,e),!1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!0)}(e,t.getData().id)&&t.close()}})},i=function(t){t.addCommand("mceAnchor",function(){a(t)})},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",e("false")),t.serializer.addNodeFilter("a",e(null))})},d=function(e){e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return e.execCommand("mceAnchor")},onSetup:function(t){return e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return e.execCommand("mceAnchor")}})};!function u(){t.add("anchor",function(t){c(t),i(t),d(t)})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function i(t,e){if(e<0&&(e=0),3===t.nodeType){var n=t.data.length;n<e&&(e=n)}return e}function C(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setStart(e,i(e,n)):t.setStartBefore(e)}function m(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setEnd(e,i(e,n)):t.setEndAfter(e)}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),y=function(t){return t.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},k=function(t){return t.getParam("default_link_target",!1)},r=function(t,e,n){var i,o,r,f,a,s,d,c,l,u,g=y(t),h=k(t);if("A"!==t.selection.getNode().tagName){if((i=t.selection.getRng(!0).cloneRange()).startOffset<5){if(!(c=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;c=i.endContainer.firstChild.nextSibling}if(l=c.length,C(i,c,l),m(i,c,l),i.endOffset<5)return;o=i.endOffset,f=c}else{if(3!==(f=i.endContainer).nodeType&&f.firstChild){for(;3!==f.nodeType&&f.firstChild;)f=f.firstChild;3===f.nodeType&&(C(i,f,0),m(i,f,f.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-e}for(r=o;C(i,f,2<=o?o-2:0),m(i,f,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);!function(t,e){return t===e||" "===t||160===t.charCodeAt(0)}(i.toString(),n)?(0===i.startOffset?C(i,f,0):C(i,f,o),m(i,f,r)):(C(i,f,o),m(i,f,r),o+=1),"."===(s=i.toString()).charAt(s.length-1)&&m(i,f,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),a=t.selection.getBookmark(),t.selection.setRng(i),t.execCommand("createlink",!1,d[1]+d[2]),!1!==h&&t.dom.setAttrib(t.selection.getNode(),"target",h),t.selection.moveToBookmark(a),t.nodeChanged())}},e=function(e){var n;e.on("keydown",function(t){if(13===t.keyCode)return function(t){r(t,-1,"")}(e)}),o.browser.isIE()?e.on("focus",function(){if(!n){n=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(t){}}}):(e.on("keypress",function(t){if(41===t.keyCode)return function(t){r(t,-1,"(")}(e)}),e.on("keyup",function(t){if(32===t.keyCode)return function(t){r(t,0,"")}(e)}))};!function n(){t.add("autolink",function(t){e(t)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function d(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))}function h(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o}var i=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),p=function(e){return e.fire("ResizeEditor")},y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},z=function(e){return e.getParam("max_height",0,"number")},n=function(e){return e.getParam("autoresize_overflow_padding",1,"number")},b=function(e){return e.getParam("autoresize_bottom_margin",50,"number")},o=function(e){return e.getParam("autoresize_on_init",!0,"boolean")},u=function(e,t,n,i,o){r.setEditorTimeout(e,function(){C(e,t),n--?u(e,t,n,i,o):o&&o()},i)},C=function(e,t){var n,i,o,r=e.dom,u=e.getDoc();if(u)if(function(e){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}(e))d(e,!0);else{var s=u.documentElement,a=b(e);i=y(e);var f=h(r,s,"margin-top",!0),c=h(r,s,"margin-bottom",!0);(o=s.offsetHeight+f+c+a)<0&&(o=0);var g=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+g>y(e)&&(i=o+g);var l=z(e);if(l&&l<i?(i=l,d(e,!0)):d(e,!1),i!==t.get()){if(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),p(e),v.browser.isSafari()&&v.mac){var m=e.getWin();m.scrollTo(m.pageXOffset,m.pageYOffset)}e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),v.webkit&&n<0&&C(e,t)}}},s={setup:function(t,e){t.on("init",function(){var e=n(t);t.dom.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){C(t,e)}),o(t)&&t.on("init",function(){u(t,e,20,100,function(){u(t,e,5,1e3)})})},resize:C},a=function(e,t){e.addCommand("mceAutoResize",function(){s.resize(e,t)})};!function t(){e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=i(0);a(e,t),s.setup(e,t)}})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(n){"use strict";function r(t,e){var n=t||e,r=/^(\d+)([ms]?)$/.exec(""+n);return(r[2]?{s:1e3,m:6e4}[r[2]]:1)*parseInt(n,10)}function o(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,n.document.location.pathname)).replace(/\{query\}/g,n.document.location.search)).replace(/\{hash\}/g,n.document.location.hash)).replace(/\{id\}/g,t.id)}function a(t,e){var n=t.settings.forced_root_block;return""===(e=d.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+n+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(e)}function i(t){var e=parseInt(v.getItem(o(t)+"time"),10)||0;return!((new Date).getTime()-e>function(t){return r(t.settings.autosave_retention,"20m")}(t))||(g(t,!1),!1)}function u(t){var e=o(t);!a(t)&&t.isDirty()&&(v.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),v.setItem(e+"time",(new Date).getTime().toString()),function(t){t.fire("StoreDraft")}(t))}function s(t){var e=o(t);i(t)&&(t.setContent(v.getItem(e+"draft"),{format:"raw"}),function(t){t.fire("RestoreDraft")}(t))}function c(t,e){var n=function(t){return r(t.settings.autosave_interval,"30s")}(t);e.get()||(m.setInterval(function(){t.removed||u(t)},n),e.set(!0))}function f(t){t.undoManager.transact(function(){s(t),g(t)}),t.focus()}var l=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return l(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=function(t,e){var n=o(t);v.removeItem(n+"draft"),v.removeItem(n+"time"),!1!==e&&function(t){t.fire("RemoveDraft")}(t)};function y(r){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.concat(t);return r.apply(null,n)}}function p(n,t){return function(t){t.setDisabled(!i(n));function e(){return t.setDisabled(!i(n))}return n.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return n.off("StoreDraft RestoreDraft RemoveDraft",e)}}}var D=tinymce.util.Tools.resolve("tinymce.EditorManager");!function e(){t.add("autosave",function(t){var e=l(!1);return function(t){t.editorManager.on("BeforeUnload",function(t){var e;d.each(D.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&function(t){return t.getParam("autosave_ask_before_unload",!0)}(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)})}(t),function(t,e){c(t,e),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){f(t)},onSetup:p(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){f(t)},onSetup:p(t)})}(t,e),t.on("init",function(){(function(t){return t.getParam("autosave_restore_when_empty",!1)})(t)&&t.dom.isEmpty(t.getBody())&&s(t)}),function(t){return{hasDraft:y(i,t),storeDraft:y(u,t),restoreDraft:y(s,t),removeDraft:y(g,t),isEmpty:y(a,t)}}(t)})}()}(window);
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(t){t=e.trim(t);function o(o,e){t=t.replace(o,e)}return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/&nbsp;|\u00a0/gi," "),o(/&quot;/gi,'"'),o(/&lt;/gi,"<"),o(/&gt;/gi,">"),o(/&amp;/gi,"&"),t},i=function(t){t=e.trim(t);function o(o,e){t=t.replace(o,e)}return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),t};!function n(){o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=i(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=t(o.content))})})}()}();
+3 -2
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
@@ -1631,7 +1631,8 @@
}
}
};
editor.windowManager.open(bridgeSpec);
var dialogApi = editor.windowManager.open(bridgeSpec);
dialogApi.focus(patternName);
};
var Dialog = { open: open };
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},n=function(n){var e=o(n);n.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){t(n,e.getData().code),e.close()}})},c=function(e){e.addCommand("mceCodeEditor",function(){n(e)})},i=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return n(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return n(e)}})};!function u(){e.add("code",function(e){return c(e),i(e),{}})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(i){"use strict";function n(){}function u(n){return function(){return n}}function t(){return a}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n,t){var e,r=n.dom,o=n.selection.getSelectedBlocks();o.length&&(e=r.getAttrib(o[0],"dir"),c.each(o,function(n){r.getParent(n.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},d=function(n){n.addCommand("mceDirectionLTR",function(){o(n,"ltr")}),n.addCommand("mceDirectionRTL",function(){o(n,"rtl")})},f=u(!1),l=u(!0),a=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:l,getOr:s,getOrThunk:N,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:s,orThunk:N,map:t,each:n,bind:t,exists:f,forall:l,filter:t,equals:m,equals_:m,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(e),e);function m(n){return n.isNone()}function N(n){return n()}function s(n){return n}function g(n,t){var e=n.dom(),r=i.window.getComputedStyle(e).getPropertyValue(t),o=""!==r||function(n){var t=A(n)?n.dom().parentNode:n.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}(n)?r:w(e,t);return null===o?undefined:o}function T(t,r){return function(e){function n(n){var t=p.fromDom(n.element);e.setActive(function(n){return"rtl"===g(n,"direction")?"rtl":"ltr"}(t)===r)}return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}var E,O,y=function(e){function n(){return o}function t(n){return n(e)}var r=u(e),o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:l,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return y(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?o:a},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return o},D=function(n){return null===n||n===undefined?a:y(n)},h=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(n)}},p={fromHtml:function(n,t){var e=(t||i.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw i.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return h(e.childNodes[0])},fromTag:function(n,t){var e=(t||i.document).createElement(n);return h(e)},fromText:function(n,t){var e=(t||i.document).createTextNode(n);return h(e)},fromDom:h,fromPoint:function(n,t,e){var r=n.dom();return D(r.elementFromPoint(t,e)).map(h)}},_=(E="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===E}),v=Array.prototype.slice,C=(_(Array.from)&&Array.from,i.Node.ATTRIBUTE_NODE,i.Node.CDATA_SECTION_NODE,i.Node.COMMENT_NODE,i.Node.DOCUMENT_NODE,i.Node.DOCUMENT_TYPE_NODE,i.Node.DOCUMENT_FRAGMENT_NODE,i.Node.ELEMENT_NODE,i.Node.TEXT_NODE),A=(i.Node.PROCESSING_INSTRUCTION_NODE,i.Node.ENTITY_REFERENCE_NODE,i.Node.ENTITY_NODE,i.Node.NOTATION_NODE,"undefined"!=typeof i.window?i.window:Function("return this;")(),O=C,function(n){return function(n){return n.dom().nodeType}(n)===O}),w=function(n,t){return function(n){return n.style!==undefined&&_(n.style.getPropertyValue)}(n)?n.style.getPropertyValue(t):""},S=function(n){n.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return n.execCommand("mceDirectionLTR")},onSetup:T(n,"ltr")}),n.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return n.execCommand("mceDirectionRTL")},onSetup:T(n,"rtl")})};!function R(){r.add("directionality",function(n){d(n),S(n)})}()}(window);
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},t=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};!function e(){n.add("hr",function(n){o(n),t(n)})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function t(){}function n(t){return function(){return t}}function e(){return h}var r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),m=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("importcss_merge_classes")},i=function(t){return t.getParam("importcss_exclusive")},p=function(t){return t.getParam("importcss_selector_converter")},g=function(t){return t.getParam("importcss_selector_filter")},y=function(t){return t.getParam("importcss_groups")},v=function(t){return t.getParam("importcss_append")},d=function(t){return t.getParam("importcss_file_filter")},u=n(!1),s=n(!0),h=(r={fold:function(t,n){return t()},is:u,isSome:u,isNone:s,getOr:O,getOrThunk:x,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:n(null),getOrUndefined:n(undefined),or:O,orThunk:x,map:e,each:t,bind:e,exists:u,forall:s,filter:e,equals:_,equals_:_,toArray:function(){return[]},toString:n("none()")},Object.freeze&&Object.freeze(r),r);function _(t){return t.isNone()}function x(t){return t()}function O(t){return t}function T(n){return function(t){return function(t){if(null===t)return"null";var n=typeof t;return"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n}(t)===n}}function b(t,n){return function(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!w(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);M.apply(n,t[e])}return n}(function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(t,n))}function k(n){return"string"==typeof n?function(t){return-1!==t.indexOf(n)}:n instanceof RegExp?function(t){return n.test(t)}:n}function S(i,t,u){var c=[],e={};function s(t,n){var e,r=t.href;if((r=function(t){var n=l.cacheSuffix;return"string"==typeof t&&(t=t.replace("?"+n,"").replace("&"+n,"")),t}(r))&&u(r,n)&&!function(t,n){var e=t.settings,r=!1!==e.skin&&(e.skin||"oxide");if(r){var o=e.skin_url?t.documentBaseURI.toAbsolute(e.skin_url):f.baseURL+"/skins/ui/"+r,i=f.baseURL+"/skins/content/";return n===o+"/content"+(t.inline?".inline":"")+".min.css"||-1!==n.indexOf(i)}return!1}(i,r)){m.each(t.imports,function(t){s(t,!0)});try{e=t.cssRules||t.rules}catch(o){}m.each(e,function(t){t.styleSheet?s(t.styleSheet,!0):t.selectorText&&m.each(t.selectorText.split(","),function(t){c.push(m.trim(t))})})}}m.each(i.contentCSS,function(t){e[t]=!0}),u=u||function(t,n){return n||e[t]};try{m.each(t.styleSheets,function(t){s(t)})}catch(n){}return c}function A(t,n){var e,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(n);if(r){var o=r[1],i=r[2].substr(1).split(".").join(" "),u=m.makeMap("a,img");return r[1]?(e={title:n},t.schema.getTextBlockElements()[o]?e.block=o:t.schema.getBlockElements()[o]||u[o.toLowerCase()]?e.selector=o:e.inline=o):r[2]&&(e={inline:"span",title:n.substr(1),classes:i}),!1!==c(t)?e.classes=i:e.attributes={"class":i},e}}function P(t,n){return null===n||!1!==i(t)}var w=T("array"),E=T("function"),I=Array.prototype.slice,M=Array.prototype.push,j=(E(Array.from)&&Array.from,A),D=function(s){s.on("init",function(t){function r(t,n){if(function(t,n,e,r){return!(P(t,e)?n in r:n in e.selectors)}(s,t,n,i)){!function(t,n,e,r){P(t,e)?r[n]=!0:e.selectors[n]=!0}(s,t,n,i);var e=function(t,n,e,r){return(r&&r.selector_converter?r.selector_converter:p(t)?p(t):function(){return A(t,e)}).call(n,e,r)}(s,s.plugins.importcss,t,n);if(e){var r=e.name||a.DOM.uniqueId();return s.formatter.register(r,e),m.extend({},{title:e.title,format:r})}}return null}var o=function(){var n=[],e=[],r={};return{addItemToGroup:function(t,n){r[t]?r[t].push(n):(e.push(t),r[t]=[n])},addItem:function(t){n.push(t)},toFormats:function(){return b(e,function(t){var n=r[t];return 0===n.length?[]:[{title:t,items:n}]}).concat(n)}}}(),i={},u=k(g(s)),c=function(t){return m.map(t,function(t){return m.extend({},t,{original:t,selectors:{},filter:k(t.filter),item:{text:t.title,menu:[]}})})}(y(s));m.each(S(s,s.getDoc(),k(d(s))),function(e){if(-1===e.indexOf(".mce-")&&(!u||u(e))){var t=function(t,n){return m.grep(t,function(t){return!t.filter||t.filter(n)})}(c,e);if(0<t.length)m.each(t,function(t){var n=r(e,t);n&&o.addItemToGroup(t.title,n)});else{var n=r(e,null);n&&o.addItem(n)}}});var n=o.toFormats();s.fire("addStyleModifications",{items:n,replace:!v(s)})})},R=function(n){return{convertSelectorToFormat:function(t){return j(n,t)}}};!function U(){o.add("importcss",function(t){return D(t),R(t)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function n(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function r(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function a(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function i(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",a(n.getMonth()+1,2))).replace("%d",a(n.getDate(),2))).replace("%H",""+a(n.getHours(),2))).replace("%M",""+a(n.getMinutes(),2))).replace("%S",""+a(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(f[n.getMonth()]))).replace("%b",""+e.translate(d[n.getMonth()]))).replace("%A",""+e.translate(s[n.getDay()]))).replace("%a",""+e.translate(l[n.getDay()]))).replace("%%","%")}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},o=n,u=r,c=function(e){var t=r(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},l="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),s="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),d="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),f="January February March April May June July August September October November December".split(" "),p=function(e,t){if(m(e)){var n=i(e,t),r=void 0;r=/%[HMSIp]/.test(t)?i(e,"%Y-%m-%dT%H:%M"):i(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?function(e,t,n,r){var a=e.dom.create("time",{datetime:n},r);t.parentNode.insertBefore(a,t),e.dom.remove(t),e.selection.select(a,!0),e.selection.collapse(!1)}(e,a,r,n):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(i(e,t))},g=i,y=function(e){e.addCommand("mceInsertDate",function(){p(e,t(e))}),e.addCommand("mceInsertTime",function(){p(e,o(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return S(t())}}},v=function(n){var t=u(n),r=S(c(n));n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===r.get()},fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];p(n,r.get())},onItemAction:function(e,t){r.set(t),p(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(e){return{type:"menuitem",text:g(n,e),onAction:function(e){return function(){r.set(e),p(n,e)}}(e)}})}})};!function h(){e.add("insertdatetime",function(e){y(e),v(e)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(e){return e.getParam("font_formats")},i=function(e){return e.getParam("fontsize_formats")},n=function(e,t){e.settings.fontsize_formats=t},l=function(e,t){e.settings.font_formats=t},s=function(e){return e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")},r=function(e,t){e.settings.inline_styles=t},o=function(e){!function(e){r(e,!1),i(e)||n(e,"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t(e)||l(e,"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats")}(e),e.on("PreInit",function(){return function(e){var t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=a.explode(s(e)),n=e.schema;e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return a.inArray(i,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),a.each("b,i,u,strike".split(","),function(e){n.addValidElements(e+"[*]")}),n.getElementRule("font")||n.addValidElements("font[face|size|color|style]"),a.each(t.split(","),function(e){var t=n.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})}(e)})};!function c(){e.add("legacyoutput",function(e){o(e)})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function o(n,e){for(var t="",o=0;o<e;o++)t+=n;return t}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},a=function(n){return n.getParam("nonbreaking_wrap",!0,"boolean")},r=function(n,e){var t=a(n)||n.plugins.visualchars?'<span class="'+(function(n){return!!n.plugins.visualchars&&n.plugins.visualchars.isEnabled()}(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+o("&nbsp;",e)+"</span>":o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(t)})},e=function(n){n.addCommand("mceNonBreaking",function(){r(n,1)})},c=tinymce.util.Tools.resolve("tinymce.util.VK"),t=function(e){var t=i(e);0<t&&e.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(e,t)}})},u=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};!function s(){n.add("nonbreaking",function(n){e(n),u(n),t(n)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function c(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}}function l(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a)if(-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},s=function(t){return t.getParam("noneditable_editable_class","mceEditable")},d=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},n=function(n){var t,e,r="contenteditable";t=" "+u.trim(s(n))+" ",e=" "+u.trim(f(n))+" ";var a=c(t),i=c(e),o=d(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],l(t,a,f(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};!function e(){t.add("noneditable",function(t){n(t)})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function e(){return"mce-pagebreak"}function a(){return'<img src="'+t.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),r=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},o=function(o){var c=r(o),n=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");o.on("BeforeSetContent",function(e){e.content=e.content.replace(n,a())}),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=a,u=e,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(){n.add("pagebreak",function(e){g(e),s(e),o(e),m(e)})}()}();
+17 -14
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
@@ -1580,8 +1580,8 @@
return action(editor, html, pasteHtml) !== true;
});
};
var insertContent = function (editor, html) {
if (Settings.isSmartPasteEnabled(editor) === false) {
var insertContent = function (editor, html, pasteAsText) {
if (pasteAsText || Settings.isSmartPasteEnabled(editor) === false) {
pasteHtml(editor, html);
} else {
smartInsertContent(editor, html);
@@ -1629,18 +1629,21 @@
return result.str;
};
var doPaste = function (editor, content, internal, pasteAsText) {
var args = ProcessFilters.process(editor, content, internal);
if (args.cancelled === false) {
SmartPaste.insertContent(editor, args.content, pasteAsText);
}
};
var pasteHtml$1 = function (editor, html, internalFlag) {
var internal = internalFlag ? internalFlag : InternalHtml.isMarked(html);
var args = ProcessFilters.process(editor, InternalHtml.unmark(html), internal);
if (args.cancelled === false) {
SmartPaste.insertContent(editor, args.content);
}
doPaste(editor, InternalHtml.unmark(html), internal, false);
};
var pasteText = function (editor, text) {
var encodedText = editor.dom.encode(text).replace(/\r\n/g, '\n');
var normalizedText = normalizeWhitespace(encodedText);
var html = Newlines.convert(normalizedText, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs);
pasteHtml$1(editor, html, false);
doPaste(editor, html, false, true);
};
var getDataTransferItems = function (dataTransfer) {
var items = {};
@@ -1803,7 +1806,7 @@
}
});
function insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal) {
var content, isPlainTextHtml;
var content, isPlainTextHtml, isImage;
if (hasContentType(clipboardContent, 'text/html')) {
content = clipboardContent['text/html'];
} else {
@@ -1816,10 +1819,11 @@
content = Utils.trimHtml(content);
pasteBin.remove();
isPlainTextHtml = internal === false && Newlines.isPlainText(content);
if (!content.length || isPlainTextHtml) {
isImage = SmartPaste.isImageUrl(content);
if (!content.length || isPlainTextHtml && !isImage) {
plainTextMode = true;
}
if (plainTextMode) {
if (plainTextMode || isImage) {
if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) {
content = clipboardContent['text/plain'];
} else {
@@ -2051,8 +2055,6 @@
};
};
var noop$1 = function () {
};
var hasWorkingClipboardApi = function (clipboardData) {
return global$2.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
};
@@ -2140,7 +2142,8 @@
var copy = function (editor) {
return function (evt) {
if (hasSelectedContent(editor)) {
setClipboardData(evt, getData(editor), fallback(editor), noop$1);
setClipboardData(evt, getData(editor), fallback(editor), function () {
});
}
};
};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=function(e){return e.getParam("content_style","")},u=function(e){return e.getParam("content_css_cors",!1,"boolean")},y=tinymce.util.Tools.resolve("tinymce.Env"),n=function(t){var n="",i=t.dom.encode,e=m(t);n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>");var o=u(t)?' crossorigin="anonymous"':"";l.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"});var r=t.settings.body_id||"tinymce";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_id","","hash"))[t.id]||r);var a=t.settings.body_class||"";-1!==a.indexOf("=")&&(a=(a=t.getParam("body_class","","hash"))[t.id]||"");var c='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(y.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",s=t.getBody().dir,d=s?' dir="'+i(s)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(r)+'" class="mce-content-body '+i(a)+'"'+d+">"+t.getContent()+c+"</body></html>"},t=function(e){e.addCommand("mcePreview",function(){!function(e){var t=n(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")}(e)})},i=function(e){e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return e.execCommand("mcePreview")}}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return e.execCommand("mcePreview")}})};!function o(){e.add("preview",function(e){t(e),i(e)})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),i=function(n){n.addCommand("mcePrint",function(){t.browser.isIE()?n.getDoc().execCommand("print",!1,null):n.getWin().print()})},e=function(n){n.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return n.execCommand("mcePrint")}}),n.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return n.execCommand("mcePrint")}})};!function o(){n.add("print",function(n){i(n),e(n),n.addShortcut("Meta+P","","mcePrint")})}()}();
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function t(n,e){n.notificationManager.open({text:e,type:"error"})}function e(t){return function(n){function e(){n.setDisabled(a(t)&&!t.isDirty())}return t.on("NodeChange dirty",e),function(){return t.off("NodeChange dirty",e)}}}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(n){return n.getParam("save_enablewhendirty",!0)},c=function(n){return!!n.getParam("save_onsavecallback")},r=function(n){return!!n.getParam("save_oncancelcallback")},u=function(n){var e;if(e=o.DOM.getParent(n.id,"form"),!a(n)||n.isDirty()){if(n.save(),c(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();e?(n.setDirty(!1),e.onsubmit&&!e.onsubmit()||("function"==typeof e.submit?e.submit():t(n,"Error: Form submit field collision.")),n.nodeChanged()):t(n,"Error: No form element found.")}},l=function(n){var e=i.trim(n.startContent);r(n)?n.execCallback("save_oncancelcallback",n):n.resetContent(e)},s=function(n){n.addCommand("mceSave",function(){u(n)}),n.addCommand("mceCancel",function(){l(n)})},d=function(n){n.ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:e(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:e(n)}),n.addShortcut("Meta+S","","mceSave")};!function m(){n.add("save",function(n){d(n),s(n)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(c){"use strict";function t(e){e.keyCode!==d.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.VK"),m=function(e){return e.getParam("tab_focus",function(e){return e.getParam("tabfocus_elements",":prev,:next")}(e))},v=n.DOM,i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==d.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=f.explode(m(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):v.get(e[0]):":next"===e[1]?u(1):v.get(e[1]))){var t=s.get(o.id||o.name);o.id&&t?t.focus():y.setTimeout(function(){a.webkit||c.window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&s.get(n.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),f.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&v.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",t),a.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};!function o(){e.add("tabfocus",function(e){i(e)})}()}(window);
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("textcolor",function(){o.console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function e(n){return function(t){function e(){return t.setDisabled(n.readonly||!v.hasHeaders(n))}return e(),n.on("LoadContent SetContent change",e),function(){return n.on("LoadContent SetContent change",e)}}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.util.I18n"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("toc_class","mce-toc")},d=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},a=function(t){var e=parseInt(t.getParam("toc_depth","3"),10);return 1<=e&&e<=9?e:3},s=function(e){var n=0;return function(){var t=(new Date).getTime().toString(32);return e+t+(n++).toString(32)}}("mcetoc_"),f=function f(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")},m=function(n){var o=c(n),t=d(n),e=f(a(n)),r=n.$(e);return r.length&&/^h[1-9]$/i.test(t)&&(r=r.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),i.map(r,function(t){return{id:t.id?t.id:s(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},o=function(t){var e,n,o,r,i="",c=m(t),a=function(t){var e,n=9;for(e=0;e<t.length;e++)if(t[e].level<n&&(n=t[e].level),1===n)return n;return n}(c)-1;if(!c.length)return"";for(i+=function(t,e){var n="</"+t+">";return"<"+t+' contenteditable="true">'+u.DOM.encode(e)+n}(d(t),l.translate("Table of Contents")),e=0;e<c.length;e++){if((o=c[e]).element.id=o.id,r=c[e+1]&&c[e+1].level,a===o.level)i+="<li>";else for(n=a;n<o.level;n++)i+="<ul><li>";if(i+='<a href="#'+o.id+'">'+o.title+"</a>",r!==o.level&&r)for(n=o.level;r<n;n--)i+="</li></ul><li>";else i+="</li>",r||(i+="</ul>");a=o.level}return i},r=function(t){var e=c(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(o(t))})},v={hasHeaders:function(t){return 0<m(t).length},insertToc:function(t){var e=c(t),n=t.$("."+e);!function(t,e){return!e.length||0<t.dom.getParents(e[0],".mce-offscreen-selection").length}(t,n)?r(t):t.insertContent(function(t){var e=o(t);return'<div class="'+t.dom.encode(c(t))+'" contenteditable="false">'+e+"</div>"}(t))},updateToc:r},n=function(t){t.addCommand("mceInsertToc",function(){v.insertToc(t)}),t.addCommand("mceUpdateToc",function(){v.updateToc(t)})},g=function(t){var n=t.$,o=c(t);t.on("PreProcess",function(t){var e=n("."+o,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),t.on("SetContent",function(){var t=n("."+o);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))})},h=function(t){t.ui.registry.addButton("toc",{icon:"toc",tooltip:"Table of contents",onAction:function(){return t.execCommand("mceInsertToc")},onSetup:e(t)}),t.ui.registry.addButton("tocupdate",{icon:"reload",tooltip:"Update",onAction:function(){return t.execCommand("mceUpdateToc")}}),t.ui.registry.addMenuItem("toc",{icon:"toc",text:"Table of contents",onAction:function(){return t.execCommand("mceInsertToc")},onSetup:e(t)}),t.ui.registry.addContextToolbar("toc",{items:"tocupdate",predicate:function(e){return function(t){return t&&e.dom.is(t,"."+c(e))&&e.getBody().contains(t)}}(t),scope:"node",position:"node"})};!function p(){t.add("toc",function(t){n(t),h(t),g(t)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
+1 -1
View File
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
!function(){"use strict";function n(n,e){return function(o){o.setActive(e.get());function t(t){return o.setActive(t.state)}return n.on("VisualBlocks",t),function(){return n.off("VisualBlocks",t)}}}var e=function(t){function o(){return n}var n=t;return{get:o,set:function(t){n=t},clone:function(){return e(o())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t,o){t.fire("VisualBlocks",{state:o})},u=function(t,o,n){t.dom.toggleClass(t.getBody(),"mce-visualblocks"),n.set(!n.get()),i(t,n.get())},c=function(t,o,n){t.addCommand("mceVisualBlocks",function(){u(t,o,n)})},s=function(t){return t.getParam("visualblocks_default_state",!1,"boolean")},l=function(o,t,n){o.on("PreviewFormats AfterPreviewFormats",function(t){n.get()&&o.dom.toggleClass(o.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),o.on("init",function(){s(o)&&u(o,t,n)}),o.on("remove",function(){o.dom.removeClass(o.getBody(),"mce-visualblocks")})},r=function(t,o){t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return t.execCommand("mceVisualBlocks")},onSetup:n(t,o)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",onAction:function(){return t.execCommand("mceVisualBlocks")},onSetup:n(t,o)})};!function o(){t.add("visualblocks",function(t,o){var n=e(!1);c(t,o,n),r(t,n),l(t,o,n)})}()}();
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function () {
'use strict';
File diff suppressed because one or more lines are too long
+144 -158
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
@@ -782,9 +782,6 @@
var execute = constant('alloy.execute');
var focusItem = constant('alloy.focus.item');
var tap = alloy.tap;
var tapOrClick = function () {
return detect$3().deviceType.isTouch() ? alloy.tap() : click();
};
var longpress = constant('alloy.longpress');
var systemInit = constant('alloy.system.init');
var attachedToDom = constant('alloy.system.attached');
@@ -2104,6 +2101,54 @@
return eq(component.element(), simulatedEvent.event().target());
};
function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
}
var ancestor = function (scope, predicate, isRoot) {
var element = scope.dom();
var stop = isFunction(isRoot) ? isRoot : constant(false);
while (element.parentNode) {
element = element.parentNode;
var el = Element.fromDom(element);
if (predicate(el)) {
return Option.some(el);
} else if (stop(el)) {
break;
}
}
return Option.none();
};
var closest = function (scope, predicate, isRoot) {
var is = function (s, test) {
return test(s);
};
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
};
var descendant = function (scope, predicate) {
var descend = function (node) {
for (var i = 0; i < node.childNodes.length; i++) {
var child_1 = Element.fromDom(node.childNodes[i]);
if (predicate(child_1)) {
return Option.some(child_1);
}
var res = descend(node.childNodes[i]);
if (res.isSome()) {
return res;
}
}
return Option.none();
};
return descend(scope.dom());
};
var closest$1 = function (target, transform, isRoot) {
var delegate = closest(target, function (elem) {
return transform(elem).isSome();
}, isRoot);
return delegate.bind(transform);
};
var nu$4 = function (parts) {
if (!hasKey$1(parts, 'can') && !hasKey$1(parts, 'abort') && !hasKey$1(parts, 'run')) {
throw new Error('EventHandler defined by: ' + JSON.stringify(parts, null, 2) + ' does not have can, abort, or run!');
@@ -2166,54 +2211,6 @@
});
};
function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
}
var ancestor = function (scope, predicate, isRoot) {
var element = scope.dom();
var stop = isFunction(isRoot) ? isRoot : constant(false);
while (element.parentNode) {
element = element.parentNode;
var el = Element.fromDom(element);
if (predicate(el)) {
return Option.some(el);
} else if (stop(el)) {
break;
}
}
return Option.none();
};
var closest = function (scope, predicate, isRoot) {
var is = function (s, test) {
return test(s);
};
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
};
var descendant = function (scope, predicate) {
var descend = function (node) {
for (var i = 0; i < node.childNodes.length; i++) {
var child_1 = Element.fromDom(node.childNodes[i]);
if (predicate(child_1)) {
return Option.some(child_1);
}
var res = descend(node.childNodes[i]);
if (res.isSome()) {
return res;
}
}
return Option.none();
};
return descend(scope.dom());
};
var closest$1 = function (target, transform, isRoot) {
var delegate = closest(target, function (elem) {
return transform(elem).isSome();
}, isRoot);
return delegate.bind(transform);
};
var derive = function (configs) {
return wrapAll$1(configs);
};
@@ -2239,8 +2236,11 @@
return {
key: name,
value: nu$4({
run: function (component) {
action.apply(undefined, [component].concat(extra));
run: function (component, simulatedEvent) {
action.apply(undefined, [
component,
simulatedEvent
].concat(extra));
}
})
};
@@ -3133,12 +3133,15 @@
};
var pointerEvents = function () {
var onClick = function (component, simulatedEvent) {
simulatedEvent.stop();
emitExecute(component);
};
return [
run(tapOrClick(), function (component, simulatedEvent) {
simulatedEvent.stop();
emitExecute(component);
}),
cutter(detect$3().deviceType.isTouch() ? touchstart() : mousedown())
run(click(), onClick),
run(tap(), onClick),
cutter(touchstart()),
cutter(mousedown())
];
};
var events$2 = function (optAction) {
@@ -4992,8 +4995,6 @@
getToolbarIconButton: getToolbarIconButton
};
var platform$1 = detect$3();
var isTouch = platform$1.deviceType.isTouch();
var labelPart = optional({
schema: [strict$1('dom')],
name: 'label'
@@ -5006,16 +5007,17 @@
return action.fold(function () {
return {};
}, function (a) {
var touchEvents = derive([runActionExtra(touchstart(), a, [detail])]);
var mouseEvents = derive([
runActionExtra(mousedown(), a, [detail]),
runActionExtra(mousemove(), function (l, det) {
if (det.mouseIsDown.get()) {
a(l, det);
}
}, [detail])
]);
return { events: isTouch ? touchEvents : mouseEvents };
return {
events: derive([
runActionExtra(touchstart(), a, [detail]),
runActionExtra(mousedown(), a, [detail]),
runActionExtra(mousemove(), function (l, se, det) {
if (det.mouseIsDown.get()) {
a(l, det);
}
}, [detail])
])
};
});
}
});
@@ -5057,20 +5059,8 @@
return model.setValueFrom(component, detail, value);
});
};
var touchEvents = derive([
run(touchstart(), setValueFrom),
run(touchmove(), setValueFrom)
]);
var mouseEvents = derive([
run(mousedown(), setValueFrom),
run(mousemove(), function (spectrum, se) {
if (detail.mouseIsDown.get()) {
setValueFrom(spectrum, se);
}
})
]);
return {
behaviours: derive$1(isTouch ? [] : [
behaviours: derive$1([
Keying.config({
mode: 'special',
onLeft: function (spectrum) {
@@ -5088,7 +5078,16 @@
}),
Focusing.config({})
]),
events: isTouch ? touchEvents : mouseEvents
events: derive([
run(touchstart(), setValueFrom),
run(touchmove(), setValueFrom),
run(mousedown(), setValueFrom),
run(mousemove(), function (spectrum, se) {
if (detail.mouseIsDown.get()) {
setValueFrom(spectrum, se);
}
})
])
};
}
});
@@ -5363,12 +5362,14 @@
};
var Position = r;
var isTouch$1 = detect$3().deviceType.isTouch();
var _sliderChangeEvent = 'slider.change.value';
var sliderChangeEvent = constant(_sliderChangeEvent);
var isTouchEvent = function (evt) {
return evt.type.indexOf('touch') !== -1;
};
var getEventSource = function (simulatedEvent) {
var evt = simulatedEvent.event().raw();
if (isTouch$1) {
if (isTouchEvent(evt)) {
var touchEvent = evt;
return touchEvent.touches !== undefined && touchEvent.touches.length === 1 ? Option.some(touchEvent.touches[0]).map(function (t) {
return Position(t.clientX, t.clientY);
@@ -5953,7 +5954,6 @@
edgeActions: edgeActions$2
});
var isTouch$2 = detect$3().deviceType.isTouch();
var SliderSchema = [
defaulted$1('stepSize', 1),
defaulted$1('onChange', noop),
@@ -6001,13 +6001,16 @@
field$1('sliderBehaviours', [
Keying,
Representing
])
].concat(!isTouch$2 ? [state$1('mouseIsDown', function () {
]),
state$1('mouseIsDown', function () {
return Cell(false);
})] : []);
})
];
var mouseReleased = constant('mouse.released');
var isTouch$3 = detect$3().deviceType.isTouch();
var sketch = function (detail, components, _spec, _externals) {
var _a;
var getThumb = function (component) {
return getPartOrDie(component, detail, 'thumb');
};
@@ -6050,70 +6053,50 @@
var resetToMax = function (slider) {
model.setToMax(slider, detail);
};
var touchEvents = [
run(touchstart(), function (slider, _simulatedEvent) {
detail.onDragStart(slider, getThumb(slider));
}),
run(touchend(), function (slider, _simulatedEvent) {
detail.onDragEnd(slider, getThumb(slider));
})
];
var mouseEvents = [
run(mousedown(), function (slider, simulatedEvent) {
simulatedEvent.stop();
detail.onDragStart(slider, getThumb(slider));
detail.mouseIsDown.set(true);
}),
run(mouseup(), function (slider, _simulatedEvent) {
detail.onDragEnd(slider, getThumb(slider));
})
];
var uiEventsArr = isTouch$3 ? touchEvents : mouseEvents;
var choose = function (slider) {
var fireOnChoose = function () {
getPart(slider, detail, 'thumb').each(function (thumb) {
var value = modelDetail.value.get();
detail.onChoose(slider, thumb, value);
});
};
var wasDown = detail.mouseIsDown.get();
detail.mouseIsDown.set(false);
if (wasDown) {
fireOnChoose();
}
};
var onDragStart = function (slider, simulatedEvent) {
simulatedEvent.stop();
detail.mouseIsDown.set(true);
detail.onDragStart(slider, getThumb(slider));
};
var onDragEnd = function (slider, simulatedEvent) {
simulatedEvent.stop();
detail.onDragEnd(slider, getThumb(slider));
choose(slider);
};
return {
uid: detail.uid,
dom: detail.dom,
components: components,
behaviours: augment(detail.sliderBehaviours, flatten([
!isTouch$3 ? [Keying.config({
mode: 'special',
focusIn: function (slider) {
return getPart(slider, detail, 'spectrum').map(Keying.focusIn).map(constant(true));
behaviours: augment(detail.sliderBehaviours, [
Keying.config({
mode: 'special',
focusIn: function (slider) {
return getPart(slider, detail, 'spectrum').map(Keying.focusIn).map(constant(true));
}
}),
Representing.config({
store: {
mode: 'manual',
getValue: function (_) {
return modelDetail.value.get();
}
})] : [],
[
Representing.config({
store: {
mode: 'manual',
getValue: function (_) {
return modelDetail.value.get();
}
}
}),
Receiving.config({
channels: {
'mouse.released': {
onReceive: function (slider, se) {
var fireOnChoose = function () {
getPart(slider, detail, 'thumb').each(function (thumb) {
var value = modelDetail.value.get();
detail.onChoose(slider, thumb, value);
});
};
if (isTouch$3) {
fireOnChoose();
} else {
var wasDown = detail.mouseIsDown.get();
detail.mouseIsDown.set(false);
if (wasDown) {
fireOnChoose();
}
}
}
}
}
})
]
])),
}
}),
Receiving.config({ channels: (_a = {}, _a[mouseReleased()] = { onReceive: choose }, _a) })
]),
events: derive([
run(sliderChangeEvent(), function (slider, simulatedEvent) {
changeValue(slider, simulatedEvent.event().value());
@@ -6125,8 +6108,12 @@
refresh(slider, thumb);
var spectrum = getSpectrum(slider);
detail.onInit(slider, thumb, spectrum, modelDetail.value.get());
})
].concat(uiEventsArr)),
}),
run(touchstart(), onDragStart),
run(touchend(), onDragEnd),
run(mousedown(), onDragStart),
run(mouseup(), onDragEnd)
]),
apis: {
resetToMin: resetToMin,
resetToMax: resetToMax,
@@ -6770,14 +6757,14 @@
query: query
};
var platform$2 = detect$3();
var platform$1 = detect$3();
var preserve = function (f, editor) {
var rng = editor.selection.getRng();
f();
editor.selection.setRng(rng);
};
var forAndroid = function (editor, f) {
var wrapper = platform$2.os.isAndroid() ? preserve : apply;
var wrapper = platform$1.os.isAndroid() ? preserve : apply;
wrapper(f, editor);
};
var RangePreserver = { forAndroid: forAndroid };
@@ -11577,13 +11564,12 @@
};
var setup$2 = function (container, rawSettings) {
var settings = asRawOrDie('Getting GUI events settings', settingsSchema, rawSettings);
var pointerEvents = detect$3().deviceType.isTouch() ? [
var pointerEvents = [
'touchstart',
'touchmove',
'touchend',
'touchcancel',
'gesturestart'
] : [
'gesturestart',
'mousedown',
'mouseup',
'mouseover',
File diff suppressed because one or more lines are too long
+261 -282
View File
@@ -4,7 +4,7 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.4 (2019-12-11)
* Version: 5.1.5 (2019-12-19)
*/
(function (domGlobals) {
'use strict';
@@ -1923,6 +1923,86 @@
return eq(component.element(), simulatedEvent.event().target());
};
function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
}
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
var name = function (element) {
var r = element.dom().nodeName;
return r.toLowerCase();
};
var type = function (element) {
return element.dom().nodeType;
};
var isType$1 = function (t) {
return function (element) {
return type(element) === t;
};
};
var isElement = isType$1(ELEMENT);
var isText = isType$1(TEXT);
var inBody = function (element) {
var dom = isText(element) ? element.dom().parentNode : element.dom();
return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
};
var body = cached(function () {
return getBody(Element.fromDom(domGlobals.document));
});
var getBody = function (doc) {
var b = doc.dom().body;
if (b === null || b === undefined) {
throw new Error('Body is not available yet');
}
return Element.fromDom(b);
};
var ancestor = function (scope, predicate, isRoot) {
var element = scope.dom();
var stop = isFunction(isRoot) ? isRoot : constant(false);
while (element.parentNode) {
element = element.parentNode;
var el = Element.fromDom(element);
if (predicate(el)) {
return Option.some(el);
} else if (stop(el)) {
break;
}
}
return Option.none();
};
var closest = function (scope, predicate, isRoot) {
var is = function (s, test) {
return test(s);
};
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
};
var descendant = function (scope, predicate) {
var descend = function (node) {
for (var i = 0; i < node.childNodes.length; i++) {
var child_1 = Element.fromDom(node.childNodes[i]);
if (predicate(child_1)) {
return Option.some(child_1);
}
var res = descend(node.childNodes[i]);
if (res.isSome()) {
return res;
}
}
return Option.none();
};
return descend(scope.dom());
};
var closest$1 = function (target, transform, isRoot) {
var delegate = closest(target, function (elem) {
return transform(elem).isSome();
}, isRoot);
return delegate.bind(transform);
};
var nu$4 = function (parts) {
if (!hasKey$1(parts, 'can') && !hasKey$1(parts, 'abort') && !hasKey$1(parts, 'run')) {
throw new Error('EventHandler defined by: ' + JSON.stringify(parts, null, 2) + ' does not have can, abort, or run!');
@@ -2012,9 +2092,6 @@
var execute = constant('alloy.execute');
var focusItem = constant('alloy.focus.item');
var tap = alloy.tap;
var tapOrClick = function () {
return detect$3().deviceType.isTouch() ? alloy.tap() : click();
};
var longpress = constant('alloy.longpress');
var sandboxClose = constant('alloy.sandbox.close');
var typeaheadCancel = constant('alloy.typeahead.cancel');
@@ -2054,86 +2131,6 @@
component.getSystem().triggerEvent(event, target, simulatedEvent.event());
};
function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
}
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
var name = function (element) {
var r = element.dom().nodeName;
return r.toLowerCase();
};
var type = function (element) {
return element.dom().nodeType;
};
var isType$1 = function (t) {
return function (element) {
return type(element) === t;
};
};
var isElement = isType$1(ELEMENT);
var isText = isType$1(TEXT);
var inBody = function (element) {
var dom = isText(element) ? element.dom().parentNode : element.dom();
return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
};
var body = cached(function () {
return getBody(Element.fromDom(domGlobals.document));
});
var getBody = function (doc) {
var b = doc.dom().body;
if (b === null || b === undefined) {
throw new Error('Body is not available yet');
}
return Element.fromDom(b);
};
var ancestor = function (scope, predicate, isRoot) {
var element = scope.dom();
var stop = isFunction(isRoot) ? isRoot : constant(false);
while (element.parentNode) {
element = element.parentNode;
var el = Element.fromDom(element);
if (predicate(el)) {
return Option.some(el);
} else if (stop(el)) {
break;
}
}
return Option.none();
};
var closest = function (scope, predicate, isRoot) {
var is = function (s, test) {
return test(s);
};
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
};
var descendant = function (scope, predicate) {
var descend = function (node) {
for (var i = 0; i < node.childNodes.length; i++) {
var child_1 = Element.fromDom(node.childNodes[i]);
if (predicate(child_1)) {
return Option.some(child_1);
}
var res = descend(node.childNodes[i]);
if (res.isSome()) {
return res;
}
}
return Option.none();
};
return descend(scope.dom());
};
var closest$1 = function (target, transform, isRoot) {
var delegate = closest(target, function (elem) {
return transform(elem).isSome();
}, isRoot);
return delegate.bind(transform);
};
var derive = function (configs) {
return wrapAll$1(configs);
};
@@ -2169,8 +2166,11 @@
return {
key: name,
value: nu$4({
run: function (component) {
action.apply(undefined, [component].concat(extra));
run: function (component, simulatedEvent) {
action.apply(undefined, [
component,
simulatedEvent
].concat(extra));
}
})
};
@@ -7715,12 +7715,15 @@
});
var pointerEvents = function () {
var onClick = function (component, simulatedEvent) {
simulatedEvent.stop();
emitExecute(component);
};
return [
run(tapOrClick(), function (component, simulatedEvent) {
simulatedEvent.stop();
emitExecute(component);
}),
cutter(detect$3().deviceType.isTouch() ? touchstart() : mousedown())
run(click(), onClick),
run(tap(), onClick),
cutter(touchstart()),
cutter(mousedown())
];
};
var events$7 = function (optAction) {
@@ -10549,6 +10552,10 @@
col: col
});
};
var onClick = function (c, se) {
se.stop();
emitExecute(c);
};
return build$1({
dom: {
tag: 'div',
@@ -10558,10 +10565,8 @@
config('insert-table-picker-cell', [
run(mouseover(), Focusing.focus),
run(execute(), emitExecute),
run(tapOrClick(), function (c, se) {
se.stop();
emitExecute(c);
})
run(click(), onClick),
run(tap(), onClick)
]),
Toggling.config({
toggleClass: 'tox-insert-table-picker__selected',
@@ -12210,13 +12215,12 @@
};
var setup$1 = function (container, rawSettings) {
var settings = asRawOrDie('Getting GUI events settings', settingsSchema, rawSettings);
var pointerEvents = detect$3().deviceType.isTouch() ? [
var pointerEvents = [
'touchstart',
'touchmove',
'touchend',
'touchcancel',
'gesturestart'
] : [
'gesturestart',
'mousedown',
'mouseup',
'mouseover',
@@ -12864,7 +12868,7 @@
if (longpressFired.get()) {
e.preventDefault();
} else {
var result = editor.fire('tap');
var result = editor.fire('tap', { touches: e.touches });
if (result.isDefaultPrevented()) {
e.preventDefault();
}
@@ -14562,8 +14566,6 @@
var sliderUpdate = constant(generate$1('slider-update'));
var paletteUpdate = constant(generate$1('palette-update'));
var platform$1 = detect$3();
var isTouch = platform$1.deviceType.isTouch();
var labelPart = optional({
schema: [strict$1('dom')],
name: 'label'
@@ -14576,16 +14578,17 @@
return action.fold(function () {
return {};
}, function (a) {
var touchEvents = derive([runActionExtra(touchstart(), a, [detail])]);
var mouseEvents = derive([
runActionExtra(mousedown(), a, [detail]),
runActionExtra(mousemove(), function (l, det) {
if (det.mouseIsDown.get()) {
a(l, det);
}
}, [detail])
]);
return { events: isTouch ? touchEvents : mouseEvents };
return {
events: derive([
runActionExtra(touchstart(), a, [detail]),
runActionExtra(mousedown(), a, [detail]),
runActionExtra(mousemove(), function (l, se, det) {
if (det.mouseIsDown.get()) {
a(l, det);
}
}, [detail])
])
};
});
}
});
@@ -14627,20 +14630,8 @@
return model.setValueFrom(component, detail, value);
});
};
var touchEvents = derive([
run(touchstart(), setValueFrom),
run(touchmove(), setValueFrom)
]);
var mouseEvents = derive([
run(mousedown(), setValueFrom),
run(mousemove(), function (spectrum, se) {
if (detail.mouseIsDown.get()) {
setValueFrom(spectrum, se);
}
})
]);
return {
behaviours: derive$1(isTouch ? [] : [
behaviours: derive$1([
Keying.config({
mode: 'special',
onLeft: function (spectrum) {
@@ -14658,7 +14649,16 @@
}),
Focusing.config({})
]),
events: isTouch ? touchEvents : mouseEvents
events: derive([
run(touchstart(), setValueFrom),
run(touchmove(), setValueFrom),
run(mousedown(), setValueFrom),
run(mousemove(), function (spectrum, se) {
if (detail.mouseIsDown.get()) {
setValueFrom(spectrum, se);
}
})
])
};
}
});
@@ -14676,12 +14676,14 @@
spectrumPart
];
var isTouch$1 = detect$3().deviceType.isTouch();
var _sliderChangeEvent = 'slider.change.value';
var sliderChangeEvent = constant(_sliderChangeEvent);
var isTouchEvent = function (evt) {
return evt.type.indexOf('touch') !== -1;
};
var getEventSource = function (simulatedEvent) {
var evt = simulatedEvent.event().raw();
if (isTouch$1) {
if (isTouchEvent(evt)) {
var touchEvent = evt;
return touchEvent.touches !== undefined && touchEvent.touches.length === 1 ? Option.some(touchEvent.touches[0]).map(function (t) {
return Position(t.clientX, t.clientY);
@@ -15266,7 +15268,6 @@
edgeActions: edgeActions$2
});
var isTouch$2 = detect$3().deviceType.isTouch();
var SliderSchema = [
defaulted$1('stepSize', 1),
defaulted$1('onChange', noop),
@@ -15314,13 +15315,14 @@
field$1('sliderBehaviours', [
Keying,
Representing
])
].concat(!isTouch$2 ? [state$1('mouseIsDown', function () {
]),
state$1('mouseIsDown', function () {
return Cell(false);
})] : []);
})
];
var isTouch$3 = detect$3().deviceType.isTouch();
var sketch = function (detail, components, _spec, _externals) {
var _a;
var getThumb = function (component) {
return getPartOrDie(component, detail, 'thumb');
};
@@ -15363,70 +15365,50 @@
var resetToMax = function (slider) {
model.setToMax(slider, detail);
};
var touchEvents = [
run(touchstart(), function (slider, _simulatedEvent) {
detail.onDragStart(slider, getThumb(slider));
}),
run(touchend(), function (slider, _simulatedEvent) {
detail.onDragEnd(slider, getThumb(slider));
})
];
var mouseEvents = [
run(mousedown(), function (slider, simulatedEvent) {
simulatedEvent.stop();
detail.onDragStart(slider, getThumb(slider));
detail.mouseIsDown.set(true);
}),
run(mouseup(), function (slider, _simulatedEvent) {
detail.onDragEnd(slider, getThumb(slider));
})
];
var uiEventsArr = isTouch$3 ? touchEvents : mouseEvents;
var choose = function (slider) {
var fireOnChoose = function () {
getPart(slider, detail, 'thumb').each(function (thumb) {
var value = modelDetail.value.get();
detail.onChoose(slider, thumb, value);
});
};
var wasDown = detail.mouseIsDown.get();
detail.mouseIsDown.set(false);
if (wasDown) {
fireOnChoose();
}
};
var onDragStart = function (slider, simulatedEvent) {
simulatedEvent.stop();
detail.mouseIsDown.set(true);
detail.onDragStart(slider, getThumb(slider));
};
var onDragEnd = function (slider, simulatedEvent) {
simulatedEvent.stop();
detail.onDragEnd(slider, getThumb(slider));
choose(slider);
};
return {
uid: detail.uid,
dom: detail.dom,
components: components,
behaviours: augment(detail.sliderBehaviours, flatten([
!isTouch$3 ? [Keying.config({
mode: 'special',
focusIn: function (slider) {
return getPart(slider, detail, 'spectrum').map(Keying.focusIn).map(constant(true));
behaviours: augment(detail.sliderBehaviours, [
Keying.config({
mode: 'special',
focusIn: function (slider) {
return getPart(slider, detail, 'spectrum').map(Keying.focusIn).map(constant(true));
}
}),
Representing.config({
store: {
mode: 'manual',
getValue: function (_) {
return modelDetail.value.get();
}
})] : [],
[
Representing.config({
store: {
mode: 'manual',
getValue: function (_) {
return modelDetail.value.get();
}
}
}),
Receiving.config({
channels: {
'mouse.released': {
onReceive: function (slider, se) {
var fireOnChoose = function () {
getPart(slider, detail, 'thumb').each(function (thumb) {
var value = modelDetail.value.get();
detail.onChoose(slider, thumb, value);
});
};
if (isTouch$3) {
fireOnChoose();
} else {
var wasDown = detail.mouseIsDown.get();
detail.mouseIsDown.set(false);
if (wasDown) {
fireOnChoose();
}
}
}
}
}
})
]
])),
}
}),
Receiving.config({ channels: (_a = {}, _a[mouseReleased()] = { onReceive: choose }, _a) })
]),
events: derive([
run(sliderChangeEvent(), function (slider, simulatedEvent) {
changeValue(slider, simulatedEvent.event().value());
@@ -15438,8 +15420,12 @@
refresh(slider, thumb);
var spectrum = getSpectrum(slider);
detail.onInit(slider, thumb, spectrum, modelDetail.value.get());
})
].concat(uiEventsArr)),
}),
run(touchstart(), onDragStart),
run(touchend(), onDragEnd),
run(mousedown(), onDragStart),
run(mouseup(), onDragEnd)
]),
apis: {
resetToMin: resetToMin,
resetToMax: resetToMax,
@@ -16260,7 +16246,10 @@
},
styles: { display: 'none' }
},
behaviours: derive$1([config('input-file-events', [cutter(tapOrClick())])])
behaviours: derive$1([config('input-file-events', [
cutter(click()),
cutter(tap())
])])
});
var renderField = function (s) {
return {
@@ -20744,17 +20733,19 @@
});
set(comp.element(), html.join(''));
};
var onClick = runOnItem(function (comp, se, tgt, itemValue) {
se.stop();
emitWith(comp, formActionEvent, {
name: spec.name,
value: itemValue
});
});
var collectionEvents = [
run(mouseover(), runOnItem(function (comp, se, tgt) {
focus$1(tgt);
})),
run(tapOrClick(), runOnItem(function (comp, se, tgt, itemValue) {
se.stop();
emitWith(comp, formActionEvent, {
name: spec.name,
value: itemValue
});
})),
run(click(), onClick),
run(tap(), onClick),
run(focusin(), runOnItem(function (comp, se, tgt) {
descendant$1(comp.element(), '.' + activeClass).each(function (currentActive) {
remove$4(currentActive, activeClass);
@@ -27191,11 +27182,11 @@
var transpose$1 = function (pos, dx, dy) {
return nu$d(pos.x + dx, pos.y + dy);
};
var isTouchEvent = function (e) {
var isTouchEvent$1 = function (e) {
return e.type === 'longpress' || e.type.indexOf('touch') === 0;
};
var fromPageXY = function (e) {
if (isTouchEvent(e)) {
if (isTouchEvent$1(e)) {
var touch = e.touches[0];
return nu$d(touch.pageX, touch.pageY);
} else {
@@ -27203,7 +27194,7 @@
}
};
var fromClientXY = function (e) {
if (isTouchEvent(e)) {
if (isTouchEvent$1(e)) {
var touch = e.touches[0];
return nu$d(touch.clientX, touch.clientY);
} else {
@@ -27584,6 +27575,26 @@
}));
};
var SnapSchema = optionObjOf('snaps', [
strict$1('getSnapPoints'),
onHandler('onSensor'),
strict$1('leftAttr'),
strict$1('topAttr'),
defaulted$1('lazyViewport', win),
defaulted$1('mustSnap', false)
]);
var schema$s = [
defaulted$1('useFixed', never),
strict$1('blockerClass'),
defaulted$1('getTarget', identity),
defaulted$1('onDrag', noop),
defaulted$1('repositionTarget', true),
defaulted$1('onDrop', noop),
defaultedFunction('getBounds', win),
SnapSchema
];
var get$d = function (component, snapsInfo) {
var element = component.element();
var x = parseInt(get$2(element, snapsInfo.leftAttr), 10);
@@ -27763,15 +27774,18 @@
dragState.reset();
dragConfig.onDrop(component, target);
};
var SnapSchema = optionObjOf('snaps', [
strict$1('getSnapPoints'),
onHandler('onSensor'),
strict$1('leftAttr'),
strict$1('topAttr'),
defaulted$1('lazyViewport', win),
defaulted$1('mustSnap', false)
]);
var handlers = function (events) {
return function (dragConfig, dragState) {
var updateStartState = function (comp) {
dragState.setStartData(calcStartData(dragConfig, comp));
};
return derive(__spreadArrays([run(windowScroll(), function (comp) {
dragState.getStartData().each(function () {
return updateStartState(comp);
});
})], events(dragConfig, dragState, updateStartState)));
};
};
var init$c = function (dragApi) {
return derive([
@@ -27796,17 +27810,8 @@
getDelta: getDelta$1
});
var handlers = function (dragConfig, dragState) {
var updateStartState = function (comp) {
dragState.setStartData(calcStartData(dragConfig, comp));
};
return derive([
run(windowScroll(), function (comp) {
dragState.getStartData().each(function () {
return updateStartState(comp);
});
}),
run(mousedown(), function (component, simulatedEvent) {
var events$g = function (dragConfig, dragState, updateStartState) {
return [run(mousedown(), function (component, simulatedEvent) {
var raw = simulatedEvent.event().raw();
if (raw.button !== 0) {
return;
@@ -27831,20 +27836,9 @@
instigate(component, blocker);
};
start();
})
]);
})];
};
var schema$s = [
defaulted$1('useFixed', never),
strict$1('blockerClass'),
defaulted$1('getTarget', identity),
defaulted$1('onDrag', noop),
defaulted$1('repositionTarget', true),
onHandler('onDrop'),
defaultedFunction('getBounds', win),
SnapSchema,
output('dragger', { handlers: handlers })
];
var schema$t = __spreadArrays(schema$s, [output('dragger', { handlers: handlers(events$g) })]);
var init$d = function (dragApi) {
return derive([
@@ -27875,17 +27869,9 @@
getDelta: getDelta$2
});
var handlers$1 = function (dragConfig, dragState) {
var events$h = function (dragConfig, dragState, updateStartState) {
var blockerCell = Cell(Option.none());
var updateStartState = function (comp) {
dragState.setStartData(calcStartData(dragConfig, comp));
};
return derive([
run(windowScroll(), function (comp) {
dragState.getStartData().each(function () {
return updateStartState(comp);
});
}),
return [
run(touchstart(), function (component, simulatedEvent) {
simulatedEvent.stop();
var stop$1 = function () {
@@ -27913,7 +27899,8 @@
simulatedEvent.stop();
move$1(component, dragConfig, dragState, TouchData, simulatedEvent.event());
}),
run(touchend(), function (component) {
run(touchend(), function (component, simulatedEvent) {
simulatedEvent.stop();
stop(component, blockerCell.get(), dragConfig, dragState);
blockerCell.set(Option.none());
}),
@@ -27921,26 +27908,23 @@
stop(component, blockerCell.get(), dragConfig, dragState);
blockerCell.set(Option.none());
})
]);
];
};
var schema$t = [
defaulted$1('useFixed', never),
strict$1('blockerClass'),
defaulted$1('getTarget', identity),
defaulted$1('onDrag', noop),
defaulted$1('repositionTarget', true),
defaulted$1('onDrop', noop),
defaultedFunction('getBounds', win),
SnapSchema,
output('dragger', { handlers: handlers$1 })
];
var schema$u = __spreadArrays(schema$s, [output('dragger', { handlers: handlers(events$h) })]);
var mouse = schema$s;
var touch = schema$t;
var events$i = function (dragConfig, dragState, updateStartState) {
return __spreadArrays(events$g(dragConfig, dragState, updateStartState), events$h(dragConfig, dragState, updateStartState));
};
var schema$v = __spreadArrays(schema$s, [output('dragger', { handlers: handlers(events$i) })]);
var mouse = schema$t;
var touch = schema$u;
var mouseOrTouch = schema$v;
var DraggingBranches = /*#__PURE__*/Object.freeze({
mouse: mouse,
touch: touch
touch: touch,
mouseOrTouch: mouseOrTouch
});
var init$e = function () {
@@ -28019,7 +28003,7 @@
apis: DraggingApis
});
var platform$2 = detect$3();
var platform$1 = detect$3();
var snapWidth = 40;
var snapOffset = snapWidth / 2;
var calcSnap = function (selectorOpt, td, x, y, width, height) {
@@ -28072,7 +28056,7 @@
},
buttonBehaviours: derive$1([
Dragging.config({
mode: platform$2.deviceType.isTouch() ? 'touch' : 'mouse',
mode: 'mouseOrTouch',
blockerClass: 'blocker',
snaps: snaps
}),
@@ -28167,7 +28151,7 @@
var snapLastBottomRight = function () {
return finishCell.get().each(snapBottomRight);
};
if (platform$2.deviceType.isTouch()) {
if (platform$1.deviceType.isTouch()) {
editor.on('TableSelectionChange', function (e) {
if (!isVisible.get()) {
attach$1(sink, topLeft);
@@ -28183,7 +28167,7 @@
snapBottomRight(e.finish);
});
});
editor.on('resize ScrollContent', function () {
editor.on('ResizeEditor ResizeWindow ScrollContent', function () {
snapLastTopLeft();
snapLastBottomRight();
});
@@ -28329,7 +28313,6 @@
var ElementPath = { renderElementPath: renderElementPath };
var renderWordCount = function (editor, providersBackstage) {
var _a;
var replaceCountText = function (comp, count, mode) {
return Replacing.set(comp, [text(providersBackstage.translate([
'{0} ' + mode,
@@ -28358,7 +28341,7 @@
}
}),
config('wordcount-events', [
run(tapOrClick(), function (comp) {
runOnExecute(function (comp) {
var currentVal = Representing.getValue(comp);
var newMode = currentVal.mode === 'words' ? 'characters' : 'words';
Representing.setValue(comp, {
@@ -28378,11 +28361,7 @@
});
})
])
]),
eventOrder: (_a = {}, _a[tapOrClick()] = [
'wordcount-events',
'alloy.base.behaviour'
], _a)
])
});
};
@@ -28760,7 +28739,7 @@
}
};
var schema$u = constant([
var schema$w = constant([
strict$1('lazySink'),
option('dragBlockClass'),
defaultedFunction('getBounds', win),
@@ -28944,7 +28923,7 @@
};
var ModalDialog = composite$1({
name: 'ModalDialog',
configFields: schema$u(),
configFields: schema$w(),
partFields: parts$e(),
factory: factory$h,
apis: {
@@ -29487,7 +29466,7 @@
factory: factory$i
});
var schema$v = constant([
var schema$x = constant([
strict$1('tabs'),
strict$1('dom'),
defaulted$1('clickToDismiss', false),
@@ -29573,7 +29552,7 @@
};
var Tabbar = composite$1({
name: 'Tabbar',
configFields: schema$v(),
configFields: schema$x(),
partFields: parts$f(),
factory: factory$j
});
@@ -29592,7 +29571,7 @@
factory: factory$k
});
var schema$w = constant([
var schema$y = constant([
defaulted$1('selectFirst', true),
onHandler('onChangeTab'),
onHandler('onDismissTab'),
@@ -29685,7 +29664,7 @@
};
var TabSection = composite$1({
name: 'TabSection',
configFields: schema$w(),
configFields: schema$y(),
partFields: parts$g(),
factory: factory$l,
apis: {
@@ -30324,7 +30303,7 @@
return instanceApi;
};
var isTouch$4 = global$6.deviceType.isTouch();
var isTouch = global$6.deviceType.isTouch();
var hiddenHeader = function (title, close) {
return {
dom: {
@@ -30438,7 +30417,7 @@
components: [{
dom: {
tag: 'div',
classes: isTouch$4 ? [
classes: isTouch ? [
blockerBackdropClass,
blockerBackdropClass + '--opaque'
] : [blockerBackdropClass]
File diff suppressed because one or more lines are too long