@dangl/angular-material-shared 2.5.1-beta0006 → 2.5.1-beta0018
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/README.md +1 -7
- package/esm2022/lib/angular-material-shared.module.mjs +6 -25
- package/esm2022/lib/components/footer/footer.component.mjs +12 -7
- package/esm2022/lib/components/header/header.component.mjs +18 -10
- package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +18 -21
- package/fesm2022/dangl-angular-material-shared.mjs +45 -55
- package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
- package/lib/angular-material-shared.module.d.ts +5 -9
- package/lib/components/footer/footer.component.d.ts +1 -1
- package/lib/components/header/header.component.d.ts +1 -1
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +7 -8
- package/package.json +1 -1
- package/tinymce-assets/icons/default/icons.js +187 -171
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/it.js +1 -1
- package/tinymce-assets/plugins/accordion/index.js +7 -0
- package/tinymce-assets/plugins/accordion/plugin.js +1054 -0
- package/tinymce-assets/plugins/accordion/plugin.min.js +4 -0
- package/tinymce-assets/plugins/advlist/plugin.js +185 -187
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -7
- package/tinymce-assets/plugins/anchor/plugin.js +79 -81
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autolink/plugin.js +209 -194
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autoresize/plugin.js +110 -102
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autosave/plugin.js +125 -104
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -7
- package/tinymce-assets/plugins/charmap/plugin.js +275 -313
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -7
- package/tinymce-assets/plugins/code/plugin.js +18 -24
- package/tinymce-assets/plugins/code/plugin.min.js +2 -7
- package/tinymce-assets/plugins/codesample/plugin.js +2075 -2074
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -7
- package/tinymce-assets/plugins/directionality/plugin.js +247 -305
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -7
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1 -9424
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1 -9423
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +334 -374
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -7
- package/tinymce-assets/plugins/fullscreen/plugin.js +740 -837
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -7
- package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/tinymce-assets/plugins/help/plugin.js +411 -355
- package/tinymce-assets/plugins/help/plugin.min.js +2 -7
- package/tinymce-assets/plugins/image/plugin.js +876 -1037
- package/tinymce-assets/plugins/image/plugin.min.js +2 -7
- package/tinymce-assets/plugins/importcss/plugin.js +146 -144
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -7
- package/tinymce-assets/plugins/insertdatetime/plugin.js +93 -88
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -7
- package/tinymce-assets/plugins/link/plugin.js +718 -768
- package/tinymce-assets/plugins/link/plugin.min.js +2 -7
- package/tinymce-assets/plugins/lists/plugin.js +1235 -1375
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -7
- package/tinymce-assets/plugins/media/plugin.js +614 -756
- package/tinymce-assets/plugins/media/plugin.min.js +2 -7
- package/tinymce-assets/plugins/nonbreaking/plugin.js +71 -48
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -7
- package/tinymce-assets/plugins/pagebreak/plugin.js +53 -40
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -7
- package/tinymce-assets/plugins/preview/plugin.js +36 -65
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -7
- package/tinymce-assets/plugins/quickbars/plugin.js +304 -331
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -7
- package/tinymce-assets/plugins/save/plugin.js +49 -50
- package/tinymce-assets/plugins/save/plugin.min.js +2 -7
- package/tinymce-assets/plugins/searchreplace/plugin.js +499 -571
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -7
- package/tinymce-assets/plugins/table/plugin.js +2572 -10617
- package/tinymce-assets/plugins/table/plugin.min.js +2 -7
- package/tinymce-assets/plugins/visualblocks/plugin.js +41 -46
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -7
- package/tinymce-assets/plugins/visualchars/plugin.js +346 -312
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -7
- package/tinymce-assets/plugins/wordcount/plugin.js +159 -179
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -7
- package/tinymce-assets/skins/content/dark/content.css +2 -8
- package/tinymce-assets/skins/content/dark/content.js +2 -0
- package/tinymce-assets/skins/content/dark/content.min.css +1 -7
- package/tinymce-assets/skins/content/default/content.css +0 -6
- package/tinymce-assets/skins/content/default/content.js +2 -0
- package/tinymce-assets/skins/content/default/content.min.css +0 -6
- package/tinymce-assets/skins/content/document/content.css +0 -6
- package/tinymce-assets/skins/content/document/content.js +2 -0
- package/tinymce-assets/skins/content/document/content.min.css +0 -6
- package/tinymce-assets/skins/content/tinymce-5/content.css +61 -0
- package/tinymce-assets/skins/content/tinymce-5/content.js +2 -0
- package/tinymce-assets/skins/content/tinymce-5/content.min.css +1 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.css +66 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.js +2 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/tinymce-assets/skins/content/writer/content.css +0 -6
- package/tinymce-assets/skins/content/writer/content.js +2 -0
- package/tinymce-assets/skins/content/writer/content.min.css +0 -6
- package/tinymce-assets/skins/ui/oxide/content.css +73 -20
- package/tinymce-assets/skins/ui/oxide/content.inline.css +73 -20
- package/tinymce-assets/skins/ui/oxide/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/content.js +2 -0
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/skin.css +1480 -435
- package/tinymce-assets/skins/ui/oxide/skin.js +2 -0
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +1 -8
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.css +71 -19
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +73 -20
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +1498 -450
- package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +1 -8
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
- package/tinymce-assets/skins/ui/tinymce-5/content.css +785 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +779 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.css +4185 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +766 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +779 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +4185 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/tinymce-assets/themes/silver/theme.js +25226 -28188
- package/tinymce-assets/themes/silver/theme.min.js +2 -7
- package/tinymce-assets/plugins/bbcode/index.js +0 -7
- package/tinymce-assets/plugins/bbcode/plugin.js +0 -99
- package/tinymce-assets/plugins/bbcode/plugin.min.js +0 -9
- package/tinymce-assets/plugins/colorpicker/index.js +0 -7
- package/tinymce-assets/plugins/colorpicker/plugin.js +0 -21
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +0 -9
- package/tinymce-assets/plugins/contextmenu/index.js +0 -7
- package/tinymce-assets/plugins/contextmenu/plugin.js +0 -21
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +0 -9
- package/tinymce-assets/plugins/fullpage/index.js +0 -7
- package/tinymce-assets/plugins/fullpage/plugin.js +0 -544
- package/tinymce-assets/plugins/fullpage/plugin.min.js +0 -9
- package/tinymce-assets/plugins/hr/index.js +0 -7
- package/tinymce-assets/plugins/hr/plugin.js +0 -45
- package/tinymce-assets/plugins/hr/plugin.min.js +0 -9
- package/tinymce-assets/plugins/imagetools/index.js +0 -7
- package/tinymce-assets/plugins/imagetools/plugin.js +0 -1531
- package/tinymce-assets/plugins/imagetools/plugin.min.js +0 -9
- package/tinymce-assets/plugins/legacyoutput/index.js +0 -7
- package/tinymce-assets/plugins/legacyoutput/plugin.js +0 -199
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +0 -9
- package/tinymce-assets/plugins/noneditable/index.js +0 -7
- package/tinymce-assets/plugins/noneditable/plugin.js +0 -117
- package/tinymce-assets/plugins/noneditable/plugin.min.js +0 -9
- package/tinymce-assets/plugins/paste/index.js +0 -7
- package/tinymce-assets/plugins/paste/plugin.js +0 -1803
- package/tinymce-assets/plugins/paste/plugin.min.js +0 -9
- package/tinymce-assets/plugins/print/index.js +0 -7
- package/tinymce-assets/plugins/print/plugin.js +0 -52
- package/tinymce-assets/plugins/print/plugin.min.js +0 -9
- package/tinymce-assets/plugins/spellchecker/index.js +0 -7
- package/tinymce-assets/plugins/spellchecker/plugin.js +0 -730
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +0 -9
- package/tinymce-assets/plugins/tabfocus/index.js +0 -7
- package/tinymce-assets/plugins/tabfocus/plugin.js +0 -130
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +0 -9
- package/tinymce-assets/plugins/template/index.js +0 -7
- package/tinymce-assets/plugins/template/plugin.js +0 -591
- package/tinymce-assets/plugins/template/plugin.min.js +0 -9
- package/tinymce-assets/plugins/textcolor/index.js +0 -7
- package/tinymce-assets/plugins/textcolor/plugin.js +0 -21
- package/tinymce-assets/plugins/textcolor/plugin.min.js +0 -9
- package/tinymce-assets/plugins/textpattern/index.js +0 -7
- package/tinymce-assets/plugins/textpattern/plugin.js +0 -1374
- package/tinymce-assets/plugins/textpattern/plugin.min.js +0 -9
- package/tinymce-assets/plugins/toc/index.js +0 -7
- package/tinymce-assets/plugins/toc/plugin.js +0 -238
- package/tinymce-assets/plugins/toc/plugin.min.js +0 -9
- package/tinymce-assets/skins/ui/oxide/content.mobile.css +0 -29
- package/tinymce-assets/skins/ui/oxide/content.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/tinymce-assets/skins/ui/oxide/skin.mobile.css +0 -673
- package/tinymce-assets/skins/ui/oxide/skin.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/tinymce-assets/skins/ui/oxide-dark/content.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
- package/tinymce-assets/themes/mobile/index.js +0 -7
- package/tinymce-assets/themes/mobile/theme.js +0 -13130
- package/tinymce-assets/themes/mobile/theme.min.js +0 -9
|
@@ -1,44 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Licensed under the LGPL or a commercial license.
|
|
4
|
-
* For LGPL see License.txt in the project root for license information.
|
|
5
|
-
* For commercial licenses see https://www.tiny.cloud/
|
|
6
|
-
*
|
|
7
|
-
* Version: 5.10.9 (2023-11-15)
|
|
2
|
+
* TinyMCE version 7.0.1 (2024-04-10)
|
|
8
3
|
*/
|
|
4
|
+
|
|
9
5
|
(function () {
|
|
10
6
|
'use strict';
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
const Cell = initial => {
|
|
9
|
+
let value = initial;
|
|
10
|
+
const get = () => {
|
|
15
11
|
return value;
|
|
16
12
|
};
|
|
17
|
-
|
|
13
|
+
const set = v => {
|
|
18
14
|
value = v;
|
|
19
15
|
};
|
|
20
16
|
return {
|
|
21
|
-
get
|
|
22
|
-
set
|
|
17
|
+
get,
|
|
18
|
+
set
|
|
23
19
|
};
|
|
24
20
|
};
|
|
25
21
|
|
|
26
|
-
var global$
|
|
22
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
23
|
+
|
|
24
|
+
let unique = 0;
|
|
25
|
+
const generate = prefix => {
|
|
26
|
+
const date = new Date();
|
|
27
|
+
const time = date.getTime();
|
|
28
|
+
const random = Math.floor(Math.random() * 1000000000);
|
|
29
|
+
unique++;
|
|
30
|
+
return prefix + '_' + random + unique + String(time);
|
|
31
|
+
};
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
33
|
+
const get$1 = customTabs => {
|
|
34
|
+
const addTab = spec => {
|
|
35
|
+
var _a;
|
|
36
|
+
const name = (_a = spec.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
|
37
|
+
const currentCustomTabs = customTabs.get();
|
|
38
|
+
currentCustomTabs[name] = spec;
|
|
32
39
|
customTabs.set(currentCustomTabs);
|
|
33
40
|
};
|
|
34
|
-
return { addTab
|
|
41
|
+
return { addTab };
|
|
35
42
|
};
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
const register$2 = (editor, dialogOpener) => {
|
|
38
45
|
editor.addCommand('mceHelp', dialogOpener);
|
|
39
46
|
};
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
const option = name => editor => editor.options.get(name);
|
|
49
|
+
const register$1 = editor => {
|
|
50
|
+
const registerOption = editor.options.register;
|
|
51
|
+
registerOption('help_tabs', { processor: 'array' });
|
|
52
|
+
};
|
|
53
|
+
const getHelpTabs = option('help_tabs');
|
|
54
|
+
const getForcedPlugins = option('forced_plugins');
|
|
55
|
+
|
|
56
|
+
const register = (editor, dialogOpener) => {
|
|
42
57
|
editor.ui.registry.addButton('help', {
|
|
43
58
|
icon: 'help',
|
|
44
59
|
tooltip: 'Help',
|
|
@@ -52,150 +67,161 @@
|
|
|
52
67
|
});
|
|
53
68
|
};
|
|
54
69
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
const hasProto = (v, constructor, predicate) => {
|
|
71
|
+
var _a;
|
|
72
|
+
if (predicate(v, constructor.prototype)) {
|
|
73
|
+
return true;
|
|
74
|
+
} else {
|
|
75
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const typeOf = x => {
|
|
79
|
+
const t = typeof x;
|
|
80
|
+
if (x === null) {
|
|
81
|
+
return 'null';
|
|
82
|
+
} else if (t === 'object' && Array.isArray(x)) {
|
|
83
|
+
return 'array';
|
|
84
|
+
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
85
|
+
return 'string';
|
|
86
|
+
} else {
|
|
63
87
|
return t;
|
|
64
|
-
}
|
|
65
|
-
return __assign.apply(this, arguments);
|
|
88
|
+
}
|
|
66
89
|
};
|
|
90
|
+
const isType = type => value => typeOf(value) === type;
|
|
91
|
+
const isSimpleType = type => value => typeof value === type;
|
|
92
|
+
const eq = t => a => t === a;
|
|
93
|
+
const isString = isType('string');
|
|
94
|
+
const isUndefined = eq(undefined);
|
|
95
|
+
const isNullable = a => a === null || a === undefined;
|
|
96
|
+
const isNonNullable = a => !isNullable(a);
|
|
97
|
+
const isFunction = isSimpleType('function');
|
|
67
98
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var constant = function (value) {
|
|
71
|
-
return function () {
|
|
99
|
+
const constant = value => {
|
|
100
|
+
return () => {
|
|
72
101
|
return value;
|
|
73
102
|
};
|
|
74
103
|
};
|
|
75
|
-
|
|
76
|
-
return x;
|
|
77
|
-
};
|
|
78
|
-
var never = constant(false);
|
|
79
|
-
var always = constant(true);
|
|
104
|
+
const never = constant(false);
|
|
80
105
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
getOrDie: function (msg) {
|
|
98
|
-
throw new Error(msg || 'error: getOrDie called on none.');
|
|
99
|
-
},
|
|
100
|
-
getOrNull: constant(null),
|
|
101
|
-
getOrUndefined: constant(undefined),
|
|
102
|
-
or: id,
|
|
103
|
-
orThunk: call,
|
|
104
|
-
map: none,
|
|
105
|
-
each: noop,
|
|
106
|
-
bind: none,
|
|
107
|
-
exists: never,
|
|
108
|
-
forall: always,
|
|
109
|
-
filter: function () {
|
|
110
|
-
return none();
|
|
111
|
-
},
|
|
112
|
-
toArray: function () {
|
|
113
|
-
return [];
|
|
114
|
-
},
|
|
115
|
-
toString: constant('none()')
|
|
116
|
-
};
|
|
117
|
-
return me;
|
|
118
|
-
}();
|
|
119
|
-
var some = function (a) {
|
|
120
|
-
var constant_a = constant(a);
|
|
121
|
-
var self = function () {
|
|
122
|
-
return me;
|
|
123
|
-
};
|
|
124
|
-
var bind = function (f) {
|
|
125
|
-
return f(a);
|
|
126
|
-
};
|
|
127
|
-
var me = {
|
|
128
|
-
fold: function (n, s) {
|
|
129
|
-
return s(a);
|
|
130
|
-
},
|
|
131
|
-
isSome: always,
|
|
132
|
-
isNone: never,
|
|
133
|
-
getOr: constant_a,
|
|
134
|
-
getOrThunk: constant_a,
|
|
135
|
-
getOrDie: constant_a,
|
|
136
|
-
getOrNull: constant_a,
|
|
137
|
-
getOrUndefined: constant_a,
|
|
138
|
-
or: self,
|
|
139
|
-
orThunk: self,
|
|
140
|
-
map: function (f) {
|
|
141
|
-
return some(f(a));
|
|
142
|
-
},
|
|
143
|
-
each: function (f) {
|
|
144
|
-
f(a);
|
|
145
|
-
},
|
|
146
|
-
bind: bind,
|
|
147
|
-
exists: bind,
|
|
148
|
-
forall: bind,
|
|
149
|
-
filter: function (f) {
|
|
150
|
-
return f(a) ? me : NONE;
|
|
151
|
-
},
|
|
152
|
-
toArray: function () {
|
|
153
|
-
return [a];
|
|
154
|
-
},
|
|
155
|
-
toString: function () {
|
|
156
|
-
return 'some(' + a + ')';
|
|
106
|
+
class Optional {
|
|
107
|
+
constructor(tag, value) {
|
|
108
|
+
this.tag = tag;
|
|
109
|
+
this.value = value;
|
|
110
|
+
}
|
|
111
|
+
static some(value) {
|
|
112
|
+
return new Optional(true, value);
|
|
113
|
+
}
|
|
114
|
+
static none() {
|
|
115
|
+
return Optional.singletonNone;
|
|
116
|
+
}
|
|
117
|
+
fold(onNone, onSome) {
|
|
118
|
+
if (this.tag) {
|
|
119
|
+
return onSome(this.value);
|
|
120
|
+
} else {
|
|
121
|
+
return onNone();
|
|
157
122
|
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
123
|
+
}
|
|
124
|
+
isSome() {
|
|
125
|
+
return this.tag;
|
|
126
|
+
}
|
|
127
|
+
isNone() {
|
|
128
|
+
return !this.tag;
|
|
129
|
+
}
|
|
130
|
+
map(mapper) {
|
|
131
|
+
if (this.tag) {
|
|
132
|
+
return Optional.some(mapper(this.value));
|
|
133
|
+
} else {
|
|
134
|
+
return Optional.none();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
bind(binder) {
|
|
138
|
+
if (this.tag) {
|
|
139
|
+
return binder(this.value);
|
|
140
|
+
} else {
|
|
141
|
+
return Optional.none();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exists(predicate) {
|
|
145
|
+
return this.tag && predicate(this.value);
|
|
146
|
+
}
|
|
147
|
+
forall(predicate) {
|
|
148
|
+
return !this.tag || predicate(this.value);
|
|
149
|
+
}
|
|
150
|
+
filter(predicate) {
|
|
151
|
+
if (!this.tag || predicate(this.value)) {
|
|
152
|
+
return this;
|
|
153
|
+
} else {
|
|
154
|
+
return Optional.none();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
getOr(replacement) {
|
|
158
|
+
return this.tag ? this.value : replacement;
|
|
159
|
+
}
|
|
160
|
+
or(replacement) {
|
|
161
|
+
return this.tag ? this : replacement;
|
|
162
|
+
}
|
|
163
|
+
getOrThunk(thunk) {
|
|
164
|
+
return this.tag ? this.value : thunk();
|
|
165
|
+
}
|
|
166
|
+
orThunk(thunk) {
|
|
167
|
+
return this.tag ? this : thunk();
|
|
168
|
+
}
|
|
169
|
+
getOrDie(message) {
|
|
170
|
+
if (!this.tag) {
|
|
171
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
172
|
+
} else {
|
|
173
|
+
return this.value;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
static from(value) {
|
|
177
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
178
|
+
}
|
|
179
|
+
getOrNull() {
|
|
180
|
+
return this.tag ? this.value : null;
|
|
181
|
+
}
|
|
182
|
+
getOrUndefined() {
|
|
183
|
+
return this.value;
|
|
184
|
+
}
|
|
185
|
+
each(worker) {
|
|
186
|
+
if (this.tag) {
|
|
187
|
+
worker(this.value);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
toArray() {
|
|
191
|
+
return this.tag ? [this.value] : [];
|
|
192
|
+
}
|
|
193
|
+
toString() {
|
|
194
|
+
return this.tag ? `some(${ this.value })` : 'none()';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
Optional.singletonNone = new Optional(false);
|
|
169
198
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
var r = new Array(len);
|
|
180
|
-
for (var i = 0; i < len; i++) {
|
|
181
|
-
var x = xs[i];
|
|
199
|
+
const nativeSlice = Array.prototype.slice;
|
|
200
|
+
const nativeIndexOf = Array.prototype.indexOf;
|
|
201
|
+
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
202
|
+
const contains = (xs, x) => rawIndexOf(xs, x) > -1;
|
|
203
|
+
const map = (xs, f) => {
|
|
204
|
+
const len = xs.length;
|
|
205
|
+
const r = new Array(len);
|
|
206
|
+
for (let i = 0; i < len; i++) {
|
|
207
|
+
const x = xs[i];
|
|
182
208
|
r[i] = f(x, i);
|
|
183
209
|
}
|
|
184
210
|
return r;
|
|
185
211
|
};
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
for (
|
|
189
|
-
|
|
212
|
+
const filter = (xs, pred) => {
|
|
213
|
+
const r = [];
|
|
214
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
215
|
+
const x = xs[i];
|
|
190
216
|
if (pred(x, i)) {
|
|
191
217
|
r.push(x);
|
|
192
218
|
}
|
|
193
219
|
}
|
|
194
220
|
return r;
|
|
195
221
|
};
|
|
196
|
-
|
|
197
|
-
for (
|
|
198
|
-
|
|
222
|
+
const findUntil = (xs, pred, until) => {
|
|
223
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
224
|
+
const x = xs[i];
|
|
199
225
|
if (pred(x, i)) {
|
|
200
226
|
return Optional.some(x);
|
|
201
227
|
} else if (until(x, i)) {
|
|
@@ -204,43 +230,50 @@
|
|
|
204
230
|
}
|
|
205
231
|
return Optional.none();
|
|
206
232
|
};
|
|
207
|
-
|
|
233
|
+
const find = (xs, pred) => {
|
|
208
234
|
return findUntil(xs, pred, never);
|
|
209
235
|
};
|
|
236
|
+
const sort = (xs, comparator) => {
|
|
237
|
+
const copy = nativeSlice.call(xs, 0);
|
|
238
|
+
copy.sort(comparator);
|
|
239
|
+
return copy;
|
|
240
|
+
};
|
|
210
241
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
242
|
+
const keys = Object.keys;
|
|
243
|
+
const hasOwnProperty = Object.hasOwnProperty;
|
|
244
|
+
const get = (obj, key) => {
|
|
214
245
|
return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
|
|
215
246
|
};
|
|
216
|
-
|
|
217
|
-
return hasOwnProperty.call(obj, key);
|
|
218
|
-
};
|
|
247
|
+
const has = (obj, key) => hasOwnProperty.call(obj, key);
|
|
219
248
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
249
|
+
const cat = arr => {
|
|
250
|
+
const r = [];
|
|
251
|
+
const push = x => {
|
|
223
252
|
r.push(x);
|
|
224
253
|
};
|
|
225
|
-
for (
|
|
254
|
+
for (let i = 0; i < arr.length; i++) {
|
|
226
255
|
arr[i].each(push);
|
|
227
256
|
}
|
|
228
257
|
return r;
|
|
229
258
|
};
|
|
230
259
|
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
260
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.Resource');
|
|
261
|
+
|
|
262
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');
|
|
263
|
+
|
|
264
|
+
const pLoadHtmlByLangCode = (baseUrl, langCode) => global$3.load(`tinymce.html-i18n.help-keynav.${ langCode }`, `${ baseUrl }/js/i18n/keynav/${ langCode }.js`);
|
|
265
|
+
const pLoadI18nHtml = baseUrl => pLoadHtmlByLangCode(baseUrl, global$2.getCode()).catch(() => pLoadHtmlByLangCode(baseUrl, 'en'));
|
|
266
|
+
const initI18nLoad = (editor, baseUrl) => {
|
|
267
|
+
editor.on('init', () => {
|
|
268
|
+
pLoadI18nHtml(baseUrl);
|
|
269
|
+
});
|
|
236
270
|
};
|
|
237
271
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
var body = {
|
|
272
|
+
const pTab = async pluginUrl => {
|
|
273
|
+
const body = {
|
|
241
274
|
type: 'htmlpanel',
|
|
242
275
|
presets: 'document',
|
|
243
|
-
html:
|
|
276
|
+
html: await pLoadI18nHtml(pluginUrl)
|
|
244
277
|
};
|
|
245
278
|
return {
|
|
246
279
|
name: 'keyboardnav',
|
|
@@ -249,30 +282,31 @@
|
|
|
249
282
|
};
|
|
250
283
|
};
|
|
251
284
|
|
|
252
|
-
var global$
|
|
285
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
253
286
|
|
|
254
|
-
|
|
255
|
-
|
|
287
|
+
const convertText = source => {
|
|
288
|
+
const isMac = global$1.os.isMacOS() || global$1.os.isiOS();
|
|
289
|
+
const mac = {
|
|
256
290
|
alt: '⌥',
|
|
257
291
|
ctrl: '⌃',
|
|
258
292
|
shift: '⇧',
|
|
259
293
|
meta: '⌘',
|
|
260
294
|
access: '⌃⌥'
|
|
261
295
|
};
|
|
262
|
-
|
|
296
|
+
const other = {
|
|
263
297
|
meta: 'Ctrl ',
|
|
264
298
|
access: 'Shift + Alt '
|
|
265
299
|
};
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
300
|
+
const replace = isMac ? mac : other;
|
|
301
|
+
const shortcut = source.split('+');
|
|
302
|
+
const updated = map(shortcut, segment => {
|
|
303
|
+
const search = segment.toLowerCase().trim();
|
|
270
304
|
return has(replace, search) ? replace[search] : segment;
|
|
271
305
|
});
|
|
272
|
-
return
|
|
306
|
+
return isMac ? updated.join('').replace(/\s/, '') : updated.join('+');
|
|
273
307
|
};
|
|
274
308
|
|
|
275
|
-
|
|
309
|
+
const shortcuts = [
|
|
276
310
|
{
|
|
277
311
|
shortcuts: ['Meta + B'],
|
|
278
312
|
action: 'Bold'
|
|
@@ -378,15 +412,15 @@
|
|
|
378
412
|
}
|
|
379
413
|
];
|
|
380
414
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
415
|
+
const tab$2 = () => {
|
|
416
|
+
const shortcutList = map(shortcuts, shortcut => {
|
|
417
|
+
const shortcutText = map(shortcut.shortcuts, convertText).join(' or ');
|
|
384
418
|
return [
|
|
385
419
|
shortcut.action,
|
|
386
420
|
shortcutText
|
|
387
421
|
];
|
|
388
422
|
});
|
|
389
|
-
|
|
423
|
+
const tablePanel = {
|
|
390
424
|
type: 'table',
|
|
391
425
|
header: [
|
|
392
426
|
'Action',
|
|
@@ -401,12 +435,10 @@
|
|
|
401
435
|
};
|
|
402
436
|
};
|
|
403
437
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
var urls = map([
|
|
438
|
+
const urls = map([
|
|
407
439
|
{
|
|
408
|
-
key: '
|
|
409
|
-
name: '
|
|
440
|
+
key: 'accordion',
|
|
441
|
+
name: 'Accordion'
|
|
410
442
|
},
|
|
411
443
|
{
|
|
412
444
|
key: 'anchor',
|
|
@@ -424,10 +456,6 @@
|
|
|
424
456
|
key: 'autosave',
|
|
425
457
|
name: 'Autosave'
|
|
426
458
|
},
|
|
427
|
-
{
|
|
428
|
-
key: 'bbcode',
|
|
429
|
-
name: 'BBCode'
|
|
430
|
-
},
|
|
431
459
|
{
|
|
432
460
|
key: 'charmap',
|
|
433
461
|
name: 'Character Map'
|
|
@@ -452,10 +480,6 @@
|
|
|
452
480
|
key: 'emoticons',
|
|
453
481
|
name: 'Emoticons'
|
|
454
482
|
},
|
|
455
|
-
{
|
|
456
|
-
key: 'fullpage',
|
|
457
|
-
name: 'Full Page'
|
|
458
|
-
},
|
|
459
483
|
{
|
|
460
484
|
key: 'fullscreen',
|
|
461
485
|
name: 'Full Screen'
|
|
@@ -464,18 +488,10 @@
|
|
|
464
488
|
key: 'help',
|
|
465
489
|
name: 'Help'
|
|
466
490
|
},
|
|
467
|
-
{
|
|
468
|
-
key: 'hr',
|
|
469
|
-
name: 'Horizontal Rule'
|
|
470
|
-
},
|
|
471
491
|
{
|
|
472
492
|
key: 'image',
|
|
473
493
|
name: 'Image'
|
|
474
494
|
},
|
|
475
|
-
{
|
|
476
|
-
key: 'imagetools',
|
|
477
|
-
name: 'Image Tools'
|
|
478
|
-
},
|
|
479
495
|
{
|
|
480
496
|
key: 'importcss',
|
|
481
497
|
name: 'Import CSS'
|
|
@@ -484,10 +500,6 @@
|
|
|
484
500
|
key: 'insertdatetime',
|
|
485
501
|
name: 'Insert Date/Time'
|
|
486
502
|
},
|
|
487
|
-
{
|
|
488
|
-
key: 'legacyoutput',
|
|
489
|
-
name: 'Legacy Output'
|
|
490
|
-
},
|
|
491
503
|
{
|
|
492
504
|
key: 'link',
|
|
493
505
|
name: 'Link'
|
|
@@ -496,6 +508,10 @@
|
|
|
496
508
|
key: 'lists',
|
|
497
509
|
name: 'Lists'
|
|
498
510
|
},
|
|
511
|
+
{
|
|
512
|
+
key: 'advlist',
|
|
513
|
+
name: 'List Styles'
|
|
514
|
+
},
|
|
499
515
|
{
|
|
500
516
|
key: 'media',
|
|
501
517
|
name: 'Media'
|
|
@@ -504,26 +520,14 @@
|
|
|
504
520
|
key: 'nonbreaking',
|
|
505
521
|
name: 'Nonbreaking'
|
|
506
522
|
},
|
|
507
|
-
{
|
|
508
|
-
key: 'noneditable',
|
|
509
|
-
name: 'Noneditable'
|
|
510
|
-
},
|
|
511
523
|
{
|
|
512
524
|
key: 'pagebreak',
|
|
513
525
|
name: 'Page Break'
|
|
514
526
|
},
|
|
515
|
-
{
|
|
516
|
-
key: 'paste',
|
|
517
|
-
name: 'Paste'
|
|
518
|
-
},
|
|
519
527
|
{
|
|
520
528
|
key: 'preview',
|
|
521
529
|
name: 'Preview'
|
|
522
530
|
},
|
|
523
|
-
{
|
|
524
|
-
key: 'print',
|
|
525
|
-
name: 'Print'
|
|
526
|
-
},
|
|
527
531
|
{
|
|
528
532
|
key: 'quickbars',
|
|
529
533
|
name: 'Quick Toolbars'
|
|
@@ -536,34 +540,14 @@
|
|
|
536
540
|
key: 'searchreplace',
|
|
537
541
|
name: 'Search and Replace'
|
|
538
542
|
},
|
|
539
|
-
{
|
|
540
|
-
key: 'spellchecker',
|
|
541
|
-
name: 'Spell Checker'
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
key: 'tabfocus',
|
|
545
|
-
name: 'Tab Focus'
|
|
546
|
-
},
|
|
547
543
|
{
|
|
548
544
|
key: 'table',
|
|
549
545
|
name: 'Table'
|
|
550
546
|
},
|
|
551
|
-
{
|
|
552
|
-
key: 'template',
|
|
553
|
-
name: 'Template'
|
|
554
|
-
},
|
|
555
547
|
{
|
|
556
548
|
key: 'textcolor',
|
|
557
549
|
name: 'Text Color'
|
|
558
550
|
},
|
|
559
|
-
{
|
|
560
|
-
key: 'textpattern',
|
|
561
|
-
name: 'Text Pattern'
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
key: 'toc',
|
|
565
|
-
name: 'Table of Contents'
|
|
566
|
-
},
|
|
567
551
|
{
|
|
568
552
|
key: 'visualblocks',
|
|
569
553
|
name: 'Visual Blocks'
|
|
@@ -582,18 +566,14 @@
|
|
|
582
566
|
type: 'premium'
|
|
583
567
|
},
|
|
584
568
|
{
|
|
585
|
-
key: '
|
|
586
|
-
name: 'Advanced
|
|
587
|
-
type: 'premium'
|
|
588
|
-
|
|
589
|
-
{
|
|
590
|
-
key: 'advtable',
|
|
591
|
-
name: 'Advanced Tables',
|
|
592
|
-
type: 'premium'
|
|
569
|
+
key: 'typography',
|
|
570
|
+
name: 'Advanced Typography',
|
|
571
|
+
type: 'premium',
|
|
572
|
+
slug: 'advanced-typography'
|
|
593
573
|
},
|
|
594
574
|
{
|
|
595
|
-
key: '
|
|
596
|
-
name: '
|
|
575
|
+
key: 'ai',
|
|
576
|
+
name: 'AI Assistant',
|
|
597
577
|
type: 'premium'
|
|
598
578
|
},
|
|
599
579
|
{
|
|
@@ -607,13 +587,34 @@
|
|
|
607
587
|
type: 'premium'
|
|
608
588
|
},
|
|
609
589
|
{
|
|
610
|
-
key: '
|
|
611
|
-
name: '
|
|
590
|
+
key: 'advcode',
|
|
591
|
+
name: 'Enhanced Code Editor',
|
|
612
592
|
type: 'premium'
|
|
613
593
|
},
|
|
614
594
|
{
|
|
615
595
|
key: 'mediaembed',
|
|
616
596
|
name: 'Enhanced Media Embed',
|
|
597
|
+
type: 'premium',
|
|
598
|
+
slug: 'introduction-to-mediaembed'
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
key: 'advtable',
|
|
602
|
+
name: 'Enhanced Tables',
|
|
603
|
+
type: 'premium'
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
key: 'exportpdf',
|
|
607
|
+
name: 'Export to PDF',
|
|
608
|
+
type: 'premium'
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
key: 'exportword',
|
|
612
|
+
name: 'Export to Word',
|
|
613
|
+
type: 'premium'
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
key: 'footnotes',
|
|
617
|
+
name: 'Footnotes',
|
|
617
618
|
type: 'premium'
|
|
618
619
|
},
|
|
619
620
|
{
|
|
@@ -621,16 +622,42 @@
|
|
|
621
622
|
name: 'Format Painter',
|
|
622
623
|
type: 'premium'
|
|
623
624
|
},
|
|
625
|
+
{
|
|
626
|
+
key: 'editimage',
|
|
627
|
+
name: 'Image Editing',
|
|
628
|
+
type: 'premium'
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
key: 'importword',
|
|
632
|
+
name: 'Import from Word',
|
|
633
|
+
type: 'premium'
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
key: 'inlinecss',
|
|
637
|
+
name: 'Inline CSS',
|
|
638
|
+
type: 'premium',
|
|
639
|
+
slug: 'inline-css'
|
|
640
|
+
},
|
|
624
641
|
{
|
|
625
642
|
key: 'linkchecker',
|
|
626
643
|
name: 'Link Checker',
|
|
627
644
|
type: 'premium'
|
|
628
645
|
},
|
|
646
|
+
{
|
|
647
|
+
key: 'markdown',
|
|
648
|
+
name: 'Markdown',
|
|
649
|
+
type: 'premium'
|
|
650
|
+
},
|
|
629
651
|
{
|
|
630
652
|
key: 'mentions',
|
|
631
653
|
name: 'Mentions',
|
|
632
654
|
type: 'premium'
|
|
633
655
|
},
|
|
656
|
+
{
|
|
657
|
+
key: 'mergetags',
|
|
658
|
+
name: 'Merge Tags',
|
|
659
|
+
type: 'premium'
|
|
660
|
+
},
|
|
634
661
|
{
|
|
635
662
|
key: 'pageembed',
|
|
636
663
|
name: 'Page Embed',
|
|
@@ -644,91 +671,120 @@
|
|
|
644
671
|
{
|
|
645
672
|
key: 'powerpaste',
|
|
646
673
|
name: 'PowerPaste',
|
|
647
|
-
type: 'premium'
|
|
674
|
+
type: 'premium',
|
|
675
|
+
slug: 'introduction-to-powerpaste'
|
|
648
676
|
},
|
|
649
677
|
{
|
|
650
|
-
key: '
|
|
651
|
-
name: '
|
|
678
|
+
key: 'revisionhistory',
|
|
679
|
+
name: 'Revision History',
|
|
652
680
|
type: 'premium'
|
|
653
681
|
},
|
|
654
682
|
{
|
|
655
683
|
key: 'tinymcespellchecker',
|
|
656
|
-
name: 'Spell Checker
|
|
684
|
+
name: 'Spell Checker',
|
|
685
|
+
type: 'premium',
|
|
686
|
+
slug: 'introduction-to-tiny-spellchecker'
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
key: 'autocorrect',
|
|
690
|
+
name: 'Spelling Autocorrect',
|
|
691
|
+
type: 'premium'
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
key: 'tableofcontents',
|
|
695
|
+
name: 'Table of Contents',
|
|
657
696
|
type: 'premium'
|
|
658
697
|
},
|
|
698
|
+
{
|
|
699
|
+
key: 'advtemplate',
|
|
700
|
+
name: 'Templates',
|
|
701
|
+
type: 'premium',
|
|
702
|
+
slug: 'advanced-templates'
|
|
703
|
+
},
|
|
659
704
|
{
|
|
660
705
|
key: 'tinycomments',
|
|
661
706
|
name: 'Tiny Comments',
|
|
662
707
|
type: 'premium',
|
|
663
|
-
slug: 'comments'
|
|
708
|
+
slug: 'introduction-to-tiny-comments'
|
|
664
709
|
},
|
|
665
710
|
{
|
|
666
711
|
key: 'tinydrive',
|
|
667
712
|
name: 'Tiny Drive',
|
|
668
|
-
type: 'premium'
|
|
713
|
+
type: 'premium',
|
|
714
|
+
slug: 'tinydrive-introduction'
|
|
669
715
|
}
|
|
670
|
-
],
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
});
|
|
716
|
+
], item => ({
|
|
717
|
+
...item,
|
|
718
|
+
type: item.type || 'opensource',
|
|
719
|
+
slug: item.slug || item.key
|
|
720
|
+
}));
|
|
676
721
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
return key !== 'autocorrect' && type === 'premium';
|
|
682
|
-
});
|
|
683
|
-
var premiumPluginList = map(premiumPlugins, function (plugin) {
|
|
684
|
-
return '<li>' + global$1.translate(plugin.name) + '</li>';
|
|
685
|
-
}).join('');
|
|
686
|
-
return '<div data-mce-tabstop="1" tabindex="-1">' + '<p><b>' + global$1.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">' + global$1.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
|
|
687
|
-
};
|
|
688
|
-
var makeLink = function (p) {
|
|
689
|
-
return '<a href="' + p.url + '" target="_blank" rel="noopener">' + p.name + '</a>';
|
|
690
|
-
};
|
|
691
|
-
var maybeUrlize = function (editor, key) {
|
|
692
|
-
return find(urls, function (x) {
|
|
693
|
-
return x.key === key;
|
|
694
|
-
}).fold(function () {
|
|
695
|
-
var getMetadata = editor.plugins[key].getMetadata;
|
|
696
|
-
return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
|
|
697
|
-
}, function (x) {
|
|
698
|
-
var name = x.type === 'premium' ? x.name + '*' : x.name;
|
|
699
|
-
return makeLink({
|
|
700
|
-
name: name,
|
|
701
|
-
url: 'https://www.tiny.cloud/docs/plugins/' + x.type + '/' + x.slug
|
|
702
|
-
});
|
|
722
|
+
const tab$1 = editor => {
|
|
723
|
+
const availablePlugins = () => {
|
|
724
|
+
const premiumPlugins = filter(urls, ({type}) => {
|
|
725
|
+
return type === 'premium';
|
|
703
726
|
});
|
|
727
|
+
const sortedPremiumPlugins = sort(map(premiumPlugins, p => p.name), (s1, s2) => s1.localeCompare(s2));
|
|
728
|
+
const premiumPluginList = map(sortedPremiumPlugins, pluginName => `<li>${ pluginName }</li>`).join('');
|
|
729
|
+
return '<div>' + '<p><b>' + global$2.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" ">' + '<a href="https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading" rel="noopener" target="_blank"' + ' data-alloy-tabstop="true" tabindex="-1">' + global$2.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
|
|
730
|
+
};
|
|
731
|
+
const makeLink = p => `<a data-alloy-tabstop="true" tabindex="-1" href="${ p.url }" target="_blank" rel="noopener">${ p.name }</a>`;
|
|
732
|
+
const identifyUnknownPlugin = (editor, key) => {
|
|
733
|
+
const getMetadata = editor.plugins[key].getMetadata;
|
|
734
|
+
if (isFunction(getMetadata)) {
|
|
735
|
+
const metadata = getMetadata();
|
|
736
|
+
return {
|
|
737
|
+
name: metadata.name,
|
|
738
|
+
html: makeLink(metadata)
|
|
739
|
+
};
|
|
740
|
+
} else {
|
|
741
|
+
return {
|
|
742
|
+
name: key,
|
|
743
|
+
html: key
|
|
744
|
+
};
|
|
745
|
+
}
|
|
704
746
|
};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
return
|
|
709
|
-
|
|
747
|
+
const getPluginData = (editor, key) => find(urls, x => {
|
|
748
|
+
return x.key === key;
|
|
749
|
+
}).fold(() => {
|
|
750
|
+
return identifyUnknownPlugin(editor, key);
|
|
751
|
+
}, x => {
|
|
752
|
+
const name = x.type === 'premium' ? `${ x.name }*` : x.name;
|
|
753
|
+
const html = makeLink({
|
|
754
|
+
name,
|
|
755
|
+
url: `https://www.tiny.cloud/docs/tinymce/7/${ x.slug }/`
|
|
710
756
|
});
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
757
|
+
return {
|
|
758
|
+
name,
|
|
759
|
+
html
|
|
760
|
+
};
|
|
761
|
+
});
|
|
762
|
+
const getPluginKeys = editor => {
|
|
763
|
+
const keys$1 = keys(editor.plugins);
|
|
764
|
+
const forcedPlugins = getForcedPlugins(editor);
|
|
765
|
+
return isUndefined(forcedPlugins) ? keys$1 : filter(keys$1, k => !contains(forcedPlugins, k));
|
|
766
|
+
};
|
|
767
|
+
const pluginLister = editor => {
|
|
768
|
+
const pluginKeys = getPluginKeys(editor);
|
|
769
|
+
const sortedPluginData = sort(map(pluginKeys, k => getPluginData(editor, k)), (pd1, pd2) => pd1.name.localeCompare(pd2.name));
|
|
770
|
+
const pluginLis = map(sortedPluginData, key => {
|
|
771
|
+
return '<li>' + key.html + '</li>';
|
|
716
772
|
});
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
773
|
+
const count = pluginLis.length;
|
|
774
|
+
const pluginsString = pluginLis.join('');
|
|
775
|
+
const html = '<p><b>' + global$2.translate([
|
|
720
776
|
'Plugins installed ({0}):',
|
|
721
777
|
count
|
|
722
778
|
]) + '</b></p>' + '<ul>' + pluginsString + '</ul>';
|
|
723
779
|
return html;
|
|
724
780
|
};
|
|
725
|
-
|
|
781
|
+
const installedPlugins = editor => {
|
|
726
782
|
if (editor == null) {
|
|
727
783
|
return '';
|
|
728
784
|
}
|
|
729
|
-
return '<div
|
|
785
|
+
return '<div>' + pluginLister(editor) + '</div>';
|
|
730
786
|
};
|
|
731
|
-
|
|
787
|
+
const htmlPanel = {
|
|
732
788
|
type: 'htmlpanel',
|
|
733
789
|
presets: 'document',
|
|
734
790
|
html: [
|
|
@@ -745,15 +801,13 @@
|
|
|
745
801
|
|
|
746
802
|
var global = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
747
803
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
var changeLogLink = '<a href="https://www.tiny.cloud/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE ' + version + '</a>';
|
|
754
|
-
var htmlPanel = {
|
|
804
|
+
const tab = () => {
|
|
805
|
+
const getVersion = (major, minor) => major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
|
|
806
|
+
const version = getVersion(global.majorVersion, global.minorVersion);
|
|
807
|
+
const changeLogLink = '<a data-alloy-tabstop="true" tabindex="-1" href="https://www.tiny.cloud/docs/tinymce/7/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral" rel="noopener" target="_blank">TinyMCE ' + version + '</a>';
|
|
808
|
+
const htmlPanel = {
|
|
755
809
|
type: 'htmlpanel',
|
|
756
|
-
html: '<p>' + global$
|
|
810
|
+
html: '<p>' + global$2.translate([
|
|
757
811
|
'You are using {0}',
|
|
758
812
|
changeLogLink
|
|
759
813
|
]) + '</p>',
|
|
@@ -766,64 +820,64 @@
|
|
|
766
820
|
};
|
|
767
821
|
};
|
|
768
822
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
823
|
+
const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
|
|
824
|
+
const newTabs = {};
|
|
825
|
+
const names = map(tabsFromSettings, t => {
|
|
826
|
+
var _a;
|
|
827
|
+
if (isString(t)) {
|
|
773
828
|
if (has(tabs, t)) {
|
|
774
829
|
newTabs[t] = tabs[t];
|
|
775
830
|
}
|
|
776
831
|
return t;
|
|
777
832
|
} else {
|
|
778
|
-
|
|
779
|
-
|
|
833
|
+
const name = (_a = t.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
|
834
|
+
newTabs[name] = t;
|
|
835
|
+
return name;
|
|
780
836
|
}
|
|
781
837
|
});
|
|
782
838
|
return {
|
|
783
839
|
tabs: newTabs,
|
|
784
|
-
names
|
|
840
|
+
names
|
|
785
841
|
};
|
|
786
842
|
};
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
843
|
+
const getNamesFromTabs = tabs => {
|
|
844
|
+
const names = keys(tabs);
|
|
845
|
+
const idx = names.indexOf('versions');
|
|
790
846
|
if (idx !== -1) {
|
|
791
847
|
names.splice(idx, 1);
|
|
792
848
|
names.push('versions');
|
|
793
849
|
}
|
|
794
850
|
return {
|
|
795
|
-
tabs
|
|
796
|
-
names
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
var dialogTabs = cat(foundTabs);
|
|
819
|
-
var body = {
|
|
851
|
+
tabs,
|
|
852
|
+
names
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
const pParseCustomTabs = async (editor, customTabs, pluginUrl) => {
|
|
856
|
+
const shortcuts = tab$2();
|
|
857
|
+
const nav = await pTab(pluginUrl);
|
|
858
|
+
const plugins = tab$1(editor);
|
|
859
|
+
const versions = tab();
|
|
860
|
+
const tabs = {
|
|
861
|
+
[shortcuts.name]: shortcuts,
|
|
862
|
+
[nav.name]: nav,
|
|
863
|
+
[plugins.name]: plugins,
|
|
864
|
+
[versions.name]: versions,
|
|
865
|
+
...customTabs.get()
|
|
866
|
+
};
|
|
867
|
+
return Optional.from(getHelpTabs(editor)).fold(() => getNamesFromTabs(tabs), tabsFromSettings => parseHelpTabsSetting(tabsFromSettings, tabs));
|
|
868
|
+
};
|
|
869
|
+
const init = (editor, customTabs, pluginUrl) => () => {
|
|
870
|
+
pParseCustomTabs(editor, customTabs, pluginUrl).then(({tabs, names}) => {
|
|
871
|
+
const foundTabs = map(names, name => get(tabs, name));
|
|
872
|
+
const dialogTabs = cat(foundTabs);
|
|
873
|
+
const body = {
|
|
820
874
|
type: 'tabpanel',
|
|
821
875
|
tabs: dialogTabs
|
|
822
876
|
};
|
|
823
877
|
editor.windowManager.open({
|
|
824
878
|
title: 'Help',
|
|
825
879
|
size: 'medium',
|
|
826
|
-
body
|
|
880
|
+
body,
|
|
827
881
|
buttons: [{
|
|
828
882
|
type: 'cancel',
|
|
829
883
|
name: 'close',
|
|
@@ -832,21 +886,23 @@
|
|
|
832
886
|
}],
|
|
833
887
|
initialData: {}
|
|
834
888
|
});
|
|
835
|
-
};
|
|
889
|
+
});
|
|
836
890
|
};
|
|
837
891
|
|
|
838
|
-
|
|
839
|
-
global$
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
892
|
+
var Plugin = () => {
|
|
893
|
+
global$4.add('help', (editor, pluginUrl) => {
|
|
894
|
+
const customTabs = Cell({});
|
|
895
|
+
const api = get$1(customTabs);
|
|
896
|
+
register$1(editor);
|
|
897
|
+
const dialogOpener = init(editor, customTabs, pluginUrl);
|
|
843
898
|
register(editor, dialogOpener);
|
|
844
|
-
register$
|
|
899
|
+
register$2(editor, dialogOpener);
|
|
845
900
|
editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
|
|
901
|
+
initI18nLoad(editor, pluginUrl);
|
|
846
902
|
return api;
|
|
847
903
|
});
|
|
848
|
-
}
|
|
904
|
+
};
|
|
849
905
|
|
|
850
906
|
Plugin();
|
|
851
907
|
|
|
852
|
-
}()
|
|
908
|
+
})();
|