@sapui5/sap.ui.richtexteditor 1.112.2 → 1.114.0
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/package.json +1 -1
- package/src/sap/ui/richtexteditor/.library +2 -2
- package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
- package/src/sap/ui/richtexteditor/RichTextEditor.js +5 -1
- package/src/sap/ui/richtexteditor/ToolbarWrapper.js +7 -8
- package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.js +4 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ar.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/bg_BG.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ca.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cs.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cy.js +0 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/da.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/de.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/dv.js +0 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/el.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es_MX.js +1 -7
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/et.js +0 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/eu.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fa.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fi.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fr_FR.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/he_IL.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hi.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hr.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hu_HU.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/id.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/it.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ja.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/kk.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ko_KR.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/lt.js +1 -7
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/lv.js +0 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ms.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nb_NO.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nl.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pl.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_BR.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_PT.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ro.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ru.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sk.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sl_SI.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sr.js +0 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sv_SE.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/th_TH.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/tr.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/uk.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/vi.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_CN.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_TW.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.js +14 -10
- package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/CHANGELOG.md +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.css +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ar.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/bg_BG.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ca.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/cs.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/da.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/de.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/el.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/es.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/eu.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fa.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fi.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fr_FR.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/he_IL.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hi.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hr.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hu_HU.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/id.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/it.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ja.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/kk.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ko_KR.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ms.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/nb_NO.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/nl.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pl.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pt_BR.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pt_PT.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ro.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ru.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sk.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sl_SI.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sv_SE.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/th_TH.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/tr.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/uk.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/vi.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/zh_CN.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/zh_TW.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/readme.txt +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/version.txt +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.js +16 -9
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.js +7 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.js +131 -107
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.js +3 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.js +11 -10
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.js +17 -7
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.js +23 -10
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.js +10 -4
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.js +11 -5
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.js +107 -24
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.js +50 -37
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.js +8 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.js +2 -3
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.js +68 -45
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.js +120 -74
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.js +39 -24
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/CHANGELOG.md +13 -5
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/js/wordimport.js +2850 -1729
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/readme.txt +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/version.txt +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.js +21 -13
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.js +13 -13
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.js +42 -37
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.js +7 -4
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.min.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.js +9 -6
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.js +6 -5
- package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/readme.txt +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.css +155 -46
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.css +149 -40
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.css +164 -46
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.css +31 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.css +157 -39
- package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.js +6039 -3529
- package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.d.ts +406 -185
- package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.js +3915 -3078
- package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.min.js +2 -2
- package/src/sap/ui/richtexteditor/js/tiny_mce6/version.txt +1 -1
- package/src/sap/ui/richtexteditor/library.js +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
|
|
5
5
|
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
|
|
6
6
|
*
|
|
7
|
-
* Version: 6.1
|
|
7
|
+
* Version: 6.3.1
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function () {
|
|
@@ -26,10 +26,21 @@
|
|
|
26
26
|
|
|
27
27
|
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
28
28
|
|
|
29
|
+
let unique = 0;
|
|
30
|
+
const generate = prefix => {
|
|
31
|
+
const date = new Date();
|
|
32
|
+
const time = date.getTime();
|
|
33
|
+
const random = Math.floor(Math.random() * 1000000000);
|
|
34
|
+
unique++;
|
|
35
|
+
return prefix + '_' + random + unique + String(time);
|
|
36
|
+
};
|
|
37
|
+
|
|
29
38
|
const get$1 = customTabs => {
|
|
30
39
|
const addTab = spec => {
|
|
40
|
+
var _a;
|
|
41
|
+
const name = (_a = spec.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
|
31
42
|
const currentCustomTabs = customTabs.get();
|
|
32
|
-
currentCustomTabs[
|
|
43
|
+
currentCustomTabs[name] = spec;
|
|
33
44
|
customTabs.set(currentCustomTabs);
|
|
34
45
|
};
|
|
35
46
|
return { addTab };
|
|
@@ -61,10 +72,34 @@
|
|
|
61
72
|
});
|
|
62
73
|
};
|
|
63
74
|
|
|
75
|
+
const hasProto = (v, constructor, predicate) => {
|
|
76
|
+
var _a;
|
|
77
|
+
if (predicate(v, constructor.prototype)) {
|
|
78
|
+
return true;
|
|
79
|
+
} else {
|
|
80
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const typeOf = x => {
|
|
84
|
+
const t = typeof x;
|
|
85
|
+
if (x === null) {
|
|
86
|
+
return 'null';
|
|
87
|
+
} else if (t === 'object' && Array.isArray(x)) {
|
|
88
|
+
return 'array';
|
|
89
|
+
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
90
|
+
return 'string';
|
|
91
|
+
} else {
|
|
92
|
+
return t;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const isType = type => value => typeOf(value) === type;
|
|
96
|
+
const isSimpleType = type => value => typeof value === type;
|
|
64
97
|
const eq = t => a => t === a;
|
|
98
|
+
const isString = isType('string');
|
|
65
99
|
const isUndefined = eq(undefined);
|
|
66
100
|
const isNullable = a => a === null || a === undefined;
|
|
67
101
|
const isNonNullable = a => !isNullable(a);
|
|
102
|
+
const isFunction = isSimpleType('function');
|
|
68
103
|
|
|
69
104
|
const constant = value => {
|
|
70
105
|
return () => {
|
|
@@ -166,6 +201,7 @@
|
|
|
166
201
|
}
|
|
167
202
|
Optional.singletonNone = new Optional(false);
|
|
168
203
|
|
|
204
|
+
const nativeSlice = Array.prototype.slice;
|
|
169
205
|
const nativeIndexOf = Array.prototype.indexOf;
|
|
170
206
|
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
171
207
|
const contains = (xs, x) => rawIndexOf(xs, x) > -1;
|
|
@@ -202,6 +238,11 @@
|
|
|
202
238
|
const find = (xs, pred) => {
|
|
203
239
|
return findUntil(xs, pred, never);
|
|
204
240
|
};
|
|
241
|
+
const sort = (xs, comparator) => {
|
|
242
|
+
const copy = nativeSlice.call(xs, 0);
|
|
243
|
+
copy.sort(comparator);
|
|
244
|
+
return copy;
|
|
245
|
+
};
|
|
205
246
|
|
|
206
247
|
const keys = Object.keys;
|
|
207
248
|
const hasOwnProperty = Object.hasOwnProperty;
|
|
@@ -591,11 +632,6 @@
|
|
|
591
632
|
name: 'Advanced Tables',
|
|
592
633
|
type: 'premium'
|
|
593
634
|
},
|
|
594
|
-
{
|
|
595
|
-
key: 'autocorrect',
|
|
596
|
-
name: 'Autocorrect',
|
|
597
|
-
type: 'premium'
|
|
598
|
-
},
|
|
599
635
|
{
|
|
600
636
|
key: 'casechange',
|
|
601
637
|
name: 'Case Change',
|
|
@@ -611,6 +647,16 @@
|
|
|
611
647
|
name: 'Enhanced Image Editing',
|
|
612
648
|
type: 'premium'
|
|
613
649
|
},
|
|
650
|
+
{
|
|
651
|
+
key: 'footnotes',
|
|
652
|
+
name: 'Footnotes',
|
|
653
|
+
type: 'premium'
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
key: 'typography',
|
|
657
|
+
name: 'Advanced Typography',
|
|
658
|
+
type: 'premium'
|
|
659
|
+
},
|
|
614
660
|
{
|
|
615
661
|
key: 'mediaembed',
|
|
616
662
|
name: 'Enhanced Media Embed',
|
|
@@ -627,6 +673,11 @@
|
|
|
627
673
|
name: 'Format Painter',
|
|
628
674
|
type: 'premium'
|
|
629
675
|
},
|
|
676
|
+
{
|
|
677
|
+
key: 'inlinecss',
|
|
678
|
+
name: 'Inline CSS',
|
|
679
|
+
type: 'premium'
|
|
680
|
+
},
|
|
630
681
|
{
|
|
631
682
|
key: 'linkchecker',
|
|
632
683
|
name: 'Link Checker',
|
|
@@ -637,6 +688,11 @@
|
|
|
637
688
|
name: 'Mentions',
|
|
638
689
|
type: 'premium'
|
|
639
690
|
},
|
|
691
|
+
{
|
|
692
|
+
key: 'mergetags',
|
|
693
|
+
name: 'Merge Tags',
|
|
694
|
+
type: 'premium'
|
|
695
|
+
},
|
|
640
696
|
{
|
|
641
697
|
key: 'pageembed',
|
|
642
698
|
name: 'Page Embed',
|
|
@@ -665,6 +721,16 @@
|
|
|
665
721
|
type: 'premium',
|
|
666
722
|
slug: 'introduction-to-tiny-spellchecker'
|
|
667
723
|
},
|
|
724
|
+
{
|
|
725
|
+
key: 'autocorrect',
|
|
726
|
+
name: 'Spelling Autocorrect',
|
|
727
|
+
type: 'premium'
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
key: 'tableofcontents',
|
|
731
|
+
name: 'Table of Contents',
|
|
732
|
+
type: 'premium'
|
|
733
|
+
},
|
|
668
734
|
{
|
|
669
735
|
key: 'tinycomments',
|
|
670
736
|
name: 'Tiny Comments',
|
|
@@ -676,11 +742,6 @@
|
|
|
676
742
|
name: 'Tiny Drive',
|
|
677
743
|
type: 'premium',
|
|
678
744
|
slug: 'tinydrive-introduction'
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
key: 'tableofcontents',
|
|
682
|
-
name: 'Table of Contents',
|
|
683
|
-
type: 'premium'
|
|
684
745
|
}
|
|
685
746
|
], item => ({
|
|
686
747
|
...item,
|
|
@@ -690,24 +751,43 @@
|
|
|
690
751
|
|
|
691
752
|
const tab$1 = editor => {
|
|
692
753
|
const availablePlugins = () => {
|
|
693
|
-
const premiumPlugins = filter(urls, ({
|
|
694
|
-
return
|
|
754
|
+
const premiumPlugins = filter(urls, ({type}) => {
|
|
755
|
+
return type === 'premium';
|
|
695
756
|
});
|
|
696
|
-
const
|
|
757
|
+
const sortedPremiumPlugins = sort(map(premiumPlugins, p => p.name), (s1, s2) => s1.localeCompare(s2));
|
|
758
|
+
const premiumPluginList = map(sortedPremiumPlugins, pluginName => `<li>${ pluginName }</li>`).join('');
|
|
697
759
|
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" rel="noopener" target="_blank">' + global$1.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
|
|
698
760
|
};
|
|
699
761
|
const makeLink = p => `<a href="${ p.url }" target="_blank" rel="noopener">${ p.name }</a>`;
|
|
700
|
-
const
|
|
762
|
+
const identifyUnknownPlugin = (editor, key) => {
|
|
763
|
+
const getMetadata = editor.plugins[key].getMetadata;
|
|
764
|
+
if (isFunction(getMetadata)) {
|
|
765
|
+
const metadata = getMetadata();
|
|
766
|
+
return {
|
|
767
|
+
name: metadata.name,
|
|
768
|
+
html: makeLink(metadata)
|
|
769
|
+
};
|
|
770
|
+
} else {
|
|
771
|
+
return {
|
|
772
|
+
name: key,
|
|
773
|
+
html: key
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
const getPluginData = (editor, key) => find(urls, x => {
|
|
701
778
|
return x.key === key;
|
|
702
779
|
}).fold(() => {
|
|
703
|
-
|
|
704
|
-
return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
|
|
780
|
+
return identifyUnknownPlugin(editor, key);
|
|
705
781
|
}, x => {
|
|
706
782
|
const name = x.type === 'premium' ? `${ x.name }*` : x.name;
|
|
707
|
-
|
|
783
|
+
const html = makeLink({
|
|
708
784
|
name,
|
|
709
785
|
url: `https://www.tiny.cloud/docs/tinymce/6/${ x.slug }/`
|
|
710
786
|
});
|
|
787
|
+
return {
|
|
788
|
+
name,
|
|
789
|
+
html
|
|
790
|
+
};
|
|
711
791
|
});
|
|
712
792
|
const getPluginKeys = editor => {
|
|
713
793
|
const keys$1 = keys(editor.plugins);
|
|
@@ -716,8 +796,9 @@
|
|
|
716
796
|
};
|
|
717
797
|
const pluginLister = editor => {
|
|
718
798
|
const pluginKeys = getPluginKeys(editor);
|
|
719
|
-
const
|
|
720
|
-
|
|
799
|
+
const sortedPluginData = sort(map(pluginKeys, k => getPluginData(editor, k)), (pd1, pd2) => pd1.name.localeCompare(pd2.name));
|
|
800
|
+
const pluginLis = map(sortedPluginData, key => {
|
|
801
|
+
return '<li>' + key.html + '</li>';
|
|
721
802
|
});
|
|
722
803
|
const count = pluginLis.length;
|
|
723
804
|
const pluginsString = pluginLis.join('');
|
|
@@ -772,14 +853,16 @@
|
|
|
772
853
|
const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
|
|
773
854
|
const newTabs = {};
|
|
774
855
|
const names = map(tabsFromSettings, t => {
|
|
775
|
-
|
|
856
|
+
var _a;
|
|
857
|
+
if (isString(t)) {
|
|
776
858
|
if (has(tabs, t)) {
|
|
777
859
|
newTabs[t] = tabs[t];
|
|
778
860
|
}
|
|
779
861
|
return t;
|
|
780
862
|
} else {
|
|
781
|
-
|
|
782
|
-
|
|
863
|
+
const name = (_a = t.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
|
864
|
+
newTabs[name] = t;
|
|
865
|
+
return name;
|
|
783
866
|
}
|
|
784
867
|
});
|
|
785
868
|
return {
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
|
|
5
5
|
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
|
|
6
6
|
*
|
|
7
|
-
* Version: 6.1
|
|
7
|
+
* Version: 6.3.1
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("help_tabs"),a=t("forced_plugins"),o=(void 0,e=>undefined===e);const i=(!1,()=>false);class r{constructor(e,t){this.tag=e,this.value=t}static some(e){return new r(!0,e)}static none(){return r.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?r.some(e(this.value)):r.none()}bind(e){return this.tag?e(this.value):r.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:r.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?r.none():r.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()"}}r.singletonNone=new r(!1);const s=Array.prototype.indexOf,l=(e,t)=>{const n=e.length,a=new Array(n);for(let o=0;o<n;o++){const n=e[o];a[o]=t(n,o)}return a},c=(e,t)=>{const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];t(o,a)&&n.push(o)}return n},u=Object.keys,h=Object.hasOwnProperty,m=(e,t)=>h.call(e,t);var p=tinymce.util.Tools.resolve("tinymce.Env");const d=e=>{const t=p.os.isMacOS()||p.os.isiOS(),n=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),o=l(a,(e=>{const t=e.toLowerCase().trim();return m(n,t)?n[t]:e}));return t?o.join("").replace(/\s/,""):o.join("+")},g=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],y=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:l(g,(e=>{const t=l(e.shortcuts,d).join(" or ");return[e.action,t]}))}]});var b=tinymce.util.Tools.resolve("tinymce.util.I18n");const k=l([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"autocorrect",name:"Autocorrect",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"},{key:"tableofcontents",name:"Table of Contents",type:"premium"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),v=e=>{const t=e=>`<a href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,n=e=>{const n=(e=>{const t=u(e.plugins),n=a(e);return o(n)?t:c(t,(e=>!(((e,t)=>s.call(e,t))(n,e)>-1)))})(e),h=l(n,(n=>"<li>"+((e,n)=>{return(a=k,o=e=>e.key===n,((e,t,n)=>{for(let a=0,o=e.length;a<o;a++){const o=e[a];if(t(o,a))return r.some(o);if(n(o,a))break}return r.none()})(a,o,i)).fold((()=>{const a=e.plugins[n].getMetadata;return"function"==typeof a?t(a()):n}),(e=>{const n="premium"===e.type?`${e.name}*`:e.name;return t({name:n,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}));var a,o})(e,n)+"</li>")),m=h.length,p=h.join("");return"<p><b>"+b.translate(["Plugins installed ({0}):",m])+"</b></p><ul>"+p+"</ul>"},h={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+n(e)+"</div>")(e),(()=>{const e=c(k,(({key:e,type:t})=>"autocorrect"!==e&&"premium"===t)),t=l(e,(e=>"<li>"+b.translate(e.name)+"</li>")).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+b.translate("Premium plugins:")+"</b></p><ul>"+t+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">'+b.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[h]}};var f=tinymce.util.Tools.resolve("tinymce.EditorManager");const w=(e,t)=>()=>{const{tabs:a,names:o}=((e,t)=>{const a=y(),o={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},i=v(e),s=(()=>{var e,t;const n='<a href="https://www.tiny.cloud/docs/tinymce/6/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">TinyMCE '+(e=f.majorVersion,t=f.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+b.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),c={[a.name]:a,[o.name]:o,[i.name]:i,[s.name]:s,...t.get()};return r.from(n(e)).fold((()=>(e=>{const t=u(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const n={},a=l(e,(e=>"string"==typeof e?(m(t,e)&&(n[e]=t[e]),e):(n[e.name]=e,e.name)));return{tabs:n,names:a}})(e,c)))})(e,t),i={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(l(o,(e=>{return m(t=a,n=e)?r.from(t[n]):r.none();var t,n})))};e.windowManager.open({title:"Help",size:"medium",body:i,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),n=(e=>({addTab:t=>{const n=e.get();n[t.name]=t,e.set(n)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const a=w(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,a),((e,t)=>{e.addCommand("mceHelp",t)})(e,a),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),n}))}();
|
|
9
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const n=e=>{const n=(new Date).getTime(),a=Math.floor(1e9*Math.random());return t++,e+"_"+a+t+String(n)},a=e=>t=>t.options.get(e),o=a("help_tabs"),i=a("forced_plugins"),r=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=a=e,(o=String).prototype.isPrototypeOf(n)||(null===(i=a.constructor)||void 0===i?void 0:i.name)===o.name)?"string":t;var n,a,o,i})(e));const s=(void 0,e=>undefined===e);const l=e=>"function"==typeof e,c=(!1,()=>false);class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.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:u.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?u.none():u.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()"}}u.singletonNone=new u(!1);const m=Array.prototype.slice,h=Array.prototype.indexOf,p=(e,t)=>{const n=e.length,a=new Array(n);for(let o=0;o<n;o++){const n=e[o];a[o]=t(n,o)}return a},d=(e,t)=>{const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];t(o,a)&&n.push(o)}return n},g=(e,t)=>{const n=m.call(e,0);return n.sort(t),n},y=Object.keys,b=Object.hasOwnProperty,k=(e,t)=>b.call(e,t);var v=tinymce.util.Tools.resolve("tinymce.Env");const f=e=>{const t=v.os.isMacOS()||v.os.isiOS(),n=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),o=p(a,(e=>{const t=e.toLowerCase().trim();return k(n,t)?n[t]:e}));return t?o.join("").replace(/\s/,""):o.join("+")},w=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],A=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:p(w,(e=>{const t=p(e.shortcuts,f).join(" or ");return[e.action,t]}))}]});var x=tinymce.util.Tools.resolve("tinymce.util.I18n");const T=p([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"typography",name:"Advanced Typography",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"inlinecss",name:"Inline CSS",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tableofcontents",name:"Table of Contents",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),C=e=>{const t=e=>`<a href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,n=(e,n)=>{return(a=T,o=e=>e.key===n,((e,t,n)=>{for(let a=0,o=e.length;a<o;a++){const o=e[a];if(t(o,a))return u.some(o);if(n(o,a))break}return u.none()})(a,o,c)).fold((()=>((e,n)=>{const a=e.plugins[n].getMetadata;if(l(a)){const e=a();return{name:e.name,html:t(e)}}return{name:n,html:n}})(e,n)),(e=>{const n="premium"===e.type?`${e.name}*`:e.name;return{name:n,html:t({name:n,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}}));var a,o},a=e=>{const t=(e=>{const t=y(e.plugins),n=i(e);return s(n)?t:d(t,(e=>!(((e,t)=>h.call(e,t))(n,e)>-1)))})(e),a=g(p(t,(t=>n(e,t))),((e,t)=>e.name.localeCompare(t.name))),o=p(a,(e=>"<li>"+e.html+"</li>")),r=o.length,l=o.join("");return"<p><b>"+x.translate(["Plugins installed ({0}):",r])+"</b></p><ul>"+l+"</ul>"},o={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+a(e)+"</div>")(e),(()=>{const e=d(T,(({type:e})=>"premium"===e)),t=g(p(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),n=p(t,(e=>`<li>${e}</li>`)).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+x.translate("Premium plugins:")+"</b></p><ul>"+n+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">'+x.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[o]}};var M=tinymce.util.Tools.resolve("tinymce.EditorManager");const S=(e,t)=>()=>{const{tabs:a,names:i}=((e,t)=>{const a=A(),i={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},s=C(e),l=(()=>{var e,t;const n='<a href="https://www.tiny.cloud/docs/tinymce/6/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">TinyMCE '+(e=M.majorVersion,t=M.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+x.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),c={[a.name]:a,[i.name]:i,[s.name]:s,[l.name]:l,...t.get()};return u.from(o(e)).fold((()=>(e=>{const t=y(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const a={},o=p(e,(e=>{var o;if(r(e))return k(t,e)&&(a[e]=t[e]),e;{const t=null!==(o=e.name)&&void 0!==o?o:n("tab-name");return a[t]=e,t}}));return{tabs:a,names:o}})(e,c)))})(e,t),s={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(p(i,(e=>{return k(t=a,n=e)?u.from(t[n]):u.none();var t,n})))};e.windowManager.open({title:"Help",size:"medium",body:s,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),a=(e=>({addTab:t=>{var a;const o=null!==(a=t.name)&&void 0!==a?a:n("tab-name"),i=e.get();i[o]=t,e.set(i)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const o=S(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,o),((e,t)=>{e.addCommand("mceHelp",t)})(e,o),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),a}))}();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
|
|
5
5
|
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
|
|
6
6
|
*
|
|
7
|
-
* Version: 6.1
|
|
7
|
+
* Version: 6.3.1
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function () {
|
|
@@ -169,11 +169,9 @@
|
|
|
169
169
|
r[i] = x;
|
|
170
170
|
};
|
|
171
171
|
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
|
172
|
-
const r = {};
|
|
173
172
|
each(obj, (x, i) => {
|
|
174
173
|
(pred(x, i) ? onTrue : onFalse)(x, i);
|
|
175
174
|
});
|
|
176
|
-
return r;
|
|
177
175
|
};
|
|
178
176
|
const filter = (obj, pred) => {
|
|
179
177
|
const t = {};
|
|
@@ -438,7 +436,8 @@
|
|
|
438
436
|
resolve(reader.result);
|
|
439
437
|
};
|
|
440
438
|
reader.onerror = () => {
|
|
441
|
-
|
|
439
|
+
var _a;
|
|
440
|
+
reject((_a = reader.error) === null || _a === void 0 ? void 0 : _a.message);
|
|
442
441
|
};
|
|
443
442
|
reader.readAsDataURL(blob);
|
|
444
443
|
});
|
|
@@ -475,16 +474,16 @@
|
|
|
475
474
|
}
|
|
476
475
|
};
|
|
477
476
|
const getAttrib = (image, name) => {
|
|
477
|
+
var _a;
|
|
478
478
|
if (image.hasAttribute(name)) {
|
|
479
|
-
return image.getAttribute(name);
|
|
479
|
+
return (_a = image.getAttribute(name)) !== null && _a !== void 0 ? _a : '';
|
|
480
480
|
} else {
|
|
481
481
|
return '';
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
|
-
const getStyle = (image, name) => image.style[name] ? image.style[name] : '';
|
|
485
484
|
const hasCaption = image => image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
|
486
485
|
const updateAttrib = (image, name, value) => {
|
|
487
|
-
if (value === '') {
|
|
486
|
+
if (value === '' || value === null) {
|
|
488
487
|
image.removeAttribute(name);
|
|
489
488
|
} else {
|
|
490
489
|
image.setAttribute(name, value);
|
|
@@ -499,8 +498,10 @@
|
|
|
499
498
|
};
|
|
500
499
|
const removeFigure = image => {
|
|
501
500
|
const figureElm = image.parentNode;
|
|
502
|
-
|
|
503
|
-
|
|
501
|
+
if (isNonNullable(figureElm)) {
|
|
502
|
+
DOM.insertAfter(image, figureElm);
|
|
503
|
+
DOM.remove(figureElm);
|
|
504
|
+
}
|
|
504
505
|
};
|
|
505
506
|
const toggleCaption = image => {
|
|
506
507
|
if (hasCaption(image)) {
|
|
@@ -520,8 +521,9 @@
|
|
|
520
521
|
}
|
|
521
522
|
};
|
|
522
523
|
const setSize = (name, normalizeCss) => (image, name, value) => {
|
|
523
|
-
|
|
524
|
-
|
|
524
|
+
const styles = image.style;
|
|
525
|
+
if (styles[name]) {
|
|
526
|
+
styles[name] = addPixelSuffix(value);
|
|
525
527
|
normalizeStyle(image, normalizeCss);
|
|
526
528
|
} else {
|
|
527
529
|
updateAttrib(image, name, value);
|
|
@@ -551,8 +553,11 @@
|
|
|
551
553
|
const setBorderStyle = (image, value) => {
|
|
552
554
|
image.style.borderStyle = value;
|
|
553
555
|
};
|
|
554
|
-
const getBorderStyle = image =>
|
|
555
|
-
|
|
556
|
+
const getBorderStyle = image => {
|
|
557
|
+
var _a;
|
|
558
|
+
return (_a = image.style.borderStyle) !== null && _a !== void 0 ? _a : '';
|
|
559
|
+
};
|
|
560
|
+
const isFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE';
|
|
556
561
|
const isImage = elm => elm.nodeName === 'IMG';
|
|
557
562
|
const getIsDecorative = image => DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation';
|
|
558
563
|
const getAlt = image => {
|
|
@@ -578,6 +583,7 @@
|
|
|
578
583
|
isDecorative: false
|
|
579
584
|
});
|
|
580
585
|
const getStyleValue = (normalizeCss, data) => {
|
|
586
|
+
var _a;
|
|
581
587
|
const image = document.createElement('img');
|
|
582
588
|
updateAttrib(image, 'style', data.style);
|
|
583
589
|
if (getHspace(image) || data.hspace !== '') {
|
|
@@ -592,7 +598,7 @@
|
|
|
592
598
|
if (getBorderStyle(image) || data.borderStyle !== '') {
|
|
593
599
|
setBorderStyle(image, data.borderStyle);
|
|
594
600
|
}
|
|
595
|
-
return normalizeCss(image.getAttribute('style'));
|
|
601
|
+
return normalizeCss((_a = image.getAttribute('style')) !== null && _a !== void 0 ? _a : '');
|
|
596
602
|
};
|
|
597
603
|
const create = (normalizeCss, data) => {
|
|
598
604
|
const image = document.createElement('img');
|
|
@@ -623,12 +629,12 @@
|
|
|
623
629
|
hspace: getHspace(image),
|
|
624
630
|
vspace: getVspace(image),
|
|
625
631
|
border: getBorder(image),
|
|
626
|
-
borderStyle:
|
|
632
|
+
borderStyle: getBorderStyle(image),
|
|
627
633
|
isDecorative: getIsDecorative(image)
|
|
628
634
|
});
|
|
629
635
|
const updateProp = (image, oldData, newData, name, set) => {
|
|
630
636
|
if (newData[name] !== oldData[name]) {
|
|
631
|
-
set(image, name, newData[name]);
|
|
637
|
+
set(image, name, String(newData[name]));
|
|
632
638
|
}
|
|
633
639
|
};
|
|
634
640
|
const setAlt = (image, alt, isDecorative) => {
|
|
@@ -692,11 +698,12 @@
|
|
|
692
698
|
return imgElm;
|
|
693
699
|
};
|
|
694
700
|
const splitTextBlock = (editor, figure) => {
|
|
701
|
+
var _a;
|
|
695
702
|
const dom = editor.dom;
|
|
696
703
|
const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure'));
|
|
697
704
|
const textBlock = dom.getParent(figure.parentNode, node => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody());
|
|
698
705
|
if (textBlock) {
|
|
699
|
-
return dom.split(textBlock, figure);
|
|
706
|
+
return (_a = dom.split(textBlock, figure)) !== null && _a !== void 0 ? _a : figure;
|
|
700
707
|
} else {
|
|
701
708
|
return figure;
|
|
702
709
|
}
|
|
@@ -736,15 +743,17 @@
|
|
|
736
743
|
};
|
|
737
744
|
const writeImageDataToSelection = (editor, data) => {
|
|
738
745
|
const image = getSelectedImage(editor);
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
746
|
+
if (image) {
|
|
747
|
+
write(css => normalizeCss$1(editor, css), data, image);
|
|
748
|
+
syncSrcAttr(editor, image);
|
|
749
|
+
if (isFigure(image.parentNode)) {
|
|
750
|
+
const figure = image.parentNode;
|
|
751
|
+
splitTextBlock(editor, figure);
|
|
752
|
+
editor.selection.select(image.parentNode);
|
|
753
|
+
} else {
|
|
754
|
+
editor.selection.select(image);
|
|
755
|
+
waitLoadImage(editor, data, image);
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
};
|
|
750
759
|
const sanitizeImageData = (editor, data) => {
|
|
@@ -940,7 +949,7 @@
|
|
|
940
949
|
const AdvTab = { makeTab: makeTab$2 };
|
|
941
950
|
|
|
942
951
|
const collect = editor => {
|
|
943
|
-
const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url, 'src'));
|
|
952
|
+
const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url || '', 'src'));
|
|
944
953
|
const futureImageList = new Promise(completer => {
|
|
945
954
|
createImageList(editor, imageList => {
|
|
946
955
|
completer(urlListSanitizer(imageList).map(items => flatten([
|
|
@@ -1107,7 +1116,7 @@
|
|
|
1107
1116
|
});
|
|
1108
1117
|
const toImageData = (data, removeEmptyAlt) => ({
|
|
1109
1118
|
src: data.src.value,
|
|
1110
|
-
alt: data.alt.length === 0 && removeEmptyAlt ? null : data.alt,
|
|
1119
|
+
alt: (data.alt === null || data.alt.length === 0) && removeEmptyAlt ? null : data.alt,
|
|
1111
1120
|
title: data.title,
|
|
1112
1121
|
width: data.dimensions.width,
|
|
1113
1122
|
height: data.dimensions.height,
|
|
@@ -1351,13 +1360,16 @@
|
|
|
1351
1360
|
}));
|
|
1352
1361
|
}
|
|
1353
1362
|
};
|
|
1354
|
-
const createBlobCache = editor => (file, blobUri, dataUrl) =>
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1363
|
+
const createBlobCache = editor => (file, blobUri, dataUrl) => {
|
|
1364
|
+
var _a;
|
|
1365
|
+
return editor.editorUpload.blobCache.create({
|
|
1366
|
+
blob: file,
|
|
1367
|
+
blobUri,
|
|
1368
|
+
name: (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(/\.[^\.]+$/, ''),
|
|
1369
|
+
filename: file.name,
|
|
1370
|
+
base64: dataUrl.split(',')[1]
|
|
1371
|
+
});
|
|
1372
|
+
};
|
|
1361
1373
|
const addToBlobCache = editor => blobInfo => {
|
|
1362
1374
|
editor.editorUpload.blobCache.add(blobInfo);
|
|
1363
1375
|
};
|
|
@@ -1368,10 +1380,11 @@
|
|
|
1368
1380
|
const parseStyle = editor => cssText => editor.dom.parseStyle(cssText);
|
|
1369
1381
|
const serializeStyle = editor => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name);
|
|
1370
1382
|
const uploadImage = editor => blobInfo => global$1(editor).upload([blobInfo], false).then(results => {
|
|
1383
|
+
var _a;
|
|
1371
1384
|
if (results.length === 0) {
|
|
1372
1385
|
return Promise.reject('Failed to upload image');
|
|
1373
1386
|
} else if (results[0].status === false) {
|
|
1374
|
-
return Promise.reject(results[0].error.message);
|
|
1387
|
+
return Promise.reject((_a = results[0].error) === null || _a === void 0 ? void 0 : _a.message);
|
|
1375
1388
|
} else {
|
|
1376
1389
|
return results[0];
|
|
1377
1390
|
}
|
|
@@ -1426,7 +1439,7 @@
|
|
|
1426
1439
|
|
|
1427
1440
|
const hasImageClass = node => {
|
|
1428
1441
|
const className = node.attr('class');
|
|
1429
|
-
return className && /\bimage\b/.test(className);
|
|
1442
|
+
return isNonNullable(className) && /\bimage\b/.test(className);
|
|
1430
1443
|
};
|
|
1431
1444
|
const toggleContentEditableState = state => nodes => {
|
|
1432
1445
|
let i = nodes.length;
|