jodit 4.2.25 → 4.2.32
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/.nvmrc +1 -1
- package/CHANGELOG.md +119 -5
- package/es2015/jodit.css +14 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +422 -284
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +25 -18
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.css +14 -2
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +416 -278
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +25 -18
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +14 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +416 -278
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +25 -18
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +14 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +391 -272
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +25 -18
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/164.fat.min.js +10 -0
- package/es5/164.js +4939 -0
- package/es5/164.min.js +10 -0
- package/es5/5.fat.min.js +10 -0
- package/es5/5.js +76 -0
- package/es5/5.min.js +10 -0
- package/es5/jodit.css +21 -6
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +817 -5709
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +26 -19
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/esm/config.js +3 -7
- package/esm/core/async/async.js +2 -1
- package/esm/core/constants.d.ts +2 -0
- package/esm/core/constants.js +12 -8
- package/esm/core/decorators/watch/watch.js +0 -1
- package/esm/core/dom/dom.d.ts +2 -1
- package/esm/core/dom/dom.js +12 -6
- package/esm/core/event-emitter/event-emitter.js +3 -3
- package/esm/core/global.js +16 -3
- package/esm/core/helpers/array/to-array.d.ts +1 -6
- package/esm/core/helpers/array/to-array.js +1 -1
- package/esm/core/helpers/async/set-timeout.d.ts +0 -3
- package/esm/core/helpers/async/set-timeout.js +3 -2
- package/esm/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
- package/esm/core/helpers/checker/has-browser-color-picker.js +2 -1
- package/esm/core/helpers/checker/is-url.d.ts +0 -3
- package/esm/core/helpers/checker/is-url.js +2 -1
- package/esm/core/helpers/html/apply-styles.js +3 -3
- package/esm/core/helpers/html/clean-from-word.js +2 -1
- package/esm/core/helpers/html/htmlspecialchars.d.ts +0 -3
- package/esm/core/helpers/html/htmlspecialchars.js +2 -1
- package/esm/core/helpers/normalize/normalize-key-aliases.js +2 -1
- package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
- package/esm/core/helpers/size/get-scroll-parent.js +3 -2
- package/esm/core/helpers/utils/complete-url.js +2 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +2 -1
- package/esm/core/helpers/utils/default-language.js +3 -2
- package/esm/core/helpers/utils/reset.js +3 -3
- package/esm/core/request/ajax.js +2 -1
- package/esm/core/selection/selection.js +1 -0
- package/esm/core/selection/style/api/has-same-style.js +15 -10
- package/esm/core/selection/style/api/toggle-attributes.js +2 -1
- package/esm/core/selection/style/commit-style.d.ts +1 -1
- package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
- package/esm/core/ui/button/tooltip/tooltip.js +11 -5
- package/esm/core/ui/form/inputs/file/file.d.ts +1 -0
- package/esm/core/ui/form/inputs/file/file.js +1 -0
- package/esm/core/ui/form/validators/input.d.ts +3 -3
- package/esm/core/ui/form/validators/select.d.ts +1 -1
- package/esm/jodit.js +3 -0
- package/esm/modules/file-browser/config.js +9 -1
- package/esm/modules/file-browser/data-provider.js +0 -1
- package/esm/modules/file-browser/file-browser.js +0 -1
- package/esm/modules/table/table.d.ts +2 -3
- package/esm/modules/table/table.js +27 -35
- package/esm/modules/toolbar/button/button.d.ts +1 -1
- package/esm/plugins/add-new-line/add-new-line.js +4 -1
- package/esm/plugins/backspace/cases/check-remove-char.js +1 -0
- package/esm/plugins/clean-html/config.d.ts +3 -3
- package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +9 -1
- package/esm/plugins/hotkeys/hotkeys.js +4 -2
- package/esm/plugins/iframe/config.d.ts +15 -3
- package/esm/plugins/iframe/config.js +1 -0
- package/esm/plugins/iframe/iframe.js +3 -0
- package/esm/plugins/indent/helpers.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/a.d.ts +2 -2
- package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
- package/esm/plugins/search/config.js +2 -2
- package/esm/plugins/search/helpers/highlight-text-ranges.js +3 -1
- package/esm/plugins/select-cells/select-cells.js +1 -1
- package/esm/plugins/source/editor/engines/ace.d.ts +0 -1
- package/esm/plugins/speech-recognize/config.js +1 -1
- package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
- package/esm/plugins/speech-recognize/helpers/api.js +5 -2
- package/esm/plugins/speech-recognize/helpers/sound.js +6 -4
- package/esm/plugins/stat/config.d.ts +1 -0
- package/esm/plugins/stat/config.js +1 -0
- package/esm/plugins/stat/stat.js +14 -3
- package/esm/plugins/symbols/langs/index.d.ts +2 -1
- package/esm/plugins/symbols/langs/index.js +2 -1
- package/esm/plugins/symbols/langs/ua.d.ts +1 -0
- package/esm/plugins/symbols/langs/ua.js +9 -0
- package/esm/plugins/table/config.js +19 -3
- package/esm/polyfills.d.ts +10 -0
- package/esm/polyfills.js +54 -0
- package/esm/tsconfig.json +1 -1
- package/package.json +1 -1
- package/types/core/constants.d.ts +2 -0
- package/types/core/dom/dom.d.ts +2 -1
- package/types/core/helpers/array/to-array.d.ts +1 -6
- package/types/core/helpers/async/set-timeout.d.ts +0 -3
- package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
- package/types/core/helpers/checker/is-url.d.ts +0 -3
- package/types/core/helpers/html/htmlspecialchars.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
- package/types/core/selection/style/commit-style.d.ts +1 -1
- package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
- package/types/core/ui/form/inputs/file/file.d.ts +1 -0
- package/types/core/ui/form/validators/input.d.ts +3 -3
- package/types/core/ui/form/validators/select.d.ts +1 -1
- package/types/modules/table/table.d.ts +2 -3
- package/types/modules/toolbar/button/button.d.ts +1 -1
- package/types/plugins/clean-html/config.d.ts +3 -3
- package/types/plugins/iframe/config.d.ts +15 -3
- package/types/plugins/indent/helpers.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/a.d.ts +2 -2
- package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
- package/types/plugins/source/editor/engines/ace.d.ts +0 -1
- package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
- package/types/plugins/stat/config.d.ts +1 -0
- package/types/plugins/symbols/langs/index.d.ts +2 -1
- package/types/plugins/symbols/langs/ua.d.ts +1 -0
- package/types/polyfills.d.ts +10 -0
- package/types/tsconfig.json +1 -1
package/es2021.en/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.2.
|
|
4
|
+
* Version: v4.2.32
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -247,16 +247,12 @@ class Config {
|
|
|
247
247
|
showPlaceholder: false
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
this.ownerDocument =
|
|
251
|
-
? document
|
|
252
|
-
: null);
|
|
250
|
+
this.ownerDocument = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
|
|
253
251
|
/**
|
|
254
252
|
* Allows you to specify the window in which the editor will be created. Default - window
|
|
255
253
|
* This is necessary if you are creating the editor inside an iframe but the code is running in the parent window
|
|
256
254
|
*/
|
|
257
|
-
this.ownerWindow =
|
|
258
|
-
? window
|
|
259
|
-
: null);
|
|
255
|
+
this.ownerWindow = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow;
|
|
260
256
|
/**
|
|
261
257
|
* Shadow root if Jodit was created in it
|
|
262
258
|
*
|
|
@@ -1030,16 +1026,16 @@ Config.prototype.controls = {};
|
|
|
1030
1026
|
/* harmony export */ j: function() { return /* binding */ Async; }
|
|
1031
1027
|
/* harmony export */ });
|
|
1032
1028
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
1033
|
-
/* harmony import */ var
|
|
1029
|
+
/* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89044);
|
|
1034
1030
|
/* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(99951);
|
|
1035
1031
|
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(69052);
|
|
1036
|
-
/* harmony import */ var
|
|
1032
|
+
/* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2461);
|
|
1037
1033
|
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25376);
|
|
1038
1034
|
/* harmony import */ var jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92039);
|
|
1039
1035
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98253);
|
|
1040
|
-
/* harmony import */ var
|
|
1041
|
-
/* harmony import */ var
|
|
1042
|
-
/* harmony import */ var
|
|
1036
|
+
/* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
|
|
1037
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
1038
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
1043
1039
|
/* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21567);
|
|
1044
1040
|
/*!
|
|
1045
1041
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
@@ -1090,17 +1086,18 @@ class Async {
|
|
|
1090
1086
|
return 0;
|
|
1091
1087
|
}
|
|
1092
1088
|
let options = {};
|
|
1093
|
-
if ((0,
|
|
1089
|
+
if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(timeout)) {
|
|
1094
1090
|
timeout = 0;
|
|
1095
1091
|
}
|
|
1096
|
-
if (!(0,
|
|
1092
|
+
if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__/* .isNumber */ .E)(timeout)) {
|
|
1097
1093
|
options = timeout;
|
|
1098
1094
|
timeout = options.timeout || 0;
|
|
1099
1095
|
}
|
|
1100
1096
|
if (options.label) {
|
|
1101
1097
|
this.clearLabel(options.label);
|
|
1102
1098
|
}
|
|
1103
|
-
const timer = (0,
|
|
1099
|
+
const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .setTimeout */ .w)(callback, timeout, ...args);
|
|
1100
|
+
const key = options.label || timer;
|
|
1104
1101
|
this.timers.set(key, timer);
|
|
1105
1102
|
this.__callbacks.set(key, callback);
|
|
1106
1103
|
return timer;
|
|
@@ -1116,7 +1113,7 @@ class Async {
|
|
|
1116
1113
|
}
|
|
1117
1114
|
clearLabel(label) {
|
|
1118
1115
|
if (label && this.timers.has(label)) {
|
|
1119
|
-
(0,
|
|
1116
|
+
(0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(label));
|
|
1120
1117
|
this.timers.delete(label);
|
|
1121
1118
|
this.__callbacks.delete(label);
|
|
1122
1119
|
}
|
|
@@ -1125,7 +1122,7 @@ class Async {
|
|
|
1125
1122
|
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(timerOrLabel)) {
|
|
1126
1123
|
return this.clearLabel(timerOrLabel);
|
|
1127
1124
|
}
|
|
1128
|
-
(0,
|
|
1125
|
+
(0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timerOrLabel);
|
|
1129
1126
|
this.timers.delete(timerOrLabel);
|
|
1130
1127
|
this.__callbacks.delete(timerOrLabel);
|
|
1131
1128
|
}
|
|
@@ -1167,7 +1164,7 @@ class Async {
|
|
|
1167
1164
|
if (!timer && firstCallImmediately) {
|
|
1168
1165
|
callFn(...args);
|
|
1169
1166
|
}
|
|
1170
|
-
(0,
|
|
1167
|
+
(0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timer);
|
|
1171
1168
|
timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .T)(timeout) ? timeout() : timeout);
|
|
1172
1169
|
this.timers.set(fn, timer);
|
|
1173
1170
|
}
|
|
@@ -1321,7 +1318,7 @@ class Async {
|
|
|
1321
1318
|
clear() {
|
|
1322
1319
|
this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
|
|
1323
1320
|
this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
|
|
1324
|
-
this.timers.forEach(key => (0,
|
|
1321
|
+
this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(key)));
|
|
1325
1322
|
this.timers.clear();
|
|
1326
1323
|
this.promisesRejections.forEach(reject => reject());
|
|
1327
1324
|
this.promisesRejections.clear();
|
|
@@ -1730,6 +1727,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1730
1727
|
/* harmony export */ TEXT_PLAIN: function() { return /* binding */ TEXT_PLAIN; },
|
|
1731
1728
|
/* harmony export */ TEXT_RTF: function() { return /* binding */ TEXT_RTF; },
|
|
1732
1729
|
/* harmony export */ TOKENS: function() { return /* binding */ TOKENS; },
|
|
1730
|
+
/* harmony export */ globalDocument: function() { return /* binding */ globalDocument; },
|
|
1731
|
+
/* harmony export */ globalWindow: function() { return /* binding */ globalWindow; },
|
|
1733
1732
|
/* harmony export */ lang: function() { return /* binding */ lang; }
|
|
1734
1733
|
/* harmony export */ });
|
|
1735
1734
|
/*!
|
|
@@ -1737,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1737
1736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1738
1737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1739
1738
|
*/
|
|
1740
|
-
const APP_VERSION = "4.2.
|
|
1739
|
+
const APP_VERSION = "4.2.32";
|
|
1741
1740
|
// prettier-ignore
|
|
1742
1741
|
const ES = "es2021";
|
|
1743
1742
|
const IS_ES_MODERN = true;
|
|
@@ -1756,6 +1755,10 @@ const INVISIBLE_SPACE_REG_EXP_START = () => /^[\uFEFF]+/g;
|
|
|
1756
1755
|
const SPACE_REG_EXP = () => /[\s\n\t\r\uFEFF\u200b]+/g;
|
|
1757
1756
|
const SPACE_REG_EXP_START = () => /^[\s\n\t\r\uFEFF\u200b]+/g;
|
|
1758
1757
|
const SPACE_REG_EXP_END = () => /[\s\n\t\r\uFEFF\u200b]+$/g;
|
|
1758
|
+
const globalWindow = typeof window !== 'undefined' ? window : undefined;
|
|
1759
|
+
const globalDocument = typeof document !== 'undefined'
|
|
1760
|
+
? document
|
|
1761
|
+
: undefined;
|
|
1759
1762
|
const IS_BLOCK = /^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i;
|
|
1760
1763
|
const IS_INLINE = /^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i;
|
|
1761
1764
|
const LIST_TAGS = new Set(['ul', 'ol']);
|
|
@@ -1880,8 +1883,8 @@ const INSERT_AS_TEXT = 'insert_as_text';
|
|
|
1880
1883
|
*/
|
|
1881
1884
|
const INSERT_ONLY_TEXT = 'insert_only_text';
|
|
1882
1885
|
const SAFE_COUNT_CHANGE_CALL = 10;
|
|
1883
|
-
const IS_MAC = typeof
|
|
1884
|
-
/Mac|iPod|iPhone|iPad/.test(
|
|
1886
|
+
const IS_MAC = typeof globalWindow !== 'undefined' &&
|
|
1887
|
+
/Mac|iPod|iPhone|iPad/.test(globalWindow.navigator.platform);
|
|
1885
1888
|
const KEY_ALIASES = {
|
|
1886
1889
|
add: '+',
|
|
1887
1890
|
break: 'pause',
|
|
@@ -1899,8 +1902,8 @@ const KEY_ALIASES = {
|
|
|
1899
1902
|
option: 'alt',
|
|
1900
1903
|
return: 'enter',
|
|
1901
1904
|
right: 'arrowright',
|
|
1902
|
-
space: '
|
|
1903
|
-
spacebar: '
|
|
1905
|
+
space: 'space',
|
|
1906
|
+
spacebar: 'space',
|
|
1904
1907
|
up: 'arrowup',
|
|
1905
1908
|
win: 'meta',
|
|
1906
1909
|
windows: 'meta'
|
|
@@ -1909,7 +1912,7 @@ const BASE_PATH = (() => {
|
|
|
1909
1912
|
if (typeof document === 'undefined') {
|
|
1910
1913
|
return '';
|
|
1911
1914
|
}
|
|
1912
|
-
const script =
|
|
1915
|
+
const script = globalDocument.currentScript, removeScriptName = (s) => {
|
|
1913
1916
|
const parts = s.split('/');
|
|
1914
1917
|
if (/\.js/.test(parts[parts.length - 1])) {
|
|
1915
1918
|
return parts.slice(0, parts.length - 1).join('/') + '/';
|
|
@@ -1919,11 +1922,11 @@ const BASE_PATH = (() => {
|
|
|
1919
1922
|
if (script) {
|
|
1920
1923
|
return removeScriptName(script.src);
|
|
1921
1924
|
}
|
|
1922
|
-
const scripts =
|
|
1925
|
+
const scripts = globalDocument.querySelectorAll('script[src]');
|
|
1923
1926
|
if (scripts && scripts.length) {
|
|
1924
1927
|
return removeScriptName(scripts[scripts.length - 1].src);
|
|
1925
1928
|
}
|
|
1926
|
-
return
|
|
1929
|
+
return globalWindow.location.href;
|
|
1927
1930
|
})();
|
|
1928
1931
|
const TEMP_ATTR = 'data-jodit-temp';
|
|
1929
1932
|
const lang = {};
|
|
@@ -2667,7 +2670,6 @@ function watch(observeFields, opts) {
|
|
|
2667
2670
|
const [objectPath, eventName] = field.split(':');
|
|
2668
2671
|
let ctx = context;
|
|
2669
2672
|
if (objectPath.length) {
|
|
2670
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2671
2673
|
ctx = component.get(objectPath);
|
|
2672
2674
|
}
|
|
2673
2675
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(ctx)) {
|
|
@@ -2858,11 +2860,17 @@ class Dom {
|
|
|
2858
2860
|
}
|
|
2859
2861
|
static replace(elm, newTagName, create, withAttributes = false, notMoveContent = false) {
|
|
2860
2862
|
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isHTML */ .AH)(newTagName)) {
|
|
2863
|
+
void 0;
|
|
2861
2864
|
newTagName = create.fromHTML(newTagName);
|
|
2862
2865
|
}
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
+
let tag;
|
|
2867
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)) {
|
|
2868
|
+
void 0;
|
|
2869
|
+
tag = create.element(newTagName);
|
|
2870
|
+
}
|
|
2871
|
+
else {
|
|
2872
|
+
tag = newTagName;
|
|
2873
|
+
}
|
|
2866
2874
|
if (!notMoveContent) {
|
|
2867
2875
|
while (elm.firstChild) {
|
|
2868
2876
|
tag.appendChild(elm.firstChild);
|
|
@@ -3322,7 +3330,7 @@ class Dom {
|
|
|
3322
3330
|
* Move all content to another element
|
|
3323
3331
|
*/
|
|
3324
3332
|
static moveContent(from, to, inStart = false, filter = () => true) {
|
|
3325
|
-
const fragment = (from.ownerDocument ||
|
|
3333
|
+
const fragment = (from.ownerDocument || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument).createDocumentFragment();
|
|
3326
3334
|
(0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(from.childNodes)
|
|
3327
3335
|
.filter(elm => {
|
|
3328
3336
|
if (filter(elm)) {
|
|
@@ -3779,7 +3787,7 @@ class EventEmitter {
|
|
|
3779
3787
|
passive: true,
|
|
3780
3788
|
capture: options?.capture ?? false
|
|
3781
3789
|
}
|
|
3782
|
-
: options?.capture ?? false;
|
|
3790
|
+
: (options?.capture ?? false);
|
|
3783
3791
|
syntheticCallback.options = eOpts;
|
|
3784
3792
|
subject.addEventListener(event, syntheticCallback, eOpts);
|
|
3785
3793
|
this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
|
|
@@ -4010,7 +4018,7 @@ class EventEmitter {
|
|
|
4010
4018
|
this.__domEventsMap = new Map();
|
|
4011
4019
|
this.__mutedEvents = new Set();
|
|
4012
4020
|
this.__key = '__JoditEventEmitterNamespaces';
|
|
4013
|
-
this.__doc =
|
|
4021
|
+
this.__doc = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
|
|
4014
4022
|
this.__prepareEvent = (e) => {
|
|
4015
4023
|
if (e.cancelBubble) {
|
|
4016
4024
|
return;
|
|
@@ -4503,9 +4511,20 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
|
|
|
4503
4511
|
const data = boxes.get(jodit) || {}, key = name + tag;
|
|
4504
4512
|
const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
|
|
4505
4513
|
if (!data[key]) {
|
|
4506
|
-
let c = view.c
|
|
4507
|
-
|
|
4508
|
-
|
|
4514
|
+
let c = view.c;
|
|
4515
|
+
let body;
|
|
4516
|
+
if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot) {
|
|
4517
|
+
body = jodit.o.shadowRoot;
|
|
4518
|
+
}
|
|
4519
|
+
else {
|
|
4520
|
+
body = jodit.od.body;
|
|
4521
|
+
if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit)) {
|
|
4522
|
+
const dialog = _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.closest(jodit.container, 'dialog', jodit.od.body);
|
|
4523
|
+
if (dialog) {
|
|
4524
|
+
body = dialog;
|
|
4525
|
+
}
|
|
4526
|
+
}
|
|
4527
|
+
}
|
|
4509
4528
|
if (createInsideEditor &&
|
|
4510
4529
|
(0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) &&
|
|
4511
4530
|
jodit.od !== jodit.ed) {
|
|
@@ -4523,6 +4542,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
|
|
|
4523
4542
|
body.appendChild(box);
|
|
4524
4543
|
data[key] = box;
|
|
4525
4544
|
jodit.hookStatus('beforeDestruct', () => {
|
|
4545
|
+
view.events.off(box);
|
|
4526
4546
|
_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(box);
|
|
4527
4547
|
delete data[key];
|
|
4528
4548
|
if (Object.keys(data).length) {
|
|
@@ -4530,6 +4550,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
|
|
|
4530
4550
|
}
|
|
4531
4551
|
});
|
|
4532
4552
|
boxes.set(jodit, data);
|
|
4553
|
+
view.events.fire('getContainer', box);
|
|
4533
4554
|
}
|
|
4534
4555
|
data[key].classList.remove('jodit_theme_default', 'jodit_theme_dark');
|
|
4535
4556
|
data[key].classList.add(`jodit_theme_${view.o.theme || 'default'}`);
|
|
@@ -4657,7 +4678,7 @@ function splitArray(a) {
|
|
|
4657
4678
|
const toArray = function toArray(...args) {
|
|
4658
4679
|
const func = (0,jodit_core_helpers_checker_is_native_function__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from)
|
|
4659
4680
|
? Array.from
|
|
4660
|
-
: (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from') ?? Array.from;
|
|
4681
|
+
: ((0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from') ?? Array.from);
|
|
4661
4682
|
return func.apply(Array, args);
|
|
4662
4683
|
};
|
|
4663
4684
|
|
|
@@ -4694,6 +4715,7 @@ const toArray = function toArray(...args) {
|
|
|
4694
4715
|
/* harmony export */ D: function() { return /* binding */ clearTimeout; },
|
|
4695
4716
|
/* harmony export */ w: function() { return /* binding */ setTimeout; }
|
|
4696
4717
|
/* harmony export */ });
|
|
4718
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
4697
4719
|
/*!
|
|
4698
4720
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
4699
4721
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -4702,6 +4724,7 @@ const toArray = function toArray(...args) {
|
|
|
4702
4724
|
/**
|
|
4703
4725
|
* @module helpers/async
|
|
4704
4726
|
*/
|
|
4727
|
+
|
|
4705
4728
|
/**
|
|
4706
4729
|
* Create async callback if set timeout value - else call function immediately
|
|
4707
4730
|
*/
|
|
@@ -4710,7 +4733,7 @@ function setTimeout(callback, timeout, ...args) {
|
|
|
4710
4733
|
callback.call(null, ...args);
|
|
4711
4734
|
}
|
|
4712
4735
|
else {
|
|
4713
|
-
return
|
|
4736
|
+
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.setTimeout(callback, timeout, ...args);
|
|
4714
4737
|
}
|
|
4715
4738
|
return 0;
|
|
4716
4739
|
}
|
|
@@ -4718,7 +4741,7 @@ function setTimeout(callback, timeout, ...args) {
|
|
|
4718
4741
|
* Clear timeout
|
|
4719
4742
|
*/
|
|
4720
4743
|
function clearTimeout(timer) {
|
|
4721
|
-
|
|
4744
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.clearTimeout(timer);
|
|
4722
4745
|
}
|
|
4723
4746
|
|
|
4724
4747
|
|
|
@@ -4731,6 +4754,7 @@ function clearTimeout(timer) {
|
|
|
4731
4754
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4732
4755
|
/* harmony export */ k: function() { return /* binding */ hasBrowserColorPicker; }
|
|
4733
4756
|
/* harmony export */ });
|
|
4757
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
4734
4758
|
/*!
|
|
4735
4759
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
4736
4760
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -4739,13 +4763,14 @@ function clearTimeout(timer) {
|
|
|
4739
4763
|
/**
|
|
4740
4764
|
* @module helpers/checker
|
|
4741
4765
|
*/
|
|
4766
|
+
|
|
4742
4767
|
/**
|
|
4743
4768
|
* Check if browser has a color picker (a new HTML5 attribute for input tag)
|
|
4744
4769
|
*/
|
|
4745
4770
|
function hasBrowserColorPicker() {
|
|
4746
4771
|
let supportsColor = true;
|
|
4747
4772
|
try {
|
|
4748
|
-
const a =
|
|
4773
|
+
const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('input');
|
|
4749
4774
|
a.type = 'color';
|
|
4750
4775
|
a.value = '!';
|
|
4751
4776
|
supportsColor = a.type === 'color' && a.value !== '!';
|
|
@@ -5395,6 +5420,7 @@ function isStringArray(value) {
|
|
|
5395
5420
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5396
5421
|
/* harmony export */ m: function() { return /* binding */ isURL; }
|
|
5397
5422
|
/* harmony export */ });
|
|
5423
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
5398
5424
|
/*!
|
|
5399
5425
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5400
5426
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5403,6 +5429,7 @@ function isStringArray(value) {
|
|
|
5403
5429
|
/**
|
|
5404
5430
|
* @module helpers/checker
|
|
5405
5431
|
*/
|
|
5432
|
+
|
|
5406
5433
|
/**
|
|
5407
5434
|
* Check if a string is an url
|
|
5408
5435
|
*/
|
|
@@ -5419,7 +5446,7 @@ function isURL(str) {
|
|
|
5419
5446
|
return false;
|
|
5420
5447
|
}
|
|
5421
5448
|
}
|
|
5422
|
-
const a =
|
|
5449
|
+
const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
5423
5450
|
a.href = str;
|
|
5424
5451
|
return Boolean(a.hostname);
|
|
5425
5452
|
}
|
|
@@ -5654,9 +5681,9 @@ function applyStyles(html) {
|
|
|
5654
5681
|
}
|
|
5655
5682
|
html = html.substring(html.indexOf('<html '), html.length);
|
|
5656
5683
|
html = html.substring(0, html.lastIndexOf('</html>') + '</html>'.length);
|
|
5657
|
-
const iframe =
|
|
5684
|
+
const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
5658
5685
|
iframe.style.display = 'none';
|
|
5659
|
-
|
|
5686
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
|
|
5660
5687
|
let convertedString = '', collection = [];
|
|
5661
5688
|
try {
|
|
5662
5689
|
const iframeDoc = iframe.contentDocument ||
|
|
@@ -5727,9 +5754,10 @@ function applyStyles(html) {
|
|
|
5727
5754
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5728
5755
|
/* harmony export */ w: function() { return /* binding */ cleanFromWord; }
|
|
5729
5756
|
/* harmony export */ });
|
|
5730
|
-
/* harmony import */ var
|
|
5731
|
-
/* harmony import */ var
|
|
5732
|
-
/* harmony import */ var
|
|
5757
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
5758
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
5759
|
+
/* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
|
|
5760
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59101);
|
|
5733
5761
|
/*!
|
|
5734
5762
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5735
5763
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5741,6 +5769,7 @@ function applyStyles(html) {
|
|
|
5741
5769
|
|
|
5742
5770
|
|
|
5743
5771
|
|
|
5772
|
+
|
|
5744
5773
|
/**
|
|
5745
5774
|
* The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
|
|
5746
5775
|
* content that matches the look and feel of the site.
|
|
@@ -5752,11 +5781,11 @@ function cleanFromWord(html) {
|
|
|
5752
5781
|
}
|
|
5753
5782
|
let convertedString = '';
|
|
5754
5783
|
try {
|
|
5755
|
-
const div =
|
|
5784
|
+
const div = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5756
5785
|
div.innerHTML = html;
|
|
5757
5786
|
const marks = [];
|
|
5758
5787
|
if (div.firstChild) {
|
|
5759
|
-
|
|
5788
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.each(div, node => {
|
|
5760
5789
|
if (!node) {
|
|
5761
5790
|
return;
|
|
5762
5791
|
}
|
|
@@ -5771,10 +5800,10 @@ function cleanFromWord(html) {
|
|
|
5771
5800
|
case 'W:SDT':
|
|
5772
5801
|
case 'W:SDTPR':
|
|
5773
5802
|
case 'FONT':
|
|
5774
|
-
|
|
5803
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(node);
|
|
5775
5804
|
break;
|
|
5776
5805
|
default:
|
|
5777
|
-
(0,
|
|
5806
|
+
(0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__/* .toArray */ .$)(node.attributes).forEach((attr) => {
|
|
5778
5807
|
if ([
|
|
5779
5808
|
'src',
|
|
5780
5809
|
'href',
|
|
@@ -5793,14 +5822,14 @@ function cleanFromWord(html) {
|
|
|
5793
5822
|
}
|
|
5794
5823
|
});
|
|
5795
5824
|
}
|
|
5796
|
-
|
|
5825
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove.apply(null, marks);
|
|
5797
5826
|
convertedString = div.innerHTML;
|
|
5798
5827
|
}
|
|
5799
5828
|
catch (e) { }
|
|
5800
5829
|
if (convertedString) {
|
|
5801
5830
|
html = convertedString;
|
|
5802
5831
|
}
|
|
5803
|
-
html = html.split(/(\n)/).filter(
|
|
5832
|
+
html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq).join('\n');
|
|
5804
5833
|
return html
|
|
5805
5834
|
.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '')
|
|
5806
5835
|
.replace(/<!--[^>]*>/g, '');
|
|
@@ -5816,6 +5845,7 @@ function cleanFromWord(html) {
|
|
|
5816
5845
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5817
5846
|
/* harmony export */ G: function() { return /* binding */ htmlspecialchars; }
|
|
5818
5847
|
/* harmony export */ });
|
|
5848
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
5819
5849
|
/*!
|
|
5820
5850
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5821
5851
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5824,11 +5854,12 @@ function cleanFromWord(html) {
|
|
|
5824
5854
|
/**
|
|
5825
5855
|
* @module helpers/html
|
|
5826
5856
|
*/
|
|
5857
|
+
|
|
5827
5858
|
/**
|
|
5828
5859
|
* Convert special characters to HTML entities
|
|
5829
5860
|
*/
|
|
5830
5861
|
function htmlspecialchars(html) {
|
|
5831
|
-
const tmp =
|
|
5862
|
+
const tmp = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5832
5863
|
tmp.textContent = html;
|
|
5833
5864
|
return tmp.innerHTML;
|
|
5834
5865
|
}
|
|
@@ -6329,7 +6360,8 @@ function normalizeKeyAliases(keys) {
|
|
|
6329
6360
|
ctrl: 2,
|
|
6330
6361
|
control: 2,
|
|
6331
6362
|
alt: 3,
|
|
6332
|
-
shift: 4
|
|
6363
|
+
shift: 4,
|
|
6364
|
+
space: 5
|
|
6333
6365
|
};
|
|
6334
6366
|
return keys
|
|
6335
6367
|
.replace(/\+\+/g, '+add')
|
|
@@ -6548,8 +6580,9 @@ const getContentWidth = (element, win) => {
|
|
|
6548
6580
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6549
6581
|
/* harmony export */ m: function() { return /* binding */ getScrollParent; }
|
|
6550
6582
|
/* harmony export */ });
|
|
6551
|
-
/* harmony import */ var
|
|
6552
|
-
/* harmony import */ var
|
|
6583
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
6584
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
6585
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97369);
|
|
6553
6586
|
/*!
|
|
6554
6587
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6555
6588
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -6557,19 +6590,20 @@ const getContentWidth = (element, win) => {
|
|
|
6557
6590
|
*/
|
|
6558
6591
|
|
|
6559
6592
|
|
|
6593
|
+
|
|
6560
6594
|
function getScrollParent(node) {
|
|
6561
6595
|
if (!node) {
|
|
6562
6596
|
return null;
|
|
6563
6597
|
}
|
|
6564
|
-
const isElement =
|
|
6565
|
-
const overflowY = isElement && (0,
|
|
6598
|
+
const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(node);
|
|
6599
|
+
const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__.css)(node, 'overflowY');
|
|
6566
6600
|
const isScrollable = isElement && overflowY !== 'visible' && overflowY !== 'hidden';
|
|
6567
6601
|
if (isScrollable && node.scrollHeight >= node.clientHeight) {
|
|
6568
6602
|
return node;
|
|
6569
6603
|
}
|
|
6570
6604
|
return (getScrollParent(node.parentNode) ||
|
|
6571
|
-
|
|
6572
|
-
|
|
6605
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.scrollingElement ||
|
|
6606
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body);
|
|
6573
6607
|
}
|
|
6574
6608
|
|
|
6575
6609
|
|
|
@@ -7493,16 +7527,18 @@ const buildQuery = (data, prefix) => {
|
|
|
7493
7527
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7494
7528
|
/* harmony export */ X: function() { return /* binding */ completeUrl; }
|
|
7495
7529
|
/* harmony export */ });
|
|
7530
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
7496
7531
|
/*!
|
|
7497
7532
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7498
7533
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7499
7534
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
7500
7535
|
*/
|
|
7536
|
+
|
|
7501
7537
|
/**
|
|
7502
7538
|
* @module helpers/utils
|
|
7503
7539
|
*/
|
|
7504
7540
|
const completeUrl = (url) => {
|
|
7505
|
-
if (
|
|
7541
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
|
|
7506
7542
|
url = 'https:' + url;
|
|
7507
7543
|
}
|
|
7508
7544
|
return url;
|
|
@@ -7619,8 +7655,9 @@ function ConfigFlatten(obj) {
|
|
|
7619
7655
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7620
7656
|
/* harmony export */ m: function() { return /* binding */ convertMediaUrlToVideoEmbed; }
|
|
7621
7657
|
/* harmony export */ });
|
|
7622
|
-
/* harmony import */ var
|
|
7623
|
-
/* harmony import */ var
|
|
7658
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
7659
|
+
/* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
|
|
7660
|
+
/* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70807);
|
|
7624
7661
|
/*!
|
|
7625
7662
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7626
7663
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7631,14 +7668,15 @@ function ConfigFlatten(obj) {
|
|
|
7631
7668
|
*/
|
|
7632
7669
|
|
|
7633
7670
|
|
|
7671
|
+
|
|
7634
7672
|
/**
|
|
7635
7673
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7636
7674
|
*/
|
|
7637
7675
|
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7638
|
-
if (!(0,
|
|
7676
|
+
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7639
7677
|
return url;
|
|
7640
7678
|
}
|
|
7641
|
-
const parser =
|
|
7679
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7642
7680
|
parser.href = url;
|
|
7643
7681
|
if (!width) {
|
|
7644
7682
|
width = 400;
|
|
@@ -7664,7 +7702,7 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7664
7702
|
case 'youtu.be':
|
|
7665
7703
|
case 'www.youtu.be': {
|
|
7666
7704
|
const query = parser.search
|
|
7667
|
-
? (0,
|
|
7705
|
+
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7668
7706
|
: { v: parser.pathname.substr(1) };
|
|
7669
7707
|
return query.v
|
|
7670
7708
|
? '<iframe width="' +
|
|
@@ -7858,7 +7896,8 @@ const dataBind = (elm, key, value) => {
|
|
|
7858
7896
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7859
7897
|
/* harmony export */ e: function() { return /* binding */ defaultLanguage; }
|
|
7860
7898
|
/* harmony export */ });
|
|
7861
|
-
/* harmony import */ var
|
|
7899
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
7900
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98253);
|
|
7862
7901
|
/*!
|
|
7863
7902
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7864
7903
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7868,15 +7907,16 @@ const dataBind = (elm, key, value) => {
|
|
|
7868
7907
|
* @module helpers/utils
|
|
7869
7908
|
*/
|
|
7870
7909
|
|
|
7910
|
+
|
|
7871
7911
|
/**
|
|
7872
7912
|
* Try define user language
|
|
7873
7913
|
*/
|
|
7874
7914
|
const defaultLanguage = (language, defaultLanguage = 'en') => {
|
|
7875
|
-
if (language !== 'auto' && (0,
|
|
7915
|
+
if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .K)(language)) {
|
|
7876
7916
|
return language;
|
|
7877
7917
|
}
|
|
7878
|
-
if (
|
|
7879
|
-
return
|
|
7918
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement && jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang) {
|
|
7919
|
+
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang;
|
|
7880
7920
|
}
|
|
7881
7921
|
if (navigator.language) {
|
|
7882
7922
|
return navigator.language.substring(0, 2);
|
|
@@ -8627,10 +8667,10 @@ const map = {};
|
|
|
8627
8667
|
*/
|
|
8628
8668
|
function reset(key) {
|
|
8629
8669
|
if (!(key in map)) {
|
|
8630
|
-
const iframe =
|
|
8670
|
+
const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
8631
8671
|
try {
|
|
8632
8672
|
iframe.src = 'about:blank';
|
|
8633
|
-
|
|
8673
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
|
|
8634
8674
|
if (!iframe.contentWindow) {
|
|
8635
8675
|
return null;
|
|
8636
8676
|
}
|
|
@@ -9557,14 +9597,15 @@ Plugin.requires = [];
|
|
|
9557
9597
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9558
9598
|
/* harmony export */ d: function() { return /* binding */ Ajax; }
|
|
9559
9599
|
/* harmony export */ });
|
|
9560
|
-
/* harmony import */ var
|
|
9600
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
9561
9601
|
/* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64890);
|
|
9562
|
-
/* harmony import */ var
|
|
9563
|
-
/* harmony import */ var
|
|
9564
|
-
/* harmony import */ var
|
|
9565
|
-
/* harmony import */ var
|
|
9566
|
-
/* harmony import */ var
|
|
9567
|
-
/* harmony import */ var
|
|
9602
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
9603
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26318);
|
|
9604
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65147);
|
|
9605
|
+
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50156);
|
|
9606
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36115);
|
|
9607
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27337);
|
|
9608
|
+
/* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91672);
|
|
9568
9609
|
/*!
|
|
9569
9610
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9570
9611
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -9578,33 +9619,34 @@ Plugin.requires = [];
|
|
|
9578
9619
|
|
|
9579
9620
|
|
|
9580
9621
|
|
|
9622
|
+
|
|
9581
9623
|
class Ajax {
|
|
9582
9624
|
className() {
|
|
9583
9625
|
return 'Ajax';
|
|
9584
9626
|
}
|
|
9585
|
-
constructor(options, defaultAjaxOptions =
|
|
9627
|
+
constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.defaultAjaxOptions) {
|
|
9586
9628
|
this.__async = new jodit_core_async__WEBPACK_IMPORTED_MODULE_0__/* .Async */ .j();
|
|
9587
9629
|
this.__isFulfilled = false;
|
|
9588
9630
|
this.__activated = false;
|
|
9589
9631
|
this.__isDestructed = false;
|
|
9590
|
-
this.options = (0,
|
|
9632
|
+
this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(options || {}, defaultAjaxOptions);
|
|
9591
9633
|
this.xhr = this.o.xhr ? this.o.xhr() : new XMLHttpRequest();
|
|
9592
9634
|
}
|
|
9593
9635
|
__buildParams(obj, prefix) {
|
|
9594
|
-
if ((0,
|
|
9636
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(obj) &&
|
|
9595
9637
|
this.options.contentType &&
|
|
9596
9638
|
this.options.contentType.includes('application/json')) {
|
|
9597
9639
|
return JSON.stringify(obj);
|
|
9598
9640
|
}
|
|
9599
|
-
if ((0,
|
|
9641
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(this.o.queryBuild)) {
|
|
9600
9642
|
return this.o.queryBuild.call(this, obj, prefix);
|
|
9601
9643
|
}
|
|
9602
|
-
if ((0,
|
|
9603
|
-
obj instanceof
|
|
9604
|
-
(typeof obj === 'object' && obj != null && (0,
|
|
9644
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(obj) ||
|
|
9645
|
+
obj instanceof jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.globalWindow.FormData ||
|
|
9646
|
+
(typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(obj.append))) {
|
|
9605
9647
|
return obj;
|
|
9606
9648
|
}
|
|
9607
|
-
return (0,
|
|
9649
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(obj);
|
|
9608
9650
|
}
|
|
9609
9651
|
get o() {
|
|
9610
9652
|
return this.options;
|
|
@@ -9627,16 +9669,16 @@ class Ajax {
|
|
|
9627
9669
|
return this.__async.promise(async (resolve, reject) => {
|
|
9628
9670
|
const onReject = () => {
|
|
9629
9671
|
this.__isFulfilled = true;
|
|
9630
|
-
reject(
|
|
9672
|
+
reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
|
|
9631
9673
|
};
|
|
9632
9674
|
const onResolve = () => {
|
|
9633
9675
|
this.__isFulfilled = true;
|
|
9634
|
-
resolve(new
|
|
9676
|
+
resolve(new _response__WEBPACK_IMPORTED_MODULE_6__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
|
|
9635
9677
|
};
|
|
9636
9678
|
xhr.onload = onResolve;
|
|
9637
9679
|
xhr.onabort = () => {
|
|
9638
9680
|
this.__isFulfilled = true;
|
|
9639
|
-
reject(
|
|
9681
|
+
reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .abort */ .h2('Abort connection'));
|
|
9640
9682
|
};
|
|
9641
9683
|
xhr.onerror = onReject;
|
|
9642
9684
|
xhr.ontimeout = onReject;
|
|
@@ -9658,7 +9700,7 @@ class Ajax {
|
|
|
9658
9700
|
}
|
|
9659
9701
|
else if (xhr.statusText) {
|
|
9660
9702
|
this.__isFulfilled = true;
|
|
9661
|
-
reject(
|
|
9703
|
+
reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI(xhr.statusText));
|
|
9662
9704
|
}
|
|
9663
9705
|
}
|
|
9664
9706
|
};
|
|
@@ -9669,7 +9711,7 @@ class Ajax {
|
|
|
9669
9711
|
xhr.setRequestHeader('Content-type', o.contentType);
|
|
9670
9712
|
}
|
|
9671
9713
|
let { headers } = o;
|
|
9672
|
-
if ((0,
|
|
9714
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(headers)) {
|
|
9673
9715
|
headers = await headers.call(this);
|
|
9674
9716
|
}
|
|
9675
9717
|
if (headers && xhr.setRequestHeader) {
|
|
@@ -9685,22 +9727,22 @@ class Ajax {
|
|
|
9685
9727
|
}
|
|
9686
9728
|
prepareRequest() {
|
|
9687
9729
|
if (!this.o.url) {
|
|
9688
|
-
throw
|
|
9730
|
+
throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3('Need URL for AJAX request');
|
|
9689
9731
|
}
|
|
9690
9732
|
let url = this.o.url;
|
|
9691
9733
|
const data = this.o.data;
|
|
9692
9734
|
const method = (this.o.method || 'get').toLowerCase();
|
|
9693
|
-
if (method === 'get' && data && (0,
|
|
9735
|
+
if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(data)) {
|
|
9694
9736
|
const qIndex = url.indexOf('?');
|
|
9695
9737
|
if (qIndex !== -1) {
|
|
9696
|
-
const urlData = (0,
|
|
9738
|
+
const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(url);
|
|
9697
9739
|
url =
|
|
9698
9740
|
url.substring(0, qIndex) +
|
|
9699
9741
|
'?' +
|
|
9700
|
-
(0,
|
|
9742
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)({ ...urlData, ...data });
|
|
9701
9743
|
}
|
|
9702
9744
|
else {
|
|
9703
|
-
url += '?' + (0,
|
|
9745
|
+
url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(this.o.data);
|
|
9704
9746
|
}
|
|
9705
9747
|
}
|
|
9706
9748
|
const request = {
|
|
@@ -9724,8 +9766,8 @@ class Ajax {
|
|
|
9724
9766
|
}
|
|
9725
9767
|
}
|
|
9726
9768
|
Ajax.log = [];
|
|
9727
|
-
(0,
|
|
9728
|
-
|
|
9769
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
9770
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay
|
|
9729
9771
|
], Ajax.prototype, "destruct", null);
|
|
9730
9772
|
|
|
9731
9773
|
|
|
@@ -10610,6 +10652,7 @@ class Selection {
|
|
|
10610
10652
|
/**
|
|
10611
10653
|
* Call callback for all selection node
|
|
10612
10654
|
*/
|
|
10655
|
+
// eslint-disable-next-line complexity
|
|
10613
10656
|
eachSelection(callback) {
|
|
10614
10657
|
const sel = this.sel;
|
|
10615
10658
|
if (!sel || !sel.rangeCount) {
|
|
@@ -11390,12 +11433,13 @@ function getSuitParent(style, node, root) {
|
|
|
11390
11433
|
/* harmony export */ Y: function() { return /* binding */ hasSameStyleKeys; },
|
|
11391
11434
|
/* harmony export */ g: function() { return /* binding */ hasSameStyle; }
|
|
11392
11435
|
/* harmony export */ });
|
|
11393
|
-
/* harmony import */ var
|
|
11394
|
-
/* harmony import */ var
|
|
11395
|
-
/* harmony import */ var
|
|
11396
|
-
/* harmony import */ var
|
|
11397
|
-
/* harmony import */ var
|
|
11398
|
-
/* harmony import */ var
|
|
11436
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
11437
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
11438
|
+
/* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35642);
|
|
11439
|
+
/* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59678);
|
|
11440
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
11441
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
11442
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38322);
|
|
11399
11443
|
/*!
|
|
11400
11444
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
11401
11445
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -11406,48 +11450,53 @@ function getSuitParent(style, node, root) {
|
|
|
11406
11450
|
|
|
11407
11451
|
|
|
11408
11452
|
|
|
11453
|
+
|
|
11409
11454
|
/**
|
|
11410
11455
|
* Element has the same styles as in the commit
|
|
11411
11456
|
* @private
|
|
11412
11457
|
*/
|
|
11413
11458
|
function hasSameStyle(elm, rules) {
|
|
11414
|
-
return Boolean(!
|
|
11415
|
-
|
|
11459
|
+
return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
|
|
11460
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
|
|
11416
11461
|
Object.keys(rules).every(property => {
|
|
11417
|
-
const value = (0,
|
|
11462
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
|
|
11418
11463
|
if (value === '' &&
|
|
11419
11464
|
(rules[property] === '' || rules[property] == null)) {
|
|
11420
11465
|
return true;
|
|
11421
11466
|
}
|
|
11422
|
-
return (!(0,
|
|
11467
|
+
return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(value) &&
|
|
11423
11468
|
value !== '' &&
|
|
11424
|
-
!(0,
|
|
11425
|
-
(0,
|
|
11469
|
+
!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(rules[property]) &&
|
|
11470
|
+
(0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__/* .normalizeCssValue */ .iy)(property, rules[property])
|
|
11426
11471
|
.toString()
|
|
11427
11472
|
.toLowerCase() === value.toString().toLowerCase());
|
|
11428
11473
|
}));
|
|
11429
11474
|
}
|
|
11430
|
-
|
|
11431
|
-
elm
|
|
11432
|
-
|
|
11433
|
-
void 0;
|
|
11434
|
-
void 0;
|
|
11475
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
|
|
11476
|
+
const elm = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
11477
|
+
elm.style.color = 'red';
|
|
11478
|
+
void 0;
|
|
11479
|
+
void 0;
|
|
11480
|
+
void 0;
|
|
11481
|
+
}
|
|
11435
11482
|
/**
|
|
11436
11483
|
* Element has the similar styles keys
|
|
11437
11484
|
*/
|
|
11438
11485
|
function hasSameStyleKeys(elm, rules) {
|
|
11439
|
-
return Boolean(!
|
|
11440
|
-
|
|
11486
|
+
return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
|
|
11487
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
|
|
11441
11488
|
Object.keys(rules).every(property => {
|
|
11442
|
-
const value = (0,
|
|
11489
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
|
|
11443
11490
|
return value !== '';
|
|
11444
11491
|
}));
|
|
11445
11492
|
}
|
|
11446
|
-
|
|
11447
|
-
elm2
|
|
11448
|
-
|
|
11449
|
-
void 0;
|
|
11450
|
-
void 0;
|
|
11493
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
|
|
11494
|
+
const elm2 = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
11495
|
+
elm2.style.color = 'red';
|
|
11496
|
+
void 0;
|
|
11497
|
+
void 0;
|
|
11498
|
+
void 0;
|
|
11499
|
+
}
|
|
11451
11500
|
|
|
11452
11501
|
|
|
11453
11502
|
/***/ }),
|
|
@@ -11828,16 +11877,17 @@ function wrapList(commitStyle, wrapper, jodit) {
|
|
|
11828
11877
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11829
11878
|
/* harmony export */ Y: function() { return /* binding */ toggleAttributes; }
|
|
11830
11879
|
/* harmony export */ });
|
|
11831
|
-
/* harmony import */ var
|
|
11832
|
-
/* harmony import */ var
|
|
11833
|
-
/* harmony import */ var
|
|
11834
|
-
/* harmony import */ var
|
|
11835
|
-
/* harmony import */ var
|
|
11836
|
-
/* harmony import */ var
|
|
11837
|
-
/* harmony import */ var
|
|
11838
|
-
/* harmony import */ var
|
|
11839
|
-
/* harmony import */ var
|
|
11840
|
-
/* harmony import */ var
|
|
11880
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
11881
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
11882
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
11883
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9823);
|
|
11884
|
+
/* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59678);
|
|
11885
|
+
/* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95350);
|
|
11886
|
+
/* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(449);
|
|
11887
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97369);
|
|
11888
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38322);
|
|
11889
|
+
/* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72197);
|
|
11890
|
+
/* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12043);
|
|
11841
11891
|
/*!
|
|
11842
11892
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
11843
11893
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -11853,6 +11903,7 @@ function wrapList(commitStyle, wrapper, jodit) {
|
|
|
11853
11903
|
|
|
11854
11904
|
|
|
11855
11905
|
|
|
11906
|
+
|
|
11856
11907
|
const tak = 'toggleAttributes';
|
|
11857
11908
|
/**
|
|
11858
11909
|
* Toggles attributes
|
|
@@ -11864,7 +11915,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
|
|
|
11864
11915
|
}
|
|
11865
11916
|
!dry && commitStyle.setApplied(elm, tak);
|
|
11866
11917
|
const { attributes } = commitStyle.options;
|
|
11867
|
-
if (attributes && (0,
|
|
11918
|
+
if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__/* .size */ .E)(attributes) > 0) {
|
|
11868
11919
|
Object.keys(attributes).forEach((key) => {
|
|
11869
11920
|
const value = attributes[key];
|
|
11870
11921
|
switch (key) {
|
|
@@ -11886,24 +11937,24 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
|
|
|
11886
11937
|
function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
|
|
11887
11938
|
void 0;
|
|
11888
11939
|
Object.keys(style).forEach((rule) => {
|
|
11889
|
-
const inlineValue = elm.style.getPropertyValue((0,
|
|
11940
|
+
const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__/* .kebabCase */ .k)(rule));
|
|
11890
11941
|
const newValue = style[rule];
|
|
11891
11942
|
if (inlineValue === '' && newValue == null) {
|
|
11892
11943
|
return;
|
|
11893
11944
|
}
|
|
11894
11945
|
if (getNativeCSSValue(jodit, elm, rule) ===
|
|
11895
|
-
(0,
|
|
11946
|
+
(0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__/* .normalizeCssValue */ .iy)(rule, newValue)) {
|
|
11896
11947
|
if (!inlineValue) {
|
|
11897
11948
|
return;
|
|
11898
11949
|
}
|
|
11899
|
-
!dry && (0,
|
|
11900
|
-
mode =
|
|
11950
|
+
!dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, null);
|
|
11951
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
|
|
11901
11952
|
mode = removeExtraStyleAttribute(commitStyle, elm, mode);
|
|
11902
11953
|
return;
|
|
11903
11954
|
}
|
|
11904
|
-
mode =
|
|
11955
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
|
|
11905
11956
|
if (!dry) {
|
|
11906
|
-
(0,
|
|
11957
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, newValue);
|
|
11907
11958
|
mode = removeExtraStyleAttribute(commitStyle, elm, mode);
|
|
11908
11959
|
}
|
|
11909
11960
|
});
|
|
@@ -11911,19 +11962,19 @@ function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
|
|
|
11911
11962
|
}
|
|
11912
11963
|
function toggleClass(jodit, value, elm, mode, dry) {
|
|
11913
11964
|
void 0;
|
|
11914
|
-
const hook = jodit.e.fire.bind(jodit.e, `${
|
|
11965
|
+
const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
|
|
11915
11966
|
if (elm.classList.contains(value.toString())) {
|
|
11916
|
-
mode =
|
|
11967
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
|
|
11917
11968
|
if (!dry) {
|
|
11918
11969
|
elm.classList.remove(value);
|
|
11919
11970
|
if (elm.classList.length === 0) {
|
|
11920
|
-
(0,
|
|
11971
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'class', null);
|
|
11921
11972
|
hook(mode, elm, 'class', null);
|
|
11922
11973
|
}
|
|
11923
11974
|
}
|
|
11924
11975
|
}
|
|
11925
11976
|
else {
|
|
11926
|
-
mode =
|
|
11977
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
|
|
11927
11978
|
if (!dry) {
|
|
11928
11979
|
elm.classList.add(value);
|
|
11929
11980
|
hook(mode, elm, 'class', value);
|
|
@@ -11933,16 +11984,16 @@ function toggleClass(jodit, value, elm, mode, dry) {
|
|
|
11933
11984
|
}
|
|
11934
11985
|
function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
11935
11986
|
void 0;
|
|
11936
|
-
const hook = jodit.e.fire.bind(jodit.e, `${
|
|
11937
|
-
if ((0,
|
|
11938
|
-
!dry && (0,
|
|
11939
|
-
mode =
|
|
11987
|
+
const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
|
|
11988
|
+
if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key) === value) {
|
|
11989
|
+
!dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, null);
|
|
11990
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
|
|
11940
11991
|
!dry && hook(mode, elm, key, value);
|
|
11941
11992
|
return mode;
|
|
11942
11993
|
}
|
|
11943
|
-
mode =
|
|
11994
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
|
|
11944
11995
|
if (!dry) {
|
|
11945
|
-
(0,
|
|
11996
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, value);
|
|
11946
11997
|
hook(mode, elm, key, value);
|
|
11947
11998
|
}
|
|
11948
11999
|
return mode;
|
|
@@ -11952,11 +12003,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11952
12003
|
* and if it is default, it removes the element itself
|
|
11953
12004
|
*/
|
|
11954
12005
|
function removeExtraStyleAttribute(commitStyle, elm, mode) {
|
|
11955
|
-
if (!(0,
|
|
11956
|
-
(0,
|
|
12006
|
+
if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style')) {
|
|
12007
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style', null);
|
|
11957
12008
|
if (elm.tagName.toLowerCase() === commitStyle.defaultTag) {
|
|
11958
|
-
|
|
11959
|
-
mode =
|
|
12009
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(elm);
|
|
12010
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNWRAP */ .OJ;
|
|
11960
12011
|
}
|
|
11961
12012
|
}
|
|
11962
12013
|
return mode;
|
|
@@ -11965,12 +12016,12 @@ function removeExtraStyleAttribute(commitStyle, elm, mode) {
|
|
|
11965
12016
|
* Creates an iframe into which elements will be inserted to test their default styles in the browser
|
|
11966
12017
|
*/
|
|
11967
12018
|
function getShadowRoot(jodit) {
|
|
11968
|
-
if ((0,
|
|
11969
|
-
return (0,
|
|
12019
|
+
if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
|
|
12020
|
+
return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
|
|
11970
12021
|
}
|
|
11971
|
-
const container = (0,
|
|
11972
|
-
const iframe =
|
|
11973
|
-
(0,
|
|
12022
|
+
const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(jodit);
|
|
12023
|
+
const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
12024
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(iframe, {
|
|
11974
12025
|
width: 0,
|
|
11975
12026
|
height: 0,
|
|
11976
12027
|
position: 'absolute',
|
|
@@ -11980,7 +12031,7 @@ function getShadowRoot(jodit) {
|
|
|
11980
12031
|
container.appendChild(iframe);
|
|
11981
12032
|
const doc = iframe.contentWindow?.document;
|
|
11982
12033
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
11983
|
-
(0,
|
|
12034
|
+
(0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
|
|
11984
12035
|
return shadowRoot;
|
|
11985
12036
|
}
|
|
11986
12037
|
/**
|
|
@@ -11991,8 +12042,8 @@ function getNativeCSSValue(jodit, elm, key) {
|
|
|
11991
12042
|
newElm.style.cssText = elm.style.cssText;
|
|
11992
12043
|
const root = getShadowRoot(jodit);
|
|
11993
12044
|
root.appendChild(newElm);
|
|
11994
|
-
const result = (0,
|
|
11995
|
-
|
|
12045
|
+
const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(newElm, key);
|
|
12046
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(newElm);
|
|
11996
12047
|
return result;
|
|
11997
12048
|
}
|
|
11998
12049
|
|
|
@@ -13380,15 +13431,21 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13380
13431
|
if (!view.o.textIcons &&
|
|
13381
13432
|
view.o.showTooltip &&
|
|
13382
13433
|
!view.o.useNativeTooltip) {
|
|
13434
|
+
this.j.e.on('getContainer', (box) => {
|
|
13435
|
+
this.__onAttach(box);
|
|
13436
|
+
});
|
|
13383
13437
|
view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, () => {
|
|
13384
|
-
|
|
13385
|
-
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13386
|
-
view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13387
|
-
capture: true
|
|
13388
|
-
});
|
|
13438
|
+
this.__onAttach(this.j.container);
|
|
13389
13439
|
});
|
|
13390
13440
|
}
|
|
13391
13441
|
}
|
|
13442
|
+
__onAttach(container) {
|
|
13443
|
+
// TODO Move it inside __show method. Now it is here because testcase failed with capturing
|
|
13444
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13445
|
+
this.j.e.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13446
|
+
capture: true
|
|
13447
|
+
});
|
|
13448
|
+
}
|
|
13392
13449
|
__addListenersOnEnter() {
|
|
13393
13450
|
if (this.__listenClose) {
|
|
13394
13451
|
return;
|
|
@@ -14014,6 +14071,7 @@ let UIFileInput = class UIFileInput extends jodit_core_ui_form_inputs_input_inpu
|
|
|
14014
14071
|
}
|
|
14015
14072
|
createContainer(options) {
|
|
14016
14073
|
this.button = new jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .UIButton */ .lD(this.j, {
|
|
14074
|
+
tooltip: options.tooltip,
|
|
14017
14075
|
icon: {
|
|
14018
14076
|
name: 'plus'
|
|
14019
14077
|
}
|
|
@@ -14450,8 +14508,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14450
14508
|
/* harmony export */ required: function() { return /* binding */ required; },
|
|
14451
14509
|
/* harmony export */ url: function() { return /* binding */ url; }
|
|
14452
14510
|
/* harmony export */ });
|
|
14453
|
-
/* harmony import */ var
|
|
14454
|
-
/* harmony import */ var
|
|
14511
|
+
/* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
|
|
14512
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59101);
|
|
14455
14513
|
/*!
|
|
14456
14514
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
14457
14515
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -14463,7 +14521,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14463
14521
|
* Input is required
|
|
14464
14522
|
*/
|
|
14465
14523
|
const required = function (input) {
|
|
14466
|
-
if (!(0,
|
|
14524
|
+
if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value).length) {
|
|
14467
14525
|
input.error = 'Please fill out this field';
|
|
14468
14526
|
return false;
|
|
14469
14527
|
}
|
|
@@ -14473,7 +14531,7 @@ const required = function (input) {
|
|
|
14473
14531
|
* Input value should be valid URL
|
|
14474
14532
|
*/
|
|
14475
14533
|
const url = function (input) {
|
|
14476
|
-
if (!(0,
|
|
14534
|
+
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value))) {
|
|
14477
14535
|
input.error = 'Please enter a web address';
|
|
14478
14536
|
return false;
|
|
14479
14537
|
}
|
|
@@ -17027,6 +17085,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17027
17085
|
}
|
|
17028
17086
|
}
|
|
17029
17087
|
catch (e) {
|
|
17088
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
|
|
17089
|
+
throw e;
|
|
17090
|
+
}
|
|
17030
17091
|
this.destruct();
|
|
17031
17092
|
throw e;
|
|
17032
17093
|
}
|
|
@@ -18998,10 +19059,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser
|
|
|
18998
19059
|
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18999
19060
|
upload: {
|
|
19000
19061
|
icon: 'plus',
|
|
19062
|
+
tooltip: 'Upload file',
|
|
19001
19063
|
isInput: true,
|
|
19002
19064
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
19003
|
-
getContent: (filebrowser) => {
|
|
19065
|
+
getContent: (filebrowser, btnInt) => {
|
|
19004
19066
|
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
19067
|
+
tooltip: btnInt.control.tooltip,
|
|
19005
19068
|
onlyImages: filebrowser.state.onlyImages
|
|
19006
19069
|
});
|
|
19007
19070
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19010,6 +19073,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19010
19073
|
},
|
|
19011
19074
|
remove: {
|
|
19012
19075
|
icon: 'bin',
|
|
19076
|
+
tooltip: 'Remove file',
|
|
19013
19077
|
isDisabled: (browser) => {
|
|
19014
19078
|
return (!browser.state.activeElements.length ||
|
|
19015
19079
|
!browser.dataProvider.canI('FileRemove'));
|
|
@@ -19019,11 +19083,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19019
19083
|
}
|
|
19020
19084
|
},
|
|
19021
19085
|
update: {
|
|
19086
|
+
tooltip: 'Update file list',
|
|
19022
19087
|
exec: (editor) => {
|
|
19023
19088
|
editor.e.fire('update.filebrowser');
|
|
19024
19089
|
}
|
|
19025
19090
|
},
|
|
19026
19091
|
select: {
|
|
19092
|
+
tooltip: 'Select file',
|
|
19027
19093
|
icon: 'check',
|
|
19028
19094
|
isDisabled: (browser) => !browser.state.activeElements.length,
|
|
19029
19095
|
exec: (editor) => {
|
|
@@ -19031,6 +19097,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19031
19097
|
}
|
|
19032
19098
|
},
|
|
19033
19099
|
edit: {
|
|
19100
|
+
tooltip: 'Edit image',
|
|
19034
19101
|
icon: 'pencil',
|
|
19035
19102
|
isDisabled: (browser) => {
|
|
19036
19103
|
const selected = browser.state.activeElements;
|
|
@@ -19044,6 +19111,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19044
19111
|
}
|
|
19045
19112
|
},
|
|
19046
19113
|
tiles: {
|
|
19114
|
+
tooltip: 'Tiles view',
|
|
19047
19115
|
icon: 'th',
|
|
19048
19116
|
isActive: (filebrowser) => filebrowser.state.view === 'tiles',
|
|
19049
19117
|
exec: (filebrowser) => {
|
|
@@ -19051,6 +19119,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19051
19119
|
}
|
|
19052
19120
|
},
|
|
19053
19121
|
list: {
|
|
19122
|
+
tooltip: 'List view',
|
|
19054
19123
|
icon: 'th-list',
|
|
19055
19124
|
isActive: (filebrowser) => filebrowser.state.view === 'list',
|
|
19056
19125
|
exec: (filebrowser) => {
|
|
@@ -19464,7 +19533,6 @@ let DataProvider = class DataProvider {
|
|
|
19464
19533
|
data: {}
|
|
19465
19534
|
};
|
|
19466
19535
|
}
|
|
19467
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19468
19536
|
const query = this.o[type];
|
|
19469
19537
|
if (query.data === undefined) {
|
|
19470
19538
|
query.data = {
|
|
@@ -19710,7 +19778,6 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19710
19778
|
get dataProvider() {
|
|
19711
19779
|
return (0,_factories__WEBPACK_IMPORTED_MODULE_16__/* .makeDataProvider */ .S)(this, this.options);
|
|
19712
19780
|
}
|
|
19713
|
-
// eslint-disable-next-line no-unused-vars
|
|
19714
19781
|
onSelect(callback) {
|
|
19715
19782
|
return () => {
|
|
19716
19783
|
if (this.state.activeElements.length) {
|
|
@@ -22223,7 +22290,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22223
22290
|
const selector = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
|
|
22224
22291
|
selector && selectors.push(selector);
|
|
22225
22292
|
});
|
|
22226
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
22227
22293
|
style.innerHTML = selectors.length
|
|
22228
22294
|
? selectors.join(',') +
|
|
22229
22295
|
`{${this.jodit.options.table.selectionCellStyle}}`
|
|
@@ -22441,46 +22507,39 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22441
22507
|
removeRow(table, rowIndex) {
|
|
22442
22508
|
return Table.__removeRow(table, rowIndex);
|
|
22443
22509
|
}
|
|
22444
|
-
|
|
22510
|
+
/**
|
|
22511
|
+
* Insert column before / after all the columns containing the selected cells
|
|
22512
|
+
*/
|
|
22513
|
+
appendColumn(table, selectedCell, insertAfter = true) {
|
|
22445
22514
|
const box = Table.__formalMatrix(table);
|
|
22446
|
-
|
|
22447
|
-
|
|
22448
|
-
|
|
22449
|
-
|
|
22450
|
-
|
|
22451
|
-
|
|
22452
|
-
|
|
22453
|
-
|
|
22454
|
-
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
else {
|
|
22461
|
-
td.parentNode && td.parentNode.appendChild(cell);
|
|
22462
|
-
}
|
|
22463
|
-
added = true;
|
|
22515
|
+
if (!insertAfter && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.isCell(selectedCell.previousElementSibling)) {
|
|
22516
|
+
return this.appendColumn(table, selectedCell.previousElementSibling, true);
|
|
22517
|
+
}
|
|
22518
|
+
const columnIndex = insertAfter
|
|
22519
|
+
? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
|
|
22520
|
+
: selectedCell.cellIndex;
|
|
22521
|
+
const newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
|
|
22522
|
+
for (let i = 0; i < box.length;) {
|
|
22523
|
+
const cells = box[i];
|
|
22524
|
+
if (cells[columnIndex] !== cells[newColumnIndex] ||
|
|
22525
|
+
columnIndex === newColumnIndex) {
|
|
22526
|
+
const cell = this.j.createInside.element('td');
|
|
22527
|
+
if (insertAfter) {
|
|
22528
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.after(cells[columnIndex], cell);
|
|
22464
22529
|
}
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
added = true;
|
|
22530
|
+
else {
|
|
22531
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(cells[columnIndex], cell);
|
|
22532
|
+
}
|
|
22533
|
+
if (cells[columnIndex].rowSpan > 1) {
|
|
22534
|
+
cell.rowSpan = cells[columnIndex].rowSpan;
|
|
22471
22535
|
}
|
|
22472
22536
|
}
|
|
22473
|
-
|
|
22474
|
-
|
|
22537
|
+
else {
|
|
22538
|
+
cells[columnIndex].colSpan += 1;
|
|
22475
22539
|
}
|
|
22540
|
+
i += cells[columnIndex].rowSpan || 1;
|
|
22476
22541
|
}
|
|
22477
22542
|
}
|
|
22478
|
-
/**
|
|
22479
|
-
* Insert column before / after all the columns containing the selected cells
|
|
22480
|
-
*/
|
|
22481
|
-
appendColumn(table, j, after) {
|
|
22482
|
-
return Table.__appendColumn(table, j, after, this.j.createInside);
|
|
22483
|
-
}
|
|
22484
22543
|
static __removeColumn(table, j) {
|
|
22485
22544
|
const box = Table.__formalMatrix(table);
|
|
22486
22545
|
let dec;
|
|
@@ -22698,7 +22757,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22698
22757
|
alreadyMerged.delete(first);
|
|
22699
22758
|
Table.__unmark(__marked);
|
|
22700
22759
|
Table.__normalizeTable(table);
|
|
22701
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(
|
|
22760
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(tr => {
|
|
22702
22761
|
if (!tr.cells.length) {
|
|
22703
22762
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(tr);
|
|
22704
22763
|
}
|
|
@@ -22707,7 +22766,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22707
22766
|
}
|
|
22708
22767
|
}
|
|
22709
22768
|
/**
|
|
22710
|
-
* It combines all
|
|
22769
|
+
* It combines all the selected cells into one. The contents of the cells will also be combined
|
|
22711
22770
|
*/
|
|
22712
22771
|
mergeSelected(table) {
|
|
22713
22772
|
return Table.__mergeSelected(table, this.j);
|
|
@@ -25049,7 +25108,9 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
|
|
|
25049
25108
|
editor.e
|
|
25050
25109
|
.off(editor.editor, '.' + ns)
|
|
25051
25110
|
.off(editor.container, '.' + ns)
|
|
25111
|
+
.off('.' + ns)
|
|
25052
25112
|
.on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
|
|
25113
|
+
.on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
|
|
25053
25114
|
.on(editor.editor, 'click' + '.' + ns, this.__hide)
|
|
25054
25115
|
.on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
|
|
25055
25116
|
.on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
|
|
@@ -25137,7 +25198,8 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
|
|
|
25137
25198
|
jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(this.__line);
|
|
25138
25199
|
this.j.e
|
|
25139
25200
|
.off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
|
|
25140
|
-
.off(this.j.container, '.' + ns)
|
|
25201
|
+
.off(this.j.container, '.' + ns)
|
|
25202
|
+
.off('.' + ns);
|
|
25141
25203
|
}
|
|
25142
25204
|
}
|
|
25143
25205
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
@@ -25973,6 +26035,7 @@ function checkNotCollapsed(jodit) {
|
|
|
25973
26035
|
* ```
|
|
25974
26036
|
* @private
|
|
25975
26037
|
*/
|
|
26038
|
+
// eslint-disable-next-line complexity
|
|
25976
26039
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
25977
26040
|
const step = backspace ? -1 : 1;
|
|
25978
26041
|
const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
@@ -27266,13 +27329,21 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
|
27266
27329
|
*/
|
|
27267
27330
|
|
|
27268
27331
|
|
|
27332
|
+
const TABLE_CONTAINER_TAGS = new Set([
|
|
27333
|
+
'table',
|
|
27334
|
+
'tbody',
|
|
27335
|
+
'thead',
|
|
27336
|
+
'tfoot',
|
|
27337
|
+
'tr'
|
|
27338
|
+
]);
|
|
27269
27339
|
/**
|
|
27270
27340
|
* @private
|
|
27271
27341
|
*/
|
|
27272
27342
|
function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
|
|
27273
27343
|
if (jodit.o.cleanHTML.fillEmptyParagraph &&
|
|
27274
27344
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(nodeElm) &&
|
|
27275
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)
|
|
27345
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) &&
|
|
27346
|
+
!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
|
|
27276
27347
|
const br = jodit.createInside.element('br');
|
|
27277
27348
|
nodeElm.appendChild(br);
|
|
27278
27349
|
return true;
|
|
@@ -30094,7 +30165,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
|
|
|
30094
30165
|
constructor() {
|
|
30095
30166
|
super(...arguments);
|
|
30096
30167
|
this.onKeyPress = (event) => {
|
|
30097
|
-
const special = this.specialKeys[event.which]
|
|
30168
|
+
const special = this.specialKeys[event.which];
|
|
30169
|
+
const character = (event.key || String.fromCharCode(event.which)).toLowerCase();
|
|
30098
30170
|
const modif = [special || character];
|
|
30099
30171
|
['alt', 'ctrl', 'shift', 'meta'].forEach(specialKey => {
|
|
30100
30172
|
if (event[specialKey + 'Key'] && special !== specialKey) {
|
|
@@ -30188,7 +30260,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
|
|
|
30188
30260
|
}
|
|
30189
30261
|
})
|
|
30190
30262
|
.on('keydown.hotkeys', (event) => {
|
|
30191
|
-
const shortcut = this.onKeyPress(event)
|
|
30263
|
+
const shortcut = this.onKeyPress(event);
|
|
30264
|
+
const stop = {
|
|
30192
30265
|
shouldStop: true
|
|
30193
30266
|
};
|
|
30194
30267
|
const resultOfFire = this.j.e.fire(shortcut + '.hotkey', event.type, stop);
|
|
@@ -30362,6 +30435,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeStyle
|
|
|
30362
30435
|
'-ms-user-select: none' +
|
|
30363
30436
|
'}';
|
|
30364
30437
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeCSSLinks = [];
|
|
30438
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox = null;
|
|
30365
30439
|
|
|
30366
30440
|
|
|
30367
30441
|
/***/ }),
|
|
@@ -30438,6 +30512,9 @@ function iframe(editor) {
|
|
|
30438
30512
|
iframe.setAttribute('allowtransparency', 'true');
|
|
30439
30513
|
iframe.setAttribute('tabindex', opt.tabIndex.toString());
|
|
30440
30514
|
iframe.setAttribute('frameborder', '0');
|
|
30515
|
+
if (opt.iframeSandbox != null) {
|
|
30516
|
+
iframe.setAttribute('sandbox', opt.iframeSandbox);
|
|
30517
|
+
}
|
|
30441
30518
|
editor.workplace.appendChild(iframe);
|
|
30442
30519
|
editor.iframe = iframe;
|
|
30443
30520
|
const result = editor.e.fire('generateDocumentStructure.iframe', null, editor);
|
|
@@ -35793,13 +35870,13 @@ function generateCriticalCSS(jodit) {
|
|
|
35793
35870
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
35794
35871
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71842);
|
|
35795
35872
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
35796
|
-
/* harmony import */ var
|
|
35797
|
-
/* harmony import */ var
|
|
35798
|
-
/* harmony import */ var
|
|
35799
|
-
/* harmony import */ var
|
|
35800
|
-
/* harmony import */ var
|
|
35801
|
-
/* harmony import */ var
|
|
35802
|
-
/* harmony import */ var
|
|
35873
|
+
/* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17527);
|
|
35874
|
+
/* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98434);
|
|
35875
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(931);
|
|
35876
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36115);
|
|
35877
|
+
/* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11131);
|
|
35878
|
+
/* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59827);
|
|
35879
|
+
/* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_8__);
|
|
35803
35880
|
/*!
|
|
35804
35881
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
35805
35882
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -35814,8 +35891,8 @@ function generateCriticalCSS(jodit) {
|
|
|
35814
35891
|
|
|
35815
35892
|
|
|
35816
35893
|
|
|
35817
|
-
|
|
35818
|
-
|
|
35894
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_8___default()));
|
|
35895
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.prototype.controls.print = {
|
|
35819
35896
|
exec: (editor) => {
|
|
35820
35897
|
const iframe = editor.create.element('iframe');
|
|
35821
35898
|
Object.assign(iframe.style, {
|
|
@@ -35826,7 +35903,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
|
|
|
35826
35903
|
height: 0,
|
|
35827
35904
|
border: 0
|
|
35828
35905
|
});
|
|
35829
|
-
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor,
|
|
35906
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T).appendChild(iframe);
|
|
35830
35907
|
const afterFinishPrint = () => {
|
|
35831
35908
|
editor.e.off(editor.ow, 'mousemove', afterFinishPrint);
|
|
35832
35909
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
|
|
@@ -35842,12 +35919,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
|
|
|
35842
35919
|
}
|
|
35843
35920
|
else {
|
|
35844
35921
|
myWindow.document.write('<!doctype html><html lang="' +
|
|
35845
|
-
(0,
|
|
35922
|
+
(0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__/* .defaultLanguage */ .e)(editor.o.language) +
|
|
35846
35923
|
'"><head><title></title></head><style>' +
|
|
35847
|
-
(0,
|
|
35924
|
+
(0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__/* .generateCriticalCSS */ .Y)(editor) +
|
|
35848
35925
|
'</style><body></body></html>');
|
|
35849
35926
|
myWindow.document.close();
|
|
35850
|
-
(0,
|
|
35927
|
+
(0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
|
|
35851
35928
|
}
|
|
35852
35929
|
const style = myWindow.document.createElement('style');
|
|
35853
35930
|
style.innerHTML = `@media print {
|
|
@@ -36923,10 +37000,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
|
|
|
36923
37000
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
36924
37001
|
|
|
36925
37002
|
"use strict";
|
|
36926
|
-
/* harmony import */ var
|
|
36927
|
-
/* harmony import */ var
|
|
36928
|
-
/* harmony import */ var
|
|
36929
|
-
/* harmony import */ var
|
|
37003
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
37004
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
|
|
37005
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
|
|
37006
|
+
/* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21917);
|
|
37007
|
+
/* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_3__);
|
|
36930
37008
|
/*!
|
|
36931
37009
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
36932
37010
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -36936,14 +37014,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
|
|
|
36936
37014
|
|
|
36937
37015
|
|
|
36938
37016
|
|
|
36939
|
-
|
|
36940
|
-
|
|
37017
|
+
|
|
37018
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.useSearch = true;
|
|
37019
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.search = {
|
|
36941
37020
|
lazyIdleTimeout: 0,
|
|
36942
|
-
|
|
36943
|
-
useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
|
|
37021
|
+
useCustomHighlightAPI: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined'
|
|
36944
37022
|
};
|
|
36945
|
-
|
|
36946
|
-
|
|
37023
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_3___default()));
|
|
37024
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find = {
|
|
36947
37025
|
tooltip: 'Find',
|
|
36948
37026
|
icon: 'search',
|
|
36949
37027
|
exec(jodit, _, { control }) {
|
|
@@ -36984,8 +37062,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
|
|
|
36984
37062
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
36985
37063
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
36986
37064
|
/* harmony export */ });
|
|
36987
|
-
/* harmony import */ var
|
|
36988
|
-
/* harmony import */ var
|
|
37065
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
37066
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
37067
|
+
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
|
|
36989
37068
|
/*!
|
|
36990
37069
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
36991
37070
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -36993,6 +37072,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
|
|
|
36993
37072
|
*/
|
|
36994
37073
|
|
|
36995
37074
|
|
|
37075
|
+
|
|
36996
37076
|
/**
|
|
36997
37077
|
* @private
|
|
36998
37078
|
*/
|
|
@@ -37011,15 +37091,15 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
|
37011
37091
|
const span = ci.element('span', {
|
|
37012
37092
|
[TMP_ATTR]: true
|
|
37013
37093
|
});
|
|
37014
|
-
|
|
37094
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.markTemporary(span);
|
|
37015
37095
|
normalizeRanges(rng, restRanges, ci);
|
|
37016
37096
|
let next = rng.startContainer;
|
|
37017
37097
|
do {
|
|
37018
37098
|
if (!next) {
|
|
37019
37099
|
break;
|
|
37020
37100
|
}
|
|
37021
|
-
if (
|
|
37022
|
-
|
|
37101
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
|
|
37102
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
|
|
37023
37103
|
}
|
|
37024
37104
|
if (next === rng.endContainer) {
|
|
37025
37105
|
break;
|
|
@@ -37038,13 +37118,13 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
|
37038
37118
|
* @private
|
|
37039
37119
|
*/
|
|
37040
37120
|
function getSelectionWrappers(root) {
|
|
37041
|
-
return (0,
|
|
37121
|
+
return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__.$$)(`[${TMP_ATTR}]`, root);
|
|
37042
37122
|
}
|
|
37043
37123
|
/**
|
|
37044
37124
|
* @private
|
|
37045
37125
|
*/
|
|
37046
37126
|
function clearSelectionWrappers(root) {
|
|
37047
|
-
getSelectionWrappers(root).forEach(span =>
|
|
37127
|
+
getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
|
|
37048
37128
|
}
|
|
37049
37129
|
/**
|
|
37050
37130
|
* @private
|
|
@@ -37056,12 +37136,13 @@ function clearSelectionWrappersFromHTML(root) {
|
|
|
37056
37136
|
* @private
|
|
37057
37137
|
*/
|
|
37058
37138
|
function isSelectionWrapper(node) {
|
|
37059
|
-
return
|
|
37139
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
|
|
37060
37140
|
}
|
|
37061
37141
|
function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
37062
37142
|
if (jodit.o.search.useCustomHighlightAPI &&
|
|
37063
37143
|
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37064
|
-
|
|
37144
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
37145
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
37065
37146
|
const ranges = [rng, ...restRanges].map(rng => {
|
|
37066
37147
|
const range = jodit.selection.createRange();
|
|
37067
37148
|
range.setStart(rng.startContainer, rng.startOffset);
|
|
@@ -37085,7 +37166,7 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
37085
37166
|
if (rng.startOffset !== 0) {
|
|
37086
37167
|
const text = ci.text(startText.substring(0, rng.startOffset));
|
|
37087
37168
|
rng.startContainer.nodeValue = startText.substring(rng.startOffset);
|
|
37088
|
-
|
|
37169
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before(rng.startContainer, text);
|
|
37089
37170
|
if (rng.startContainer === rng.endContainer) {
|
|
37090
37171
|
diff = rng.startOffset;
|
|
37091
37172
|
rng.endOffset -= diff;
|
|
@@ -37096,7 +37177,7 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
37096
37177
|
if (rng.endOffset !== endText.length) {
|
|
37097
37178
|
const text = ci.text(endText.substring(rng.endOffset));
|
|
37098
37179
|
rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
|
|
37099
|
-
|
|
37180
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(rng.endContainer, text);
|
|
37100
37181
|
for (const range of restRanges) {
|
|
37101
37182
|
if (range.startContainer === rng.endContainer) {
|
|
37102
37183
|
range.startContainer = text;
|
|
@@ -38103,7 +38184,7 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
|
|
|
38103
38184
|
break;
|
|
38104
38185
|
case 'addcolumnafter':
|
|
38105
38186
|
case 'addcolumnbefore':
|
|
38106
|
-
this.__tableModule.appendColumn(table, cell
|
|
38187
|
+
this.__tableModule.appendColumn(table, cell, command === 'addcolumnafter');
|
|
38107
38188
|
break;
|
|
38108
38189
|
case 'addrowafter':
|
|
38109
38190
|
case 'addrowbefore':
|
|
@@ -39551,6 +39632,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('spell
|
|
|
39551
39632
|
|
|
39552
39633
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showCharsCounter = true;
|
|
39553
39634
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countHTMLChars = false;
|
|
39635
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countTextSpaces = false;
|
|
39554
39636
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showWordsCounter = true;
|
|
39555
39637
|
|
|
39556
39638
|
|
|
@@ -39597,9 +39679,20 @@ class stat extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plug
|
|
|
39597
39679
|
this.calc = this.j.async.throttle(() => {
|
|
39598
39680
|
const text = this.j.text;
|
|
39599
39681
|
if (this.j.o.showCharsCounter && this.charCounter) {
|
|
39600
|
-
|
|
39601
|
-
|
|
39602
|
-
|
|
39682
|
+
let chars;
|
|
39683
|
+
if (this.j.o.countHTMLChars) {
|
|
39684
|
+
chars = this.j.value;
|
|
39685
|
+
}
|
|
39686
|
+
else {
|
|
39687
|
+
if (this.j.o.countTextSpaces) {
|
|
39688
|
+
chars = text
|
|
39689
|
+
.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '')
|
|
39690
|
+
.replace(/[\r\n]/g, '');
|
|
39691
|
+
}
|
|
39692
|
+
else {
|
|
39693
|
+
chars = text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
|
|
39694
|
+
}
|
|
39695
|
+
}
|
|
39603
39696
|
this.charCounter.textContent = this.j.i18n('Chars: %d', chars.length);
|
|
39604
39697
|
}
|
|
39605
39698
|
if (this.j.o.showWordsCounter && this.wordCounter) {
|
|
@@ -40063,6 +40156,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40063
40156
|
/* harmony export */ pt_br: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
|
|
40064
40157
|
/* harmony export */ ru: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
|
|
40065
40158
|
/* harmony export */ tr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
|
|
40159
|
+
/* harmony export */ ua: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
|
|
40066
40160
|
/* harmony export */ zh_cn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
|
|
40067
40161
|
/* harmony export */ zh_tw: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; }
|
|
40068
40162
|
/* harmony export */ });
|
|
@@ -40095,6 +40189,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40095
40189
|
|
|
40096
40190
|
|
|
40097
40191
|
|
|
40192
|
+
|
|
40098
40193
|
|
|
40099
40194
|
|
|
40100
40195
|
/***/ }),
|
|
@@ -40633,6 +40728,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
|
|
|
40633
40728
|
}
|
|
40634
40729
|
},
|
|
40635
40730
|
popup: (editor, current, close, button) => {
|
|
40731
|
+
editor.editor.normalize();
|
|
40732
|
+
const snapshot = editor.history.snapshot.make();
|
|
40636
40733
|
const control = button.control;
|
|
40637
40734
|
const default_rows_count = control.data && control.data.rows ? control.data.rows : 10, default_cols_count = control.data && control.data.cols ? control.data.cols : 10;
|
|
40638
40735
|
const generateExtraClasses = () => {
|
|
@@ -40725,10 +40822,24 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
|
|
|
40725
40822
|
table.classList.add(className);
|
|
40726
40823
|
});
|
|
40727
40824
|
});
|
|
40728
|
-
|
|
40729
|
-
|
|
40825
|
+
editor.s.restore();
|
|
40826
|
+
editor.s.removeMarkers();
|
|
40827
|
+
editor.editor.normalize();
|
|
40828
|
+
editor.history.snapshot.restore(snapshot);
|
|
40829
|
+
const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.furthest(editor.s.current(), jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, editor.editor);
|
|
40830
|
+
if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isEmpty(block)) {
|
|
40831
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(block, table, undefined, false, true);
|
|
40832
|
+
}
|
|
40833
|
+
else {
|
|
40834
|
+
if (block) {
|
|
40835
|
+
const fake = crt.text('\n');
|
|
40836
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(block, fake);
|
|
40837
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(fake, table);
|
|
40838
|
+
}
|
|
40839
|
+
else {
|
|
40840
|
+
editor.s.insertNode(table, false);
|
|
40841
|
+
}
|
|
40730
40842
|
}
|
|
40731
|
-
editor.s.insertNode(table, false);
|
|
40732
40843
|
if (first_td) {
|
|
40733
40844
|
editor.s.setCursorIn(first_td);
|
|
40734
40845
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(first_td, editor.editor, editor.ed);
|
|
@@ -41979,7 +42090,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
41979
42090
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
41980
42091
|
PERFORMANCE OF THIS SOFTWARE.
|
|
41981
42092
|
***************************************************************************** */
|
|
41982
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
42093
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
41983
42094
|
|
|
41984
42095
|
var extendStatics = function(d, b) {
|
|
41985
42096
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -42090,8 +42201,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
42090
42201
|
}
|
|
42091
42202
|
|
|
42092
42203
|
function __generator(thisArg, body) {
|
|
42093
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
42094
|
-
return g =
|
|
42204
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
42205
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42095
42206
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
42096
42207
|
function step(op) {
|
|
42097
42208
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -42195,8 +42306,9 @@ function __await(v) {
|
|
|
42195
42306
|
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
42196
42307
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
42197
42308
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
42198
|
-
return i =
|
|
42199
|
-
function
|
|
42309
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
42310
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
42311
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
42200
42312
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
42201
42313
|
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
42202
42314
|
function fulfill(value) { resume("next", value); }
|
|
@@ -42262,16 +42374,18 @@ function __classPrivateFieldIn(state, receiver) {
|
|
|
42262
42374
|
function __addDisposableResource(env, value, async) {
|
|
42263
42375
|
if (value !== null && value !== void 0) {
|
|
42264
42376
|
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
42265
|
-
var dispose;
|
|
42377
|
+
var dispose, inner;
|
|
42266
42378
|
if (async) {
|
|
42267
|
-
|
|
42268
|
-
|
|
42379
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
42380
|
+
dispose = value[Symbol.asyncDispose];
|
|
42269
42381
|
}
|
|
42270
42382
|
if (dispose === void 0) {
|
|
42271
|
-
|
|
42272
|
-
|
|
42383
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
42384
|
+
dispose = value[Symbol.dispose];
|
|
42385
|
+
if (async) inner = dispose;
|
|
42273
42386
|
}
|
|
42274
42387
|
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
42388
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
42275
42389
|
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
42276
42390
|
}
|
|
42277
42391
|
else if (async) {
|
|
@@ -42290,17 +42404,22 @@ function __disposeResources(env) {
|
|
|
42290
42404
|
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
42291
42405
|
env.hasError = true;
|
|
42292
42406
|
}
|
|
42407
|
+
var r, s = 0;
|
|
42293
42408
|
function next() {
|
|
42294
|
-
while (env.stack.
|
|
42295
|
-
var rec = env.stack.pop();
|
|
42409
|
+
while (r = env.stack.pop()) {
|
|
42296
42410
|
try {
|
|
42297
|
-
|
|
42298
|
-
if (
|
|
42411
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
42412
|
+
if (r.dispose) {
|
|
42413
|
+
var result = r.dispose.call(r.value);
|
|
42414
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
42415
|
+
}
|
|
42416
|
+
else s |= 1;
|
|
42299
42417
|
}
|
|
42300
42418
|
catch (e) {
|
|
42301
|
-
|
|
42419
|
+
fail(e);
|
|
42302
42420
|
}
|
|
42303
42421
|
}
|
|
42422
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
42304
42423
|
if (env.hasError) throw env.error;
|
|
42305
42424
|
}
|
|
42306
42425
|
return next();
|