@dangl/angular-material-shared 2.6.2-beta0002 → 2.6.2-beta0011
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/footer/footer.component.mjs +15 -16
- package/esm2022/lib/components/header/header.component.mjs +14 -9
- package/esm2022/public_api.mjs +1 -4
- package/esm2022/tiny-mce/dangl-angular-material-shared-tiny-mce.mjs +5 -0
- package/esm2022/tiny-mce/public_api.mjs +3 -0
- package/esm2022/tiny-mce/tiny-mce.component.mjs +114 -0
- package/esm2022/tiny-mce/utils/guid-generator.mjs +36 -0
- package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs +156 -0
- package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs.map +1 -0
- package/fesm2022/dangl-angular-material-shared.mjs +30 -179
- package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
- package/package.json +8 -3
- package/public_api.d.ts +0 -3
- package/tiny-mce/index.d.ts +5 -0
- package/tiny-mce/public_api.d.ts +2 -0
- package/{lib/components/tiny-mce → tiny-mce}/tiny-mce.component.d.ts +1 -1
- package/tinymce-assets/icons/default/icons.js +0 -4
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/models/dom/model.js +64 -86
- package/tinymce-assets/models/dom/model.min.js +2 -2
- package/tinymce-assets/plugins/accordion/plugin.js +1 -1
- package/tinymce-assets/plugins/accordion/plugin.min.js +1 -1
- package/tinymce-assets/plugins/advlist/plugin.js +2 -2
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
- package/tinymce-assets/plugins/anchor/plugin.js +1 -1
- package/tinymce-assets/plugins/anchor/plugin.min.js +1 -1
- package/tinymce-assets/plugins/autolink/plugin.js +1 -1
- package/tinymce-assets/plugins/autolink/plugin.min.js +1 -1
- package/tinymce-assets/plugins/autoresize/plugin.js +1 -1
- package/tinymce-assets/plugins/autoresize/plugin.min.js +1 -1
- package/tinymce-assets/plugins/autosave/plugin.js +1 -1
- package/tinymce-assets/plugins/autosave/plugin.min.js +1 -1
- package/tinymce-assets/plugins/charmap/plugin.js +1 -1
- package/tinymce-assets/plugins/charmap/plugin.min.js +1 -1
- package/tinymce-assets/plugins/code/plugin.js +1 -1
- package/tinymce-assets/plugins/code/plugin.min.js +1 -1
- package/tinymce-assets/plugins/codesample/plugin.js +1 -1
- package/tinymce-assets/plugins/codesample/plugin.min.js +1 -1
- package/tinymce-assets/plugins/directionality/plugin.js +1 -1
- package/tinymce-assets/plugins/directionality/plugin.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +1 -2
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullscreen/plugin.js +2 -3
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
- package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +2 -2
- package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +1 -1
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +1 -1
- package/tinymce-assets/plugins/help/plugin.js +43 -53
- package/tinymce-assets/plugins/help/plugin.min.js +2 -2
- package/tinymce-assets/plugins/image/plugin.js +1 -1
- package/tinymce-assets/plugins/image/plugin.min.js +1 -1
- package/tinymce-assets/plugins/importcss/plugin.js +1 -1
- package/tinymce-assets/plugins/importcss/plugin.min.js +1 -1
- package/tinymce-assets/plugins/insertdatetime/plugin.js +1 -1
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +1 -1
- package/tinymce-assets/plugins/link/plugin.js +3 -4
- package/tinymce-assets/plugins/link/plugin.min.js +2 -2
- package/tinymce-assets/plugins/lists/plugin.js +3 -4
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
- package/tinymce-assets/plugins/media/plugin.js +2 -2
- package/tinymce-assets/plugins/media/plugin.min.js +2 -2
- package/tinymce-assets/plugins/nonbreaking/plugin.js +1 -1
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +1 -1
- package/tinymce-assets/plugins/pagebreak/plugin.js +1 -1
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +1 -1
- package/tinymce-assets/plugins/preview/plugin.js +1 -1
- package/tinymce-assets/plugins/preview/plugin.min.js +1 -1
- package/tinymce-assets/plugins/quickbars/plugin.js +1 -1
- package/tinymce-assets/plugins/quickbars/plugin.min.js +1 -1
- package/tinymce-assets/plugins/save/plugin.js +2 -3
- package/tinymce-assets/plugins/save/plugin.min.js +2 -2
- package/tinymce-assets/plugins/searchreplace/plugin.js +2 -3
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
- package/tinymce-assets/plugins/table/plugin.js +48 -51
- package/tinymce-assets/plugins/table/plugin.min.js +2 -2
- package/tinymce-assets/plugins/template/index.js +7 -0
- package/tinymce-assets/plugins/template/plugin.js +567 -0
- package/tinymce-assets/plugins/template/plugin.min.js +4 -0
- package/tinymce-assets/plugins/visualblocks/plugin.js +1 -1
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +1 -1
- package/tinymce-assets/plugins/visualchars/plugin.js +1 -1
- package/tinymce-assets/plugins/visualchars/plugin.min.js +1 -1
- package/tinymce-assets/plugins/wordcount/plugin.js +1 -1
- package/tinymce-assets/plugins/wordcount/plugin.min.js +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +63 -392
- package/tinymce-assets/skins/ui/oxide/skin.js +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +66 -395
- package/tinymce-assets/skins/ui/oxide-dark/skin.js +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.css +41 -369
- package/tinymce-assets/skins/ui/tinymce-5/skin.js +1 -1
- package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +46 -374
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +1 -1
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/tinymce-assets/themes/silver/theme.js +302 -661
- package/tinymce-assets/themes/silver/theme.min.js +2 -2
- package/esm2022/lib/angular-material-shared.module.mjs +0 -19
- package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +0 -107
- package/esm2022/lib/utils/guid-generator.mjs +0 -36
- package/lib/angular-material-shared.module.d.ts +0 -10
- /package/{lib → tiny-mce}/utils/guid-generator.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
4
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),i=n("content_style"),s=n("content_css_cors"),c=n("body_class"),r=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const a=e.dom.encode,d=null!==(n=i(e))&&void 0!==n?n:"";l+='<base href="'+a(e.documentBaseURI.getURI())+'">';const m=s(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='<link type="text/css" rel="stylesheet" href="'+a(e.documentBaseURI.toAbsolute(t))+'"'+m+">"})),d&&(l+='<style type="text/css">'+d+"</style>");const y=r(e),u=c(e),v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(t.os.isMacOS()||t.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",p=e.getBody().dir,w=p?' dir="'+a(p)+'"':"";return"<!DOCTYPE html><html><head>"+l+'</head><body id="'+a(y)+'" class="mce-content-body '+a(u)+'"'+w+">"+e.getContent()+v+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:n}}).focus("close")})(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t})})(e)}))}();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
4
|
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>typeof e===t,o=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=n=t,(r=String).prototype.isPrototypeOf(o)||(null===(i=n.constructor)||void 0===i?void 0:i.name)===r.name)?"string":e;var o,n,r,i})(t));const n=e("boolean"),r=e("function"),i=t=>e=>e.options.get(t),s=i("quickbars_selection_toolbar"),a=i("quickbars_insert_toolbar"),l=i("quickbars_image_toolbar");let c=0;var u=tinymce.util.Tools.resolve("tinymce.util.Delay");const d=t=>{t.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{(t=>new Promise((e=>{let o=!1;const n=document.createElement("input");n.type="file",n.accept="image/*",n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0.001",document.body.appendChild(n);const r=t=>{var r;o||(null===(r=n.parentNode)||void 0===r||r.removeChild(n),o=!0,e(t))},i=t=>{r(Array.prototype.slice.call(t.target.files))};n.addEventListener("input",i),n.addEventListener("change",i);const s=e=>{const n=()=>{r([])};o||("focusin"===e.type?u.setEditorTimeout(t,n,1e3):n()),t.off("focusin remove",s)};t.on("focusin remove",s),n.click()})))(t).then((e=>{if(e.length>0){const o=e[0];(t=>new Promise((e=>{const o=new FileReader;o.onloadend=()=>{e(o.result.split(",")[1])},o.readAsDataURL(t)})))(o).then((e=>{((t,e,o)=>{const n=t.editorUpload.blobCache,r=n.create((t=>{const e=(new Date).getTime(),o=Math.floor(1e9*Math.random());return c++,"mceu_"+o+c+String(e)})(),o,e);n.add(r),t.insertContent(t.dom.createHTML("img",{src:r.blobUri()}))})(t,e,o)}))}}))}}),t.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{((t,e,o)=>{t.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(t)}})},m=(!1,()=>false);class g{constructor(t,e){this.tag=t,this.value=e}static some(t){return new g(!0,t)}static none(){return g.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?g.some(t(this.value)):g.none()}bind(t){return this.tag?t(this.value):g.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:g.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return null==t?g.none():g.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(!1),"undefined"!=typeof window?window:Function("return this;")();var h=(t,e,o,n,i)=>t(o,n)?g.some(o):r(i)&&i(o)?g.none():e(o,n,i);const b=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},p=b,v=(t,e)=>{const o=t.dom;if(1!==o.nodeType)return!1;{const t=o;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}},f=(t,e,o)=>{let n=t.dom;const i=r(o)?o:m;for(;n.parentNode;){n=n.parentNode;const t=p(n);if(e(t))return g.some(t);if(i(t))break}return g.none()},y=(t,e,o)=>f(t,(t=>v(t,e)),o),k=t=>{const e=a(t);e.length>0&&t.ui.registry.addContextToolbar("quickblock",{predicate:e=>{const o=p(e),n=t.schema.getTextBlockElements(),r=e=>e.dom===t.getBody();return!((t,e)=>{const o=t.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(o)&&((t,e,o)=>h(((t,e)=>v(t,e)),y,t,'table,[data-mce-bogus="all"]',o))(o,0,r).fold((()=>((t,e,o)=>((t,e,o)=>h(((t,e)=>e(t)),f,t,e,o))(t,e,o).isSome())(o,(e=>e.dom.nodeName.toLowerCase()in n&&t.dom.isEmpty(e.dom)),r)),m)},items:e,position:"line",scope:"editor"})};t.add("quickbars",(t=>{(t=>{const e=t.options.register,r=t=>e=>{const r=n(e)||o(e);return r?n(e)?{value:e?t:"",valid:r}:{value:e.trim(),valid:r}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";e("quickbars_selection_toolbar",{processor:r(i),default:i});const s="quickimage quicktable";e("quickbars_insert_toolbar",{processor:r(s),default:s});const a="alignleft aligncenter alignright";e("quickbars_image_toolbar",{processor:r(a),default:a})})(t),d(t),k(t),(t=>{const e=e=>t.dom.isEditable(e),o=t=>{const o="FIGURE"===t.nodeName&&/image/i.test(t.className),n="IMG"===t.nodeName||o,r=(t=>void 0!==t.dom.classList)(i=p(t))&&i.dom.classList.contains("mce-pagebreak");var i;return n&&e(t.parentElement)&&!r},n=l(t);n.length>0&&t.ui.registry.addContextToolbar("imageselection",{predicate:o,items:n,position:"node"});const r=s(t);r.length>0&&t.ui.registry.addContextToolbar("textselection",{predicate:n=>!o(n)&&!t.selection.isCollapsed()&&e(n),items:r,position:"selection",scope:"editor"})})(t)}))}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -93,8 +93,7 @@
|
|
|
93
93
|
tooltip: 'Save',
|
|
94
94
|
enabled: false,
|
|
95
95
|
onAction: () => editor.execCommand('mceSave'),
|
|
96
|
-
onSetup: stateToggle(editor)
|
|
97
|
-
shortcut: 'Meta+S'
|
|
96
|
+
onSetup: stateToggle(editor)
|
|
98
97
|
});
|
|
99
98
|
editor.ui.registry.addButton('cancel', {
|
|
100
99
|
icon: 'cancel',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const
|
|
4
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=("function",e=>"function"==typeof e);var o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t=tinymce.util.Tools.resolve("tinymce.util.Tools");const a=e=>n=>n.options.get(e),c=a("save_enablewhendirty"),i=a("save_onsavecallback"),s=a("save_oncancelcallback"),r=(e,n)=>{e.notificationManager.open({text:n,type:"error"})},l=e=>n=>{const o=()=>{n.setEnabled(!c(e)||e.isDirty())};return o(),e.on("NodeChange dirty",o),()=>e.off("NodeChange dirty",o)};e.add("save",(e=>{(e=>{const n=e.options.register;n("save_enablewhendirty",{processor:"boolean",default:!0}),n("save_onsavecallback",{processor:"function"}),n("save_oncancelcallback",{processor:"function"})})(e),(e=>{e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",enabled:!1,onAction:()=>e.execCommand("mceSave"),onSetup:l(e)}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",enabled:!1,onAction:()=>e.execCommand("mceCancel"),onSetup:l(e)}),e.addShortcut("Meta+S","","mceSave")})(e),(e=>{e.addCommand("mceSave",(()=>{(e=>{const t=o.DOM.getParent(e.id,"form");if(c(e)&&!e.isDirty())return;e.save();const a=i(e);if(n(a))return a.call(e,e),void e.nodeChanged();t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():r(e,"Error: Form submit field collision.")),e.nodeChanged()):r(e,"Error: No form element found.")})(e)})),e.addCommand("mceCancel",(()=>{(e=>{const o=t.trim(e.startContent),a=s(e);n(a)?a.call(e,e):e.resetContent(o)})(e)}))})(e)}))}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -1067,8 +1067,7 @@
|
|
|
1067
1067
|
editor.ui.registry.addButton('searchreplace', {
|
|
1068
1068
|
tooltip: 'Find and replace',
|
|
1069
1069
|
onAction: showDialog(editor, currentSearchState),
|
|
1070
|
-
icon: 'search'
|
|
1071
|
-
shortcut: 'Meta+F'
|
|
1070
|
+
icon: 'search'
|
|
1072
1071
|
});
|
|
1073
1072
|
editor.shortcuts.add('Meta+F', '', showDialog(editor, currentSearchState));
|
|
1074
1073
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
|
-
!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,r=e=>t=>typeof t===e,o=n("string"),s=n("array"),a=r("boolean"),l=r("number"),i=()=>{},c=e=>()=>e,d=c(!0),u=c("[~\u2116|!-*+-\\/:;?@\\[-`{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]");class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?h.none():h.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const m=u;var g=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=Array.prototype.slice,x=Array.prototype.push,y=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},w=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},b=(e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)},v=(e,t)=>(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);x.apply(t,e[n])}return t})(y(e,t)),C=Object.hasOwnProperty,E=(e,t)=>C.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const O=(3,e=>3===(e=>e.dom.nodeType)(e));const N=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},T=N,k=(e,t)=>({element:e,offset:t}),A=(e,t)=>{((e,t)=>{const n=(e=>h.from(e.dom.parentNode).map(T))(e);n.each((n=>{n.dom.insertBefore(t.dom,e.dom)}))})(e,t),((e,t)=>{e.dom.appendChild(t.dom)})(t,e)},S=((e,t)=>{const n=t=>e(t)?h.from(t.dom.nodeValue):h.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return n(t).getOr("")},getOption:n,set:(t,n)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=n}}})(O),B=e=>S.get(e);var F=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const I=(e,t)=>e.isBlock(t)||E(e.schema.getVoidElements(),t.nodeName),M=(e,t)=>!e.isEditable(t),R=(e,t)=>!e.isBlock(t)&&E(e.schema.getWhitespaceElements(),t.nodeName),D=(e,t)=>((e,t)=>{const n=(e=>y(e.dom.childNodes,T))(e);return n.length>0&&t<n.length?k(n[t],0):k(e,t)})(T(e),t),P=(e,t,n,r,o,s=!0)=>{let a=s?t(!1):n;for(;a;){const n=M(e,a);if(n||R(e,a)){if(n?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(I(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},W=(e,t,n,r,o)=>{var s;if(((e,t)=>I(e,t)||M(e,t)||R(e,t)||((e,t)=>"true"===e.getContentEditable(t)&&t.parentNode&&!e.isEditable(t.parentNode))(e,t))(e,n))return;const a=null!==(s=e.getParent(r,e.isBlock))&&void 0!==s?s:e.getRoot(),l=new F(n,a),i=o?l.next.bind(l):l.prev.bind(l);P(e,i,n,{boundary:d,cef:d,text:e=>{o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(T(e))}})},$=(e,t,n,r,o,s=!0)=>{const a=new F(n,t),l=[];let i={sOffset:0,fOffset:0,elements:[]};W(e,i,n,t,!1);const c=()=>(i.elements.length>0&&(l.push(i),i={sOffset:0,fOffset:0,elements:[]}),!1);return P(e,a.next.bind(a),n,{boundary:c,cef:e=>(c(),o&&l.push(...o.cef(e)),!1),text:e=>{i.elements.push(T(e)),o&&o.text(e,i)}},r,s),r&&W(e,i,r,t,!0),c(),l},V=(e,t)=>{const n=D(t.startContainer,t.startOffset),r=n.element.dom,o=D(t.endContainer,t.endOffset),s=o.element.dom;return $(e,t.commonAncestorContainer,r,s,{text:(e,t)=>{e===s?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:t=>{return((e,t)=>{const n=p.call(e,0);return n.sort(((e,t)=>((e,t)=>((e,t,n)=>0!=(e.compareDocumentPosition(t)&n))(e,t,Node.DOCUMENT_POSITION_PRECEDING))(e.elements[0].dom,t.elements[0].dom)?1:-1)),n})(v((n=T(t),((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:y(n.querySelectorAll(e),T);var r})("*[contenteditable=true]",n)),(t=>{const n=t.dom;return $(e,n,n)})));var n}},!1)},j=(e,t)=>t.collapsed?[]:V(e,t),z=(e,t)=>{const n=e.createRng();return n.selectNode(t),j(e,n)},U=(e,t)=>v(t,(t=>{const n=t.elements,r=y(n,B).join(""),o=((e,t,n=0,r=e.length)=>{const o=t.regex;o.lastIndex=n;const s=[];let a;for(;a=o.exec(e);){const e=a[t.matchIndex],n=a.index+a[0].indexOf(e),l=n+e.length;if(l>r)break;s.push({start:n,finish:l}),o.lastIndex=l}return s})(r,e,t.sOffset,r.length-t.fOffset);return((e,t)=>{const n=(r=e,o=(e,n)=>{const r=B(n),o=e.last,s=o+r.length,a=v(t,((e,t)=>e.start<s&&e.finish>o?[{element:n,start:Math.max(o,e.start)-o,finish:Math.min(s,e.finish)-o,matchId:t}]:[]));return{results:e.results.concat(a),last:s}},s={results:[],last:0},w(r,((e,t)=>{s=o(s,e)})),s).results;var r,o,s;return((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const r=[];let o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l=t(a);l!==n&&(r.push(o),o=[]),n=l,o.push(a)}return 0!==o.length&&r.push(o),r}})(n,(e=>e.matchId))})(n,o)})),_=(e,t)=>{b(e,((e,n)=>{b(e,(e=>{const r=T(t.cloneNode(!1));((e,t,n)=>{((e,t,n)=>{if(!(o(n)||a(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)})(r,"data-mce-index",n);const s=e.element.dom;if(s.length===e.finish&&0===e.start)A(e.element,r);else{s.length!==e.finish&&s.splitText(e.finish);const t=s.splitText(e.start);A(T(t),r)}}))}))},q=e=>e.getAttribute("data-mce-index"),G=(e,t,n,r)=>{const o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";const s=e.getBody();return te(e,t,!1),r?((e,t,n,r)=>{const o=n.getBookmark(),s=e.select("td[data-mce-selected],th[data-mce-selected]"),a=s.length>0?((e,t)=>v(t,(t=>z(e,t))))(e,s):j(e,n.getRng()),l=U(t,a);return _(l,r),n.moveToBookmark(o),l.length})(e.dom,n,e.selection,o):((e,t,n,r)=>{const o=z(e,n),s=U(t,o);return _(s,r),s.length})(e.dom,n,s,o)},K=e=>{var t;const n=e.parentNode;e.firstChild&&n.insertBefore(e.firstChild,e),null===(t=e.parentNode)||void 0===t||t.removeChild(e)},H=(e,t)=>{const n=[],r=f.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(let e=0;e<r.length;e++){const o=q(r[e]);null!==o&&o.length&&o===t.toString()&&n.push(r[e])}return n},J=(e,t,n)=>{const r=t.get();let o=r.index;const s=e.dom;n?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,s.removeClass(H(e,r.index),"mce-match-marker-selected");const a=H(e,o);return a.length?(s.addClass(H(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},L=(e,t)=>{const n=t.parentNode;e.remove(t),n&&e.isEmpty(n)&&e.remove(n)},Q=(e,t,n,r,o,s)=>{const a=e.selection,l=((e,t)=>{const n="("+e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")";return t?`(?:^|\\s|${m()})`+n+`(?=$|\\s|${m()})`:n})(n,o),i=a.isForward(),c={regex:new RegExp(l,r?"g":"gi"),matchIndex:1},d=G(e,t,c,s);if(g.browser.isSafari()&&a.setRng(a.getRng(),i),d){const a=J(e,t,!0);t.set({index:a,count:d,text:n,matchCase:r,wholeWord:o,inSelection:s})}return d},X=(e,t)=>{const n=J(e,t,!0);t.set({...t.get(),index:n})},Y=(e,t)=>{const n=J(e,t,!1);t.set({...t.get(),index:n})},Z=e=>{const t=q(e);return null!==t&&t.length>0},ee=(e,t,n,r,o)=>{const s=t.get(),a=s.index;let l,i=a;r=!1!==r;const c=e.getBody(),d=f.grep(f.toArray(c.getElementsByTagName("span")),Z);for(let t=0;t<d.length;t++){const c=q(d[t]);let u=l=parseInt(c,10);if(o||u===s.index){for(n.length?(d[t].innerText=n,K(d[t])):L(e.dom,d[t]);d[++t];){if(u=parseInt(q(d[t]),10),u!==l){t--;break}L(e.dom,d[t])}r&&i--}else l>a&&d[t].setAttribute("data-mce-index",String(l-1))}return t.set({...s,count:o?0:s.count-1,index:i}),r?X(e,t):Y(e,t),!o&&t.get().count>0},te=(e,t,n)=>{let r,o;const s=t.get(),a=f.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<a.length;e++){const t=q(a[e]);null!==t&&t.length&&(t===s.index.toString()&&(r||(r=a[e].firstChild),o=a[e].firstChild),K(a[e]))}if(t.set({...s,index:-1,count:0,text:""}),r&&o){const t=e.dom.createRng();return t.setStart(r,0),t.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(t),t}},ne=(t,n)=>{const r=(()=>{const t=(t=>{const n=e(h.none()),r=()=>n.get().each(t);return{clear:()=>{r(),n.set(h.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{r(),n.set(h.some(e))}}})(i);return{...t,on:e=>t.get().each(e)}})();t.undoManager.add();const o=f.trim(t.selection.getContent({format:"text"})),s=e=>{e.setEnabled("next",((e,t)=>t.get().count>1)(0,n)),e.setEnabled("prev",((e,t)=>t.get().count>1)(0,n))},a=(e,t)=>{w(["replace","replaceall","prev","next"],(n=>e.setEnabled(n,!t)))},l=(e,t)=>{t.redial(y(e,t.getData()))},c=(e,t)=>{g.browser.isSafari()&&g.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},d=e=>{te(t,n,!1),a(e,!0),s(e)},u=e=>{const r=e.getData(),o=n.get();if(r.findtext.length){if(o.text===r.findtext&&o.matchCase===r.matchcase&&o.wholeWord===r.wholewords)X(t,n);else{const o=Q(t,n,r.findtext,r.matchcase,r.wholewords,r.inselection);o<=0&&l(!0,e),a(e,0===o)}s(e)}else d(e)},m=n.get(),p={findtext:o,replacetext:"",wholewords:m.wholeWord,matchcase:m.matchCase,inselection:m.inSelection},x=e=>{const t=[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:!1,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:!1,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}];return e&&t.push({type:"alertbanner",level:"error",text:"Could not find the specified string.",icon:"warning"}),t},y=(e,r)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:x(e)},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",enabled:!1},{type:"custom",name:"replaceall",text:"Replace all",enabled:!1}],initialData:r,onChange:(t,r)=>{e&&l(!1,t),"findtext"===r.name&&n.get().count>0&&d(t)},onAction:(e,r)=>{const o=e.getData();switch(r.name){case"find":u(e);break;case"replace":ee(t,n,o.replacetext)?s(e):d(e);break;case"replaceall":ee(t,n,o.replacetext,!0,!0),d(e);break;case"prev":Y(t,n),s(e);break;case"next":X(t,n),s(e);break;case"matchcase":case"wholewords":case"inselection":l(!1,e),(e=>{const t=e.getData(),r=n.get();n.set({...r,matchCase:t.matchcase,wholeWord:t.wholewords,inSelection:t.inselection})})(e),d(e)}c(e,r.name)},onSubmit:e=>{u(e),c(e,"find")},onClose:()=>{t.focus(),te(t,n),t.undoManager.add()}});r.set(t.windowManager.open(y(!1,p),{inline:"toolbar"}))},re=(e,t)=>()=>{ne(e,t)};t.add("searchreplace",(t=>{const n=e({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return((e,t)=>{e.addCommand("SearchReplace",(()=>{ne(e,t)}))})(t,n),((e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:re(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:re(e,t),icon:"search",shortcut:"Meta+F"}),e.shortcuts.add("Meta+F","",re(e,t))})(t,n),((e,t)=>({done:n=>te(e,t,n),find:(n,r,o,s=!1)=>Q(e,t,n,r,o,s),next:()=>X(e,t),prev:()=>Y(e,t),replace:(n,r,o)=>ee(e,t,n,r,o)}))(t,n)}))}();
|
|
4
|
+
!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,r=e=>t=>typeof t===e,o=n("string"),s=n("array"),a=r("boolean"),l=r("number"),i=()=>{},c=e=>()=>e,d=c(!0),u=c("[~\u2116|!-*+-\\/:;?@\\[-`{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]");class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?h.none():h.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const m=u;var g=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=Array.prototype.slice,x=Array.prototype.push,y=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},w=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},b=(e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)},v=(e,t)=>(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);x.apply(t,e[n])}return t})(y(e,t)),C=Object.hasOwnProperty,E=(e,t)=>C.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const O=(3,e=>3===(e=>e.dom.nodeType)(e));const N=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},T=N,k=(e,t)=>({element:e,offset:t}),A=(e,t)=>{((e,t)=>{const n=(e=>h.from(e.dom.parentNode).map(T))(e);n.each((n=>{n.dom.insertBefore(t.dom,e.dom)}))})(e,t),((e,t)=>{e.dom.appendChild(t.dom)})(t,e)},S=((e,t)=>{const n=t=>e(t)?h.from(t.dom.nodeValue):h.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return n(t).getOr("")},getOption:n,set:(t,n)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=n}}})(O),B=e=>S.get(e);var F=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const I=(e,t)=>e.isBlock(t)||E(e.schema.getVoidElements(),t.nodeName),R=(e,t)=>!e.isEditable(t),M=(e,t)=>!e.isBlock(t)&&E(e.schema.getWhitespaceElements(),t.nodeName),D=(e,t)=>((e,t)=>{const n=(e=>y(e.dom.childNodes,T))(e);return n.length>0&&t<n.length?k(n[t],0):k(e,t)})(T(e),t),P=(e,t,n,r,o,s=!0)=>{let a=s?t(!1):n;for(;a;){const n=R(e,a);if(n||M(e,a)){if(n?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(I(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},W=(e,t,n,r,o)=>{var s;if(((e,t)=>I(e,t)||R(e,t)||M(e,t)||((e,t)=>"true"===e.getContentEditable(t)&&t.parentNode&&!e.isEditable(t.parentNode))(e,t))(e,n))return;const a=null!==(s=e.getParent(r,e.isBlock))&&void 0!==s?s:e.getRoot(),l=new F(n,a),i=o?l.next.bind(l):l.prev.bind(l);P(e,i,n,{boundary:d,cef:d,text:e=>{o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(T(e))}})},$=(e,t,n,r,o,s=!0)=>{const a=new F(n,t),l=[];let i={sOffset:0,fOffset:0,elements:[]};W(e,i,n,t,!1);const c=()=>(i.elements.length>0&&(l.push(i),i={sOffset:0,fOffset:0,elements:[]}),!1);return P(e,a.next.bind(a),n,{boundary:c,cef:e=>(c(),o&&l.push(...o.cef(e)),!1),text:e=>{i.elements.push(T(e)),o&&o.text(e,i)}},r,s),r&&W(e,i,r,t,!0),c(),l},V=(e,t)=>{const n=D(t.startContainer,t.startOffset),r=n.element.dom,o=D(t.endContainer,t.endOffset),s=o.element.dom;return $(e,t.commonAncestorContainer,r,s,{text:(e,t)=>{e===s?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:t=>{return((e,t)=>{const n=p.call(e,0);return n.sort(((e,t)=>((e,t)=>((e,t,n)=>0!=(e.compareDocumentPosition(t)&n))(e,t,Node.DOCUMENT_POSITION_PRECEDING))(e.elements[0].dom,t.elements[0].dom)?1:-1)),n})(v((n=T(t),((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:y(n.querySelectorAll(e),T);var r})("*[contenteditable=true]",n)),(t=>{const n=t.dom;return $(e,n,n)})));var n}},!1)},j=(e,t)=>t.collapsed?[]:V(e,t),z=(e,t)=>{const n=e.createRng();return n.selectNode(t),j(e,n)},U=(e,t)=>v(t,(t=>{const n=t.elements,r=y(n,B).join(""),o=((e,t,n=0,r=e.length)=>{const o=t.regex;o.lastIndex=n;const s=[];let a;for(;a=o.exec(e);){const e=a[t.matchIndex],n=a.index+a[0].indexOf(e),l=n+e.length;if(l>r)break;s.push({start:n,finish:l}),o.lastIndex=l}return s})(r,e,t.sOffset,r.length-t.fOffset);return((e,t)=>{const n=(r=e,o=(e,n)=>{const r=B(n),o=e.last,s=o+r.length,a=v(t,((e,t)=>e.start<s&&e.finish>o?[{element:n,start:Math.max(o,e.start)-o,finish:Math.min(s,e.finish)-o,matchId:t}]:[]));return{results:e.results.concat(a),last:s}},s={results:[],last:0},w(r,((e,t)=>{s=o(s,e)})),s).results;var r,o,s;return((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const r=[];let o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l=t(a);l!==n&&(r.push(o),o=[]),n=l,o.push(a)}return 0!==o.length&&r.push(o),r}})(n,(e=>e.matchId))})(n,o)})),_=(e,t)=>{b(e,((e,n)=>{b(e,(e=>{const r=T(t.cloneNode(!1));((e,t,n)=>{((e,t,n)=>{if(!(o(n)||a(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)})(r,"data-mce-index",n);const s=e.element.dom;if(s.length===e.finish&&0===e.start)A(e.element,r);else{s.length!==e.finish&&s.splitText(e.finish);const t=s.splitText(e.start);A(T(t),r)}}))}))},q=e=>e.getAttribute("data-mce-index"),G=(e,t,n,r)=>{const o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";const s=e.getBody();return te(e,t,!1),r?((e,t,n,r)=>{const o=n.getBookmark(),s=e.select("td[data-mce-selected],th[data-mce-selected]"),a=s.length>0?((e,t)=>v(t,(t=>z(e,t))))(e,s):j(e,n.getRng()),l=U(t,a);return _(l,r),n.moveToBookmark(o),l.length})(e.dom,n,e.selection,o):((e,t,n,r)=>{const o=z(e,n),s=U(t,o);return _(s,r),s.length})(e.dom,n,s,o)},K=e=>{var t;const n=e.parentNode;e.firstChild&&n.insertBefore(e.firstChild,e),null===(t=e.parentNode)||void 0===t||t.removeChild(e)},H=(e,t)=>{const n=[],r=f.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(let e=0;e<r.length;e++){const o=q(r[e]);null!==o&&o.length&&o===t.toString()&&n.push(r[e])}return n},J=(e,t,n)=>{const r=t.get();let o=r.index;const s=e.dom;n?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,s.removeClass(H(e,r.index),"mce-match-marker-selected");const a=H(e,o);return a.length?(s.addClass(H(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},L=(e,t)=>{const n=t.parentNode;e.remove(t),n&&e.isEmpty(n)&&e.remove(n)},Q=(e,t,n,r,o,s)=>{const a=e.selection,l=((e,t)=>{const n="("+e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")";return t?`(?:^|\\s|${m()})`+n+`(?=$|\\s|${m()})`:n})(n,o),i=a.isForward(),c={regex:new RegExp(l,r?"g":"gi"),matchIndex:1},d=G(e,t,c,s);if(g.browser.isSafari()&&a.setRng(a.getRng(),i),d){const a=J(e,t,!0);t.set({index:a,count:d,text:n,matchCase:r,wholeWord:o,inSelection:s})}return d},X=(e,t)=>{const n=J(e,t,!0);t.set({...t.get(),index:n})},Y=(e,t)=>{const n=J(e,t,!1);t.set({...t.get(),index:n})},Z=e=>{const t=q(e);return null!==t&&t.length>0},ee=(e,t,n,r,o)=>{const s=t.get(),a=s.index;let l,i=a;r=!1!==r;const c=e.getBody(),d=f.grep(f.toArray(c.getElementsByTagName("span")),Z);for(let t=0;t<d.length;t++){const c=q(d[t]);let u=l=parseInt(c,10);if(o||u===s.index){for(n.length?(d[t].innerText=n,K(d[t])):L(e.dom,d[t]);d[++t];){if(u=parseInt(q(d[t]),10),u!==l){t--;break}L(e.dom,d[t])}r&&i--}else l>a&&d[t].setAttribute("data-mce-index",String(l-1))}return t.set({...s,count:o?0:s.count-1,index:i}),r?X(e,t):Y(e,t),!o&&t.get().count>0},te=(e,t,n)=>{let r,o;const s=t.get(),a=f.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<a.length;e++){const t=q(a[e]);null!==t&&t.length&&(t===s.index.toString()&&(r||(r=a[e].firstChild),o=a[e].firstChild),K(a[e]))}if(t.set({...s,index:-1,count:0,text:""}),r&&o){const t=e.dom.createRng();return t.setStart(r,0),t.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(t),t}},ne=(t,n)=>{const r=(()=>{const t=(t=>{const n=e(h.none()),r=()=>n.get().each(t);return{clear:()=>{r(),n.set(h.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{r(),n.set(h.some(e))}}})(i);return{...t,on:e=>t.get().each(e)}})();t.undoManager.add();const o=f.trim(t.selection.getContent({format:"text"})),s=e=>{e.setEnabled("next",((e,t)=>t.get().count>1)(0,n)),e.setEnabled("prev",((e,t)=>t.get().count>1)(0,n))},a=(e,t)=>{w(["replace","replaceall","prev","next"],(n=>e.setEnabled(n,!t)))},l=(e,t)=>{t.redial(y(e,t.getData()))},c=(e,t)=>{g.browser.isSafari()&&g.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},d=e=>{te(t,n,!1),a(e,!0),s(e)},u=e=>{const r=e.getData(),o=n.get();if(r.findtext.length){if(o.text===r.findtext&&o.matchCase===r.matchcase&&o.wholeWord===r.wholewords)X(t,n);else{const o=Q(t,n,r.findtext,r.matchcase,r.wholewords,r.inselection);o<=0&&l(!0,e),a(e,0===o)}s(e)}else d(e)},m=n.get(),p={findtext:o,replacetext:"",wholewords:m.wholeWord,matchcase:m.matchCase,inselection:m.inSelection},x=e=>{const t=[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:!1,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:!1,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}];return e&&t.push({type:"alertbanner",level:"error",text:"Could not find the specified string.",icon:"warning"}),t},y=(e,r)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:x(e)},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",enabled:!1},{type:"custom",name:"replaceall",text:"Replace all",enabled:!1}],initialData:r,onChange:(t,r)=>{e&&l(!1,t),"findtext"===r.name&&n.get().count>0&&d(t)},onAction:(e,r)=>{const o=e.getData();switch(r.name){case"find":u(e);break;case"replace":ee(t,n,o.replacetext)?s(e):d(e);break;case"replaceall":ee(t,n,o.replacetext,!0,!0),d(e);break;case"prev":Y(t,n),s(e);break;case"next":X(t,n),s(e);break;case"matchcase":case"wholewords":case"inselection":l(!1,e),(e=>{const t=e.getData(),r=n.get();n.set({...r,matchCase:t.matchcase,wholeWord:t.wholewords,inSelection:t.inselection})})(e),d(e)}c(e,r.name)},onSubmit:e=>{u(e),c(e,"find")},onClose:()=>{t.focus(),te(t,n),t.undoManager.add()}});r.set(t.windowManager.open(y(!1,p),{inline:"toolbar"}))},re=(e,t)=>()=>{ne(e,t)};t.add("searchreplace",(t=>{const n=e({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return((e,t)=>{e.addCommand("SearchReplace",(()=>{ne(e,t)}))})(t,n),((e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:re(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:re(e,t),icon:"search"}),e.shortcuts.add("Meta+F","",re(e,t))})(t,n),((e,t)=>({done:n=>te(e,t,n),find:(n,r,o,s=!1)=>Q(e,t,n,r,o,s),next:()=>X(e,t),prev:()=>Y(e,t),replace:(n,r,o)=>ee(e,t,n,r,o)}))(t,n)}))}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 6.8.3 (2024-02-08)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -1621,18 +1621,6 @@
|
|
|
1621
1621
|
};
|
|
1622
1622
|
}
|
|
1623
1623
|
});
|
|
1624
|
-
const buildClassList = classList => {
|
|
1625
|
-
if (!classList.length) {
|
|
1626
|
-
return Optional.none();
|
|
1627
|
-
}
|
|
1628
|
-
return Optional.some(buildListItems([
|
|
1629
|
-
{
|
|
1630
|
-
text: 'Select...',
|
|
1631
|
-
value: 'mce-no-match'
|
|
1632
|
-
},
|
|
1633
|
-
...classList
|
|
1634
|
-
]));
|
|
1635
|
-
};
|
|
1636
1624
|
const buildMenuItems = (editor, items, format, onAction) => map(items, item => {
|
|
1637
1625
|
const text = item.text || item.title;
|
|
1638
1626
|
if (isListGroup(item)) {
|
|
@@ -1694,18 +1682,29 @@
|
|
|
1694
1682
|
editor.execCommand('mceTableColType', false, { type: newType });
|
|
1695
1683
|
};
|
|
1696
1684
|
|
|
1697
|
-
const getClassList$1 = editor =>
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1685
|
+
const getClassList$1 = editor => {
|
|
1686
|
+
const classes = buildListItems(getCellClassList(editor));
|
|
1687
|
+
if (classes.length > 0) {
|
|
1688
|
+
return Optional.some({
|
|
1689
|
+
name: 'class',
|
|
1690
|
+
type: 'listbox',
|
|
1691
|
+
label: 'Class',
|
|
1692
|
+
items: classes
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
return Optional.none();
|
|
1696
|
+
};
|
|
1703
1697
|
const children = [
|
|
1704
1698
|
{
|
|
1705
1699
|
name: 'width',
|
|
1706
1700
|
type: 'input',
|
|
1707
1701
|
label: 'Width'
|
|
1708
1702
|
},
|
|
1703
|
+
{
|
|
1704
|
+
name: 'height',
|
|
1705
|
+
type: 'input',
|
|
1706
|
+
label: 'Height'
|
|
1707
|
+
},
|
|
1709
1708
|
{
|
|
1710
1709
|
name: 'celltype',
|
|
1711
1710
|
type: 'listbox',
|
|
@@ -2041,7 +2040,7 @@
|
|
|
2041
2040
|
const comparisonValue = baseData[key];
|
|
2042
2041
|
if (comparisonValue !== '' && key === itemKey) {
|
|
2043
2042
|
if (comparisonValue !== itemValue) {
|
|
2044
|
-
baseData[key] =
|
|
2043
|
+
baseData[key] = '';
|
|
2045
2044
|
}
|
|
2046
2045
|
}
|
|
2047
2046
|
});
|
|
@@ -2147,6 +2146,7 @@
|
|
|
2147
2146
|
const getStyle = (element, style) => dom.getStyle(element, style) || dom.getAttrib(element, style);
|
|
2148
2147
|
return {
|
|
2149
2148
|
width: getStyle(colElm, 'width'),
|
|
2149
|
+
height: getStyle(cell, 'height'),
|
|
2150
2150
|
scope: dom.getAttrib(cell, 'scope'),
|
|
2151
2151
|
celltype: getNodeName(cell),
|
|
2152
2152
|
class: dom.getAttrib(cell, 'class', ''),
|
|
@@ -2169,9 +2169,12 @@
|
|
|
2169
2169
|
if (shouldUpdate('scope')) {
|
|
2170
2170
|
modifier.setAttrib('scope', data.scope);
|
|
2171
2171
|
}
|
|
2172
|
-
if (shouldUpdate('class')
|
|
2172
|
+
if (shouldUpdate('class')) {
|
|
2173
2173
|
modifier.setAttrib('class', data.class);
|
|
2174
2174
|
}
|
|
2175
|
+
if (shouldUpdate('height')) {
|
|
2176
|
+
modifier.setStyle('height', addPxSuffix(data.height));
|
|
2177
|
+
}
|
|
2175
2178
|
if (shouldUpdate('width')) {
|
|
2176
2179
|
colModifier.setStyle('width', addPxSuffix(data.width));
|
|
2177
2180
|
}
|
|
@@ -2294,12 +2297,18 @@
|
|
|
2294
2297
|
});
|
|
2295
2298
|
};
|
|
2296
2299
|
|
|
2297
|
-
const getClassList = editor =>
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2300
|
+
const getClassList = editor => {
|
|
2301
|
+
const classes = buildListItems(getRowClassList(editor));
|
|
2302
|
+
if (classes.length > 0) {
|
|
2303
|
+
return Optional.some({
|
|
2304
|
+
name: 'class',
|
|
2305
|
+
type: 'listbox',
|
|
2306
|
+
label: 'Class',
|
|
2307
|
+
items: classes
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
return Optional.none();
|
|
2311
|
+
};
|
|
2303
2312
|
const formChildren = [
|
|
2304
2313
|
{
|
|
2305
2314
|
type: 'listbox',
|
|
@@ -2352,7 +2361,7 @@
|
|
|
2352
2361
|
const getItems$1 = editor => formChildren.concat(getClassList(editor).toArray());
|
|
2353
2362
|
|
|
2354
2363
|
const updateSimpleProps = (modifier, data, shouldUpdate) => {
|
|
2355
|
-
if (shouldUpdate('class')
|
|
2364
|
+
if (shouldUpdate('class')) {
|
|
2356
2365
|
modifier.setAttrib('class', data.class);
|
|
2357
2366
|
}
|
|
2358
2367
|
if (shouldUpdate('height')) {
|
|
@@ -2374,17 +2383,11 @@
|
|
|
2374
2383
|
const isSingleRow = rows.length === 1;
|
|
2375
2384
|
const shouldOverrideCurrentValue = isSingleRow ? always : wasChanged;
|
|
2376
2385
|
each(rows, rowElm => {
|
|
2377
|
-
const rowCells = children$1(SugarElement.fromDom(rowElm), 'td,th');
|
|
2378
2386
|
const modifier = DomModifier.normal(editor, rowElm);
|
|
2379
2387
|
updateSimpleProps(modifier, data, shouldOverrideCurrentValue);
|
|
2380
2388
|
if (hasAdvancedRowTab(editor)) {
|
|
2381
2389
|
updateAdvancedProps(modifier, data, shouldOverrideCurrentValue);
|
|
2382
2390
|
}
|
|
2383
|
-
if (wasChanged('height')) {
|
|
2384
|
-
each(rowCells, cell => {
|
|
2385
|
-
editor.dom.setStyle(cell.dom, 'height', null);
|
|
2386
|
-
});
|
|
2387
|
-
}
|
|
2388
2391
|
if (wasChanged('align')) {
|
|
2389
2392
|
setAlign(editor, rowElm, data.align);
|
|
2390
2393
|
}
|
|
@@ -2548,8 +2551,8 @@
|
|
|
2548
2551
|
]
|
|
2549
2552
|
}];
|
|
2550
2553
|
const classListItem = classes.length > 0 ? [{
|
|
2551
|
-
name: 'class',
|
|
2552
2554
|
type: 'listbox',
|
|
2555
|
+
name: 'class',
|
|
2553
2556
|
label: 'Class',
|
|
2554
2557
|
items: classes
|
|
2555
2558
|
}] : [];
|
|
@@ -2577,8 +2580,7 @@
|
|
|
2577
2580
|
const styles = {};
|
|
2578
2581
|
const shouldStyleWithCss$1 = shouldStyleWithCss(editor);
|
|
2579
2582
|
const hasAdvancedTableTab$1 = hasAdvancedTableTab(editor);
|
|
2580
|
-
|
|
2581
|
-
if (!isUndefined(data.class) && data.class !== 'mce-no-match') {
|
|
2583
|
+
if (!isUndefined(data.class)) {
|
|
2582
2584
|
attrs.class = data.class;
|
|
2583
2585
|
}
|
|
2584
2586
|
styles.height = addPxSuffix(data.height);
|
|
@@ -2588,24 +2590,16 @@
|
|
|
2588
2590
|
attrs.width = removePxSuffix(data.width);
|
|
2589
2591
|
}
|
|
2590
2592
|
if (shouldStyleWithCss$1) {
|
|
2591
|
-
|
|
2592
|
-
attrs.border = 0;
|
|
2593
|
-
styles['border-width'] = '';
|
|
2594
|
-
} else {
|
|
2595
|
-
styles['border-width'] = addPxSuffix(data.border);
|
|
2596
|
-
attrs.border = 1;
|
|
2597
|
-
}
|
|
2593
|
+
styles['border-width'] = addPxSuffix(data.border);
|
|
2598
2594
|
styles['border-spacing'] = addPxSuffix(data.cellspacing);
|
|
2599
2595
|
} else {
|
|
2600
|
-
attrs.border =
|
|
2596
|
+
attrs.border = data.border;
|
|
2601
2597
|
attrs.cellpadding = data.cellpadding;
|
|
2602
2598
|
attrs.cellspacing = data.cellspacing;
|
|
2603
2599
|
}
|
|
2604
2600
|
if (shouldStyleWithCss$1 && tableElm.children) {
|
|
2605
2601
|
const cellStyles = {};
|
|
2606
|
-
if (
|
|
2607
|
-
cellStyles['border-width'] = '';
|
|
2608
|
-
} else if (shouldApplyOnCell.border) {
|
|
2602
|
+
if (shouldApplyOnCell.border) {
|
|
2609
2603
|
cellStyles['border-width'] = addPxSuffix(data.border);
|
|
2610
2604
|
}
|
|
2611
2605
|
if (shouldApplyOnCell.cellpadding) {
|
|
@@ -2640,6 +2634,9 @@
|
|
|
2640
2634
|
const data = api.getData();
|
|
2641
2635
|
const modifiedData = filter$1(data, (value, key) => oldData[key] !== value);
|
|
2642
2636
|
api.close();
|
|
2637
|
+
if (data.class === '') {
|
|
2638
|
+
delete data.class;
|
|
2639
|
+
}
|
|
2643
2640
|
editor.undoManager.transact(() => {
|
|
2644
2641
|
if (!tableElm) {
|
|
2645
2642
|
const cols = toInt(data.cols).getOr(1);
|
|
@@ -2699,8 +2696,8 @@
|
|
|
2699
2696
|
}
|
|
2700
2697
|
}
|
|
2701
2698
|
}
|
|
2702
|
-
const classes =
|
|
2703
|
-
if (classes.
|
|
2699
|
+
const classes = buildListItems(getTableClassList(editor));
|
|
2700
|
+
if (classes.length > 0) {
|
|
2704
2701
|
if (data.class) {
|
|
2705
2702
|
data.class = data.class.replace(/\s*mce\-item\-table\s*/g, '');
|
|
2706
2703
|
}
|
|
@@ -2708,7 +2705,7 @@
|
|
|
2708
2705
|
const generalPanel = {
|
|
2709
2706
|
type: 'grid',
|
|
2710
2707
|
columns: 2,
|
|
2711
|
-
items: getItems(editor, classes
|
|
2708
|
+
items: getItems(editor, classes, insertNewTable)
|
|
2712
2709
|
};
|
|
2713
2710
|
const nonAdvancedForm = () => ({
|
|
2714
2711
|
type: 'panel',
|