@dangl/angular-material-shared 2.5.1-beta0012 → 2.6.0-beta0019
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 +2 -2
- package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +16 -19
- package/fesm2022/dangl-angular-material-shared.mjs +16 -19
- package/fesm2022/dangl-angular-material-shared.mjs.map +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,175 +1,161 @@
|
|
|
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
8
|
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
var
|
|
10
|
+
const hasProto = (v, constructor, predicate) => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (predicate(v, constructor.prototype)) {
|
|
13
|
+
return true;
|
|
14
|
+
} else {
|
|
15
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const typeOf = x => {
|
|
19
|
+
const t = typeof x;
|
|
16
20
|
if (x === null) {
|
|
17
21
|
return 'null';
|
|
18
|
-
} else if (t === 'object' &&
|
|
22
|
+
} else if (t === 'object' && Array.isArray(x)) {
|
|
19
23
|
return 'array';
|
|
20
|
-
} else if (t === 'object' && (String
|
|
24
|
+
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
21
25
|
return 'string';
|
|
22
26
|
} else {
|
|
23
27
|
return t;
|
|
24
28
|
}
|
|
25
29
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
var isString = isType$1('string');
|
|
37
|
-
var isBoolean = isSimpleType('boolean');
|
|
38
|
-
var isNullable = function (a) {
|
|
39
|
-
return a === null || a === undefined;
|
|
40
|
-
};
|
|
41
|
-
var isNonNullable = function (a) {
|
|
42
|
-
return !isNullable(a);
|
|
43
|
-
};
|
|
44
|
-
var isFunction = isSimpleType('function');
|
|
45
|
-
var isNumber = isSimpleType('number');
|
|
30
|
+
const isType$1 = type => value => typeOf(value) === type;
|
|
31
|
+
const isSimpleType = type => value => typeof value === type;
|
|
32
|
+
const isString = isType$1('string');
|
|
33
|
+
const isBoolean = isSimpleType('boolean');
|
|
34
|
+
const isNullable = a => a === null || a === undefined;
|
|
35
|
+
const isNonNullable = a => !isNullable(a);
|
|
36
|
+
const isFunction = isSimpleType('function');
|
|
37
|
+
const isNumber = isSimpleType('number');
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return function (a) {
|
|
51
|
-
return fbc(fab(a));
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
var constant = function (value) {
|
|
55
|
-
return function () {
|
|
39
|
+
const compose1 = (fbc, fab) => a => fbc(fab(a));
|
|
40
|
+
const constant = value => {
|
|
41
|
+
return () => {
|
|
56
42
|
return value;
|
|
57
43
|
};
|
|
58
44
|
};
|
|
59
|
-
|
|
60
|
-
return x;
|
|
61
|
-
};
|
|
62
|
-
var never = constant(false);
|
|
63
|
-
var always = constant(true);
|
|
45
|
+
const never = constant(false);
|
|
64
46
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
getOrDie: function (msg) {
|
|
82
|
-
throw new Error(msg || 'error: getOrDie called on none.');
|
|
83
|
-
},
|
|
84
|
-
getOrNull: constant(null),
|
|
85
|
-
getOrUndefined: constant(undefined),
|
|
86
|
-
or: id,
|
|
87
|
-
orThunk: call,
|
|
88
|
-
map: none,
|
|
89
|
-
each: noop,
|
|
90
|
-
bind: none,
|
|
91
|
-
exists: never,
|
|
92
|
-
forall: always,
|
|
93
|
-
filter: function () {
|
|
94
|
-
return none();
|
|
95
|
-
},
|
|
96
|
-
toArray: function () {
|
|
97
|
-
return [];
|
|
98
|
-
},
|
|
99
|
-
toString: constant('none()')
|
|
100
|
-
};
|
|
101
|
-
return me;
|
|
102
|
-
}();
|
|
103
|
-
var some = function (a) {
|
|
104
|
-
var constant_a = constant(a);
|
|
105
|
-
var self = function () {
|
|
106
|
-
return me;
|
|
107
|
-
};
|
|
108
|
-
var bind = function (f) {
|
|
109
|
-
return f(a);
|
|
110
|
-
};
|
|
111
|
-
var me = {
|
|
112
|
-
fold: function (n, s) {
|
|
113
|
-
return s(a);
|
|
114
|
-
},
|
|
115
|
-
isSome: always,
|
|
116
|
-
isNone: never,
|
|
117
|
-
getOr: constant_a,
|
|
118
|
-
getOrThunk: constant_a,
|
|
119
|
-
getOrDie: constant_a,
|
|
120
|
-
getOrNull: constant_a,
|
|
121
|
-
getOrUndefined: constant_a,
|
|
122
|
-
or: self,
|
|
123
|
-
orThunk: self,
|
|
124
|
-
map: function (f) {
|
|
125
|
-
return some(f(a));
|
|
126
|
-
},
|
|
127
|
-
each: function (f) {
|
|
128
|
-
f(a);
|
|
129
|
-
},
|
|
130
|
-
bind: bind,
|
|
131
|
-
exists: bind,
|
|
132
|
-
forall: bind,
|
|
133
|
-
filter: function (f) {
|
|
134
|
-
return f(a) ? me : NONE;
|
|
135
|
-
},
|
|
136
|
-
toArray: function () {
|
|
137
|
-
return [a];
|
|
138
|
-
},
|
|
139
|
-
toString: function () {
|
|
140
|
-
return 'some(' + a + ')';
|
|
47
|
+
class Optional {
|
|
48
|
+
constructor(tag, value) {
|
|
49
|
+
this.tag = tag;
|
|
50
|
+
this.value = value;
|
|
51
|
+
}
|
|
52
|
+
static some(value) {
|
|
53
|
+
return new Optional(true, value);
|
|
54
|
+
}
|
|
55
|
+
static none() {
|
|
56
|
+
return Optional.singletonNone;
|
|
57
|
+
}
|
|
58
|
+
fold(onNone, onSome) {
|
|
59
|
+
if (this.tag) {
|
|
60
|
+
return onSome(this.value);
|
|
61
|
+
} else {
|
|
62
|
+
return onNone();
|
|
141
63
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
64
|
+
}
|
|
65
|
+
isSome() {
|
|
66
|
+
return this.tag;
|
|
67
|
+
}
|
|
68
|
+
isNone() {
|
|
69
|
+
return !this.tag;
|
|
70
|
+
}
|
|
71
|
+
map(mapper) {
|
|
72
|
+
if (this.tag) {
|
|
73
|
+
return Optional.some(mapper(this.value));
|
|
74
|
+
} else {
|
|
75
|
+
return Optional.none();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
bind(binder) {
|
|
79
|
+
if (this.tag) {
|
|
80
|
+
return binder(this.value);
|
|
81
|
+
} else {
|
|
82
|
+
return Optional.none();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exists(predicate) {
|
|
86
|
+
return this.tag && predicate(this.value);
|
|
87
|
+
}
|
|
88
|
+
forall(predicate) {
|
|
89
|
+
return !this.tag || predicate(this.value);
|
|
90
|
+
}
|
|
91
|
+
filter(predicate) {
|
|
92
|
+
if (!this.tag || predicate(this.value)) {
|
|
93
|
+
return this;
|
|
94
|
+
} else {
|
|
95
|
+
return Optional.none();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
getOr(replacement) {
|
|
99
|
+
return this.tag ? this.value : replacement;
|
|
100
|
+
}
|
|
101
|
+
or(replacement) {
|
|
102
|
+
return this.tag ? this : replacement;
|
|
103
|
+
}
|
|
104
|
+
getOrThunk(thunk) {
|
|
105
|
+
return this.tag ? this.value : thunk();
|
|
106
|
+
}
|
|
107
|
+
orThunk(thunk) {
|
|
108
|
+
return this.tag ? this : thunk();
|
|
109
|
+
}
|
|
110
|
+
getOrDie(message) {
|
|
111
|
+
if (!this.tag) {
|
|
112
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
113
|
+
} else {
|
|
114
|
+
return this.value;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static from(value) {
|
|
118
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
119
|
+
}
|
|
120
|
+
getOrNull() {
|
|
121
|
+
return this.tag ? this.value : null;
|
|
122
|
+
}
|
|
123
|
+
getOrUndefined() {
|
|
124
|
+
return this.value;
|
|
125
|
+
}
|
|
126
|
+
each(worker) {
|
|
127
|
+
if (this.tag) {
|
|
128
|
+
worker(this.value);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
toArray() {
|
|
132
|
+
return this.tag ? [this.value] : [];
|
|
133
|
+
}
|
|
134
|
+
toString() {
|
|
135
|
+
return this.tag ? `some(${ this.value })` : 'none()';
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
Optional.singletonNone = new Optional(false);
|
|
153
139
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
for (
|
|
158
|
-
|
|
140
|
+
const map = (xs, f) => {
|
|
141
|
+
const len = xs.length;
|
|
142
|
+
const r = new Array(len);
|
|
143
|
+
for (let i = 0; i < len; i++) {
|
|
144
|
+
const x = xs[i];
|
|
159
145
|
r[i] = f(x, i);
|
|
160
146
|
}
|
|
161
147
|
return r;
|
|
162
148
|
};
|
|
163
|
-
|
|
164
|
-
for (
|
|
165
|
-
|
|
149
|
+
const each = (xs, f) => {
|
|
150
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
151
|
+
const x = xs[i];
|
|
166
152
|
f(x, i);
|
|
167
153
|
}
|
|
168
154
|
};
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
for (
|
|
172
|
-
|
|
155
|
+
const filter = (xs, pred) => {
|
|
156
|
+
const r = [];
|
|
157
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
158
|
+
const x = xs[i];
|
|
173
159
|
if (pred(x, i)) {
|
|
174
160
|
r.push(x);
|
|
175
161
|
}
|
|
@@ -177,54 +163,53 @@
|
|
|
177
163
|
return r;
|
|
178
164
|
};
|
|
179
165
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
const DOCUMENT = 9;
|
|
167
|
+
const DOCUMENT_FRAGMENT = 11;
|
|
168
|
+
const ELEMENT = 1;
|
|
169
|
+
const TEXT = 3;
|
|
184
170
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
171
|
+
const fromHtml = (html, scope) => {
|
|
172
|
+
const doc = scope || document;
|
|
173
|
+
const div = doc.createElement('div');
|
|
188
174
|
div.innerHTML = html;
|
|
189
175
|
if (!div.hasChildNodes() || div.childNodes.length > 1) {
|
|
190
|
-
|
|
191
|
-
|
|
176
|
+
const message = 'HTML does not have a single root node';
|
|
177
|
+
console.error(message, html);
|
|
178
|
+
throw new Error(message);
|
|
192
179
|
}
|
|
193
180
|
return fromDom(div.childNodes[0]);
|
|
194
181
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
182
|
+
const fromTag = (tag, scope) => {
|
|
183
|
+
const doc = scope || document;
|
|
184
|
+
const node = doc.createElement(tag);
|
|
198
185
|
return fromDom(node);
|
|
199
186
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
187
|
+
const fromText = (text, scope) => {
|
|
188
|
+
const doc = scope || document;
|
|
189
|
+
const node = doc.createTextNode(text);
|
|
203
190
|
return fromDom(node);
|
|
204
191
|
};
|
|
205
|
-
|
|
192
|
+
const fromDom = node => {
|
|
206
193
|
if (node === null || node === undefined) {
|
|
207
194
|
throw new Error('Node cannot be null or undefined');
|
|
208
195
|
}
|
|
209
196
|
return { dom: node };
|
|
210
197
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
fromDom: fromDom,
|
|
219
|
-
fromPoint: fromPoint
|
|
198
|
+
const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
|
|
199
|
+
const SugarElement = {
|
|
200
|
+
fromHtml,
|
|
201
|
+
fromTag,
|
|
202
|
+
fromText,
|
|
203
|
+
fromDom,
|
|
204
|
+
fromPoint
|
|
220
205
|
};
|
|
221
206
|
|
|
222
|
-
|
|
223
|
-
|
|
207
|
+
const is = (element, selector) => {
|
|
208
|
+
const dom = element.dom;
|
|
224
209
|
if (dom.nodeType !== ELEMENT) {
|
|
225
210
|
return false;
|
|
226
211
|
} else {
|
|
227
|
-
|
|
212
|
+
const elem = dom;
|
|
228
213
|
if (elem.matches !== undefined) {
|
|
229
214
|
return elem.matches(selector);
|
|
230
215
|
} else if (elem.msMatchesSelector !== undefined) {
|
|
@@ -241,42 +226,24 @@
|
|
|
241
226
|
|
|
242
227
|
typeof window !== 'undefined' ? window : Function('return this;')();
|
|
243
228
|
|
|
244
|
-
|
|
245
|
-
|
|
229
|
+
const name = element => {
|
|
230
|
+
const r = element.dom.nodeName;
|
|
246
231
|
return r.toLowerCase();
|
|
247
232
|
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
};
|
|
256
|
-
var isElement = isType(ELEMENT);
|
|
257
|
-
var isText = isType(TEXT);
|
|
258
|
-
var isDocument = isType(DOCUMENT);
|
|
259
|
-
var isDocumentFragment = isType(DOCUMENT_FRAGMENT);
|
|
260
|
-
var isTag = function (tag) {
|
|
261
|
-
return function (e) {
|
|
262
|
-
return isElement(e) && name(e) === tag;
|
|
263
|
-
};
|
|
264
|
-
};
|
|
233
|
+
const type = element => element.dom.nodeType;
|
|
234
|
+
const isType = t => element => type(element) === t;
|
|
235
|
+
const isElement = isType(ELEMENT);
|
|
236
|
+
const isText = isType(TEXT);
|
|
237
|
+
const isDocument = isType(DOCUMENT);
|
|
238
|
+
const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
|
|
239
|
+
const isTag = tag => e => isElement(e) && name(e) === tag;
|
|
265
240
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return isDocument(dos) ? dos : owner(dos);
|
|
271
|
-
};
|
|
272
|
-
var parent = function (element) {
|
|
273
|
-
return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
|
274
|
-
};
|
|
275
|
-
var children$2 = function (element) {
|
|
276
|
-
return map(element.dom.childNodes, SugarElement.fromDom);
|
|
277
|
-
};
|
|
241
|
+
const owner = element => SugarElement.fromDom(element.dom.ownerDocument);
|
|
242
|
+
const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);
|
|
243
|
+
const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
|
244
|
+
const children$2 = element => map(element.dom.childNodes, SugarElement.fromDom);
|
|
278
245
|
|
|
279
|
-
|
|
246
|
+
const rawSet = (dom, key, value) => {
|
|
280
247
|
if (isString(value) || isBoolean(value) || isNumber(value)) {
|
|
281
248
|
dom.setAttribute(key, value + '');
|
|
282
249
|
} else {
|
|
@@ -284,45 +251,37 @@
|
|
|
284
251
|
throw new Error('Attribute value was not simple');
|
|
285
252
|
}
|
|
286
253
|
};
|
|
287
|
-
|
|
254
|
+
const set = (element, key, value) => {
|
|
288
255
|
rawSet(element.dom, key, value);
|
|
289
256
|
};
|
|
290
|
-
|
|
257
|
+
const remove = (element, key) => {
|
|
291
258
|
element.dom.removeAttribute(key);
|
|
292
259
|
};
|
|
293
260
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return SugarElement.fromDom(e.dom.getRootNode());
|
|
300
|
-
} : documentOrOwner;
|
|
301
|
-
var getShadowRoot = function (e) {
|
|
302
|
-
var r = getRootNode(e);
|
|
261
|
+
const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
|
|
262
|
+
const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
|
|
263
|
+
const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;
|
|
264
|
+
const getShadowRoot = e => {
|
|
265
|
+
const r = getRootNode(e);
|
|
303
266
|
return isShadowRoot(r) ? Optional.some(r) : Optional.none();
|
|
304
267
|
};
|
|
305
|
-
|
|
306
|
-
return SugarElement.fromDom(e.dom.host);
|
|
307
|
-
};
|
|
268
|
+
const getShadowHost = e => SugarElement.fromDom(e.dom.host);
|
|
308
269
|
|
|
309
|
-
|
|
310
|
-
|
|
270
|
+
const inBody = element => {
|
|
271
|
+
const dom = isText(element) ? element.dom.parentNode : element.dom;
|
|
311
272
|
if (dom === undefined || dom === null || dom.ownerDocument === null) {
|
|
312
273
|
return false;
|
|
313
274
|
}
|
|
314
|
-
|
|
315
|
-
return getShadowRoot(SugarElement.fromDom(dom)).fold(
|
|
316
|
-
return doc.body.contains(dom);
|
|
317
|
-
}, compose1(inBody, getShadowHost));
|
|
275
|
+
const doc = dom.ownerDocument;
|
|
276
|
+
return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));
|
|
318
277
|
};
|
|
319
278
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
279
|
+
const ancestor$1 = (scope, predicate, isRoot) => {
|
|
280
|
+
let element = scope.dom;
|
|
281
|
+
const stop = isFunction(isRoot) ? isRoot : never;
|
|
323
282
|
while (element.parentNode) {
|
|
324
283
|
element = element.parentNode;
|
|
325
|
-
|
|
284
|
+
const el = SugarElement.fromDom(element);
|
|
326
285
|
if (predicate(el)) {
|
|
327
286
|
return Optional.some(el);
|
|
328
287
|
} else if (stop(el)) {
|
|
@@ -332,122 +291,105 @@
|
|
|
332
291
|
return Optional.none();
|
|
333
292
|
};
|
|
334
293
|
|
|
335
|
-
|
|
336
|
-
return ancestor$1(scope, function (e) {
|
|
337
|
-
return is(e, selector);
|
|
338
|
-
}, isRoot);
|
|
339
|
-
};
|
|
294
|
+
const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is(e, selector), isRoot);
|
|
340
295
|
|
|
341
|
-
|
|
342
|
-
return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
343
|
-
};
|
|
296
|
+
const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
344
297
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
298
|
+
const get = (element, property) => {
|
|
299
|
+
const dom = element.dom;
|
|
300
|
+
const styles = window.getComputedStyle(dom);
|
|
301
|
+
const r = styles.getPropertyValue(property);
|
|
349
302
|
return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
|
|
350
303
|
};
|
|
351
|
-
|
|
352
|
-
return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
|
|
353
|
-
};
|
|
304
|
+
const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';
|
|
354
305
|
|
|
355
|
-
|
|
356
|
-
return get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
|
|
357
|
-
};
|
|
306
|
+
const getDirection = element => get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
|
|
358
307
|
|
|
359
|
-
|
|
360
|
-
return filter(children$2(scope), predicate);
|
|
361
|
-
};
|
|
308
|
+
const children$1 = (scope, predicate) => filter(children$2(scope), predicate);
|
|
362
309
|
|
|
363
|
-
|
|
364
|
-
return children$1(scope, function (e) {
|
|
365
|
-
return is(e, selector);
|
|
366
|
-
});
|
|
367
|
-
};
|
|
310
|
+
const children = (scope, selector) => children$1(scope, e => is(e, selector));
|
|
368
311
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
var getNormalizedBlock = function (element, isListItem) {
|
|
373
|
-
var normalizedElement = isListItem ? ancestor(element, 'ol,ul') : Optional.some(element);
|
|
312
|
+
const getParentElement = element => parent(element).filter(isElement);
|
|
313
|
+
const getNormalizedBlock = (element, isListItem) => {
|
|
314
|
+
const normalizedElement = isListItem ? ancestor(element, 'ol,ul') : Optional.some(element);
|
|
374
315
|
return normalizedElement.getOr(element);
|
|
375
316
|
};
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
317
|
+
const isListItem = isTag('li');
|
|
318
|
+
const setDirOnElements = (dom, blocks, dir) => {
|
|
319
|
+
each(blocks, block => {
|
|
320
|
+
const blockElement = SugarElement.fromDom(block);
|
|
321
|
+
const isBlockElementListItem = isListItem(blockElement);
|
|
322
|
+
const normalizedBlock = getNormalizedBlock(blockElement, isBlockElementListItem);
|
|
323
|
+
const normalizedBlockParent = getParentElement(normalizedBlock);
|
|
324
|
+
normalizedBlockParent.each(parent => {
|
|
325
|
+
dom.setStyle(normalizedBlock.dom, 'direction', null);
|
|
326
|
+
const parentDirection = getDirection(parent);
|
|
327
|
+
if (parentDirection === dir) {
|
|
328
|
+
remove(normalizedBlock, 'dir');
|
|
329
|
+
} else {
|
|
330
|
+
set(normalizedBlock, 'dir', dir);
|
|
331
|
+
}
|
|
332
|
+
if (getDirection(normalizedBlock) !== dir) {
|
|
333
|
+
dom.setStyle(normalizedBlock.dom, 'direction', dir);
|
|
334
|
+
}
|
|
335
|
+
if (isBlockElementListItem) {
|
|
336
|
+
const listItems = children(normalizedBlock, 'li[dir],li[style]');
|
|
337
|
+
each(listItems, listItem => {
|
|
338
|
+
remove(listItem, 'dir');
|
|
339
|
+
dom.setStyle(listItem.dom, 'direction', null);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
399
342
|
});
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
const setDir = (editor, dir) => {
|
|
346
|
+
if (editor.selection.isEditable()) {
|
|
347
|
+
setDirOnElements(editor.dom, editor.selection.getSelectedBlocks(), dir);
|
|
400
348
|
editor.nodeChanged();
|
|
401
349
|
}
|
|
402
350
|
};
|
|
403
351
|
|
|
404
|
-
|
|
405
|
-
editor.addCommand('mceDirectionLTR',
|
|
352
|
+
const register$1 = editor => {
|
|
353
|
+
editor.addCommand('mceDirectionLTR', () => {
|
|
406
354
|
setDir(editor, 'ltr');
|
|
407
355
|
});
|
|
408
|
-
editor.addCommand('mceDirectionRTL',
|
|
356
|
+
editor.addCommand('mceDirectionRTL', () => {
|
|
409
357
|
setDir(editor, 'rtl');
|
|
410
358
|
});
|
|
411
359
|
};
|
|
412
360
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
};
|
|
419
|
-
editor.on('NodeChange', nodeChangeHandler);
|
|
420
|
-
return function () {
|
|
421
|
-
return editor.off('NodeChange', nodeChangeHandler);
|
|
422
|
-
};
|
|
361
|
+
const getNodeChangeHandler = (editor, dir) => api => {
|
|
362
|
+
const nodeChangeHandler = e => {
|
|
363
|
+
const element = SugarElement.fromDom(e.element);
|
|
364
|
+
api.setActive(getDirection(element) === dir);
|
|
365
|
+
api.setEnabled(editor.selection.isEditable());
|
|
423
366
|
};
|
|
367
|
+
editor.on('NodeChange', nodeChangeHandler);
|
|
368
|
+
api.setEnabled(editor.selection.isEditable());
|
|
369
|
+
return () => editor.off('NodeChange', nodeChangeHandler);
|
|
424
370
|
};
|
|
425
|
-
|
|
371
|
+
const register = editor => {
|
|
426
372
|
editor.ui.registry.addToggleButton('ltr', {
|
|
427
373
|
tooltip: 'Left to right',
|
|
428
374
|
icon: 'ltr',
|
|
429
|
-
onAction:
|
|
430
|
-
return editor.execCommand('mceDirectionLTR');
|
|
431
|
-
},
|
|
375
|
+
onAction: () => editor.execCommand('mceDirectionLTR'),
|
|
432
376
|
onSetup: getNodeChangeHandler(editor, 'ltr')
|
|
433
377
|
});
|
|
434
378
|
editor.ui.registry.addToggleButton('rtl', {
|
|
435
379
|
tooltip: 'Right to left',
|
|
436
380
|
icon: 'rtl',
|
|
437
|
-
onAction:
|
|
438
|
-
return editor.execCommand('mceDirectionRTL');
|
|
439
|
-
},
|
|
381
|
+
onAction: () => editor.execCommand('mceDirectionRTL'),
|
|
440
382
|
onSetup: getNodeChangeHandler(editor, 'rtl')
|
|
441
383
|
});
|
|
442
384
|
};
|
|
443
385
|
|
|
444
|
-
|
|
445
|
-
global.add('directionality',
|
|
386
|
+
var Plugin = () => {
|
|
387
|
+
global.add('directionality', editor => {
|
|
446
388
|
register$1(editor);
|
|
447
389
|
register(editor);
|
|
448
390
|
});
|
|
449
|
-
}
|
|
391
|
+
};
|
|
450
392
|
|
|
451
393
|
Plugin();
|
|
452
394
|
|
|
453
|
-
}()
|
|
395
|
+
})();
|