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.
Files changed (169) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +119 -5
  3. package/es2015/jodit.css +14 -2
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +2 -2
  6. package/es2015/jodit.js +422 -284
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +2 -2
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +25 -18
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  14. package/es2018/jodit.css +14 -2
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +416 -278
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.js +1 -1
  21. package/es2018/plugins/debug/debug.min.js +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.js +25 -18
  24. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  25. package/es2021/jodit.css +14 -2
  26. package/es2021/jodit.fat.min.css +1 -1
  27. package/es2021/jodit.fat.min.js +2 -2
  28. package/es2021/jodit.js +416 -278
  29. package/es2021/jodit.min.css +1 -1
  30. package/es2021/jodit.min.js +2 -2
  31. package/es2021/plugins/debug/debug.js +1 -1
  32. package/es2021/plugins/debug/debug.min.js +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021/plugins/speech-recognize/speech-recognize.js +25 -18
  35. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  36. package/es2021.en/jodit.css +14 -2
  37. package/es2021.en/jodit.fat.min.css +1 -1
  38. package/es2021.en/jodit.fat.min.js +2 -2
  39. package/es2021.en/jodit.js +391 -272
  40. package/es2021.en/jodit.min.css +1 -1
  41. package/es2021.en/jodit.min.js +2 -2
  42. package/es2021.en/plugins/debug/debug.js +1 -1
  43. package/es2021.en/plugins/debug/debug.min.js +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.js +25 -18
  46. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  47. package/es5/164.fat.min.js +10 -0
  48. package/es5/164.js +4939 -0
  49. package/es5/164.min.js +10 -0
  50. package/es5/5.fat.min.js +10 -0
  51. package/es5/5.js +76 -0
  52. package/es5/5.min.js +10 -0
  53. package/es5/jodit.css +21 -6
  54. package/es5/jodit.fat.min.css +1 -1
  55. package/es5/jodit.fat.min.js +2 -2
  56. package/es5/jodit.js +817 -5709
  57. package/es5/jodit.min.css +3 -3
  58. package/es5/jodit.min.js +2 -2
  59. package/es5/plugins/debug/debug.js +1 -1
  60. package/es5/plugins/debug/debug.min.js +1 -1
  61. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  62. package/es5/plugins/speech-recognize/speech-recognize.js +26 -19
  63. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  64. package/esm/config.js +3 -7
  65. package/esm/core/async/async.js +2 -1
  66. package/esm/core/constants.d.ts +2 -0
  67. package/esm/core/constants.js +12 -8
  68. package/esm/core/decorators/watch/watch.js +0 -1
  69. package/esm/core/dom/dom.d.ts +2 -1
  70. package/esm/core/dom/dom.js +12 -6
  71. package/esm/core/event-emitter/event-emitter.js +3 -3
  72. package/esm/core/global.js +16 -3
  73. package/esm/core/helpers/array/to-array.d.ts +1 -6
  74. package/esm/core/helpers/array/to-array.js +1 -1
  75. package/esm/core/helpers/async/set-timeout.d.ts +0 -3
  76. package/esm/core/helpers/async/set-timeout.js +3 -2
  77. package/esm/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  78. package/esm/core/helpers/checker/has-browser-color-picker.js +2 -1
  79. package/esm/core/helpers/checker/is-url.d.ts +0 -3
  80. package/esm/core/helpers/checker/is-url.js +2 -1
  81. package/esm/core/helpers/html/apply-styles.js +3 -3
  82. package/esm/core/helpers/html/clean-from-word.js +2 -1
  83. package/esm/core/helpers/html/htmlspecialchars.d.ts +0 -3
  84. package/esm/core/helpers/html/htmlspecialchars.js +2 -1
  85. package/esm/core/helpers/normalize/normalize-key-aliases.js +2 -1
  86. package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
  87. package/esm/core/helpers/size/get-scroll-parent.js +3 -2
  88. package/esm/core/helpers/utils/complete-url.js +2 -1
  89. package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +2 -1
  90. package/esm/core/helpers/utils/default-language.js +3 -2
  91. package/esm/core/helpers/utils/reset.js +3 -3
  92. package/esm/core/request/ajax.js +2 -1
  93. package/esm/core/selection/selection.js +1 -0
  94. package/esm/core/selection/style/api/has-same-style.js +15 -10
  95. package/esm/core/selection/style/api/toggle-attributes.js +2 -1
  96. package/esm/core/selection/style/commit-style.d.ts +1 -1
  97. package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
  98. package/esm/core/ui/button/tooltip/tooltip.js +11 -5
  99. package/esm/core/ui/form/inputs/file/file.d.ts +1 -0
  100. package/esm/core/ui/form/inputs/file/file.js +1 -0
  101. package/esm/core/ui/form/validators/input.d.ts +3 -3
  102. package/esm/core/ui/form/validators/select.d.ts +1 -1
  103. package/esm/jodit.js +3 -0
  104. package/esm/modules/file-browser/config.js +9 -1
  105. package/esm/modules/file-browser/data-provider.js +0 -1
  106. package/esm/modules/file-browser/file-browser.js +0 -1
  107. package/esm/modules/table/table.d.ts +2 -3
  108. package/esm/modules/table/table.js +27 -35
  109. package/esm/modules/toolbar/button/button.d.ts +1 -1
  110. package/esm/plugins/add-new-line/add-new-line.js +4 -1
  111. package/esm/plugins/backspace/cases/check-remove-char.js +1 -0
  112. package/esm/plugins/clean-html/config.d.ts +3 -3
  113. package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +9 -1
  114. package/esm/plugins/hotkeys/hotkeys.js +4 -2
  115. package/esm/plugins/iframe/config.d.ts +15 -3
  116. package/esm/plugins/iframe/config.js +1 -0
  117. package/esm/plugins/iframe/iframe.js +3 -0
  118. package/esm/plugins/indent/helpers.d.ts +1 -1
  119. package/esm/plugins/inline-popup/config/items/a.d.ts +2 -2
  120. package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
  121. package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
  122. package/esm/plugins/search/config.js +2 -2
  123. package/esm/plugins/search/helpers/highlight-text-ranges.js +3 -1
  124. package/esm/plugins/select-cells/select-cells.js +1 -1
  125. package/esm/plugins/source/editor/engines/ace.d.ts +0 -1
  126. package/esm/plugins/speech-recognize/config.js +1 -1
  127. package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
  128. package/esm/plugins/speech-recognize/helpers/api.js +5 -2
  129. package/esm/plugins/speech-recognize/helpers/sound.js +6 -4
  130. package/esm/plugins/stat/config.d.ts +1 -0
  131. package/esm/plugins/stat/config.js +1 -0
  132. package/esm/plugins/stat/stat.js +14 -3
  133. package/esm/plugins/symbols/langs/index.d.ts +2 -1
  134. package/esm/plugins/symbols/langs/index.js +2 -1
  135. package/esm/plugins/symbols/langs/ua.d.ts +1 -0
  136. package/esm/plugins/symbols/langs/ua.js +9 -0
  137. package/esm/plugins/table/config.js +19 -3
  138. package/esm/polyfills.d.ts +10 -0
  139. package/esm/polyfills.js +54 -0
  140. package/esm/tsconfig.json +1 -1
  141. package/package.json +1 -1
  142. package/types/core/constants.d.ts +2 -0
  143. package/types/core/dom/dom.d.ts +2 -1
  144. package/types/core/helpers/array/to-array.d.ts +1 -6
  145. package/types/core/helpers/async/set-timeout.d.ts +0 -3
  146. package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  147. package/types/core/helpers/checker/is-url.d.ts +0 -3
  148. package/types/core/helpers/html/htmlspecialchars.d.ts +0 -3
  149. package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
  150. package/types/core/selection/style/commit-style.d.ts +1 -1
  151. package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
  152. package/types/core/ui/form/inputs/file/file.d.ts +1 -0
  153. package/types/core/ui/form/validators/input.d.ts +3 -3
  154. package/types/core/ui/form/validators/select.d.ts +1 -1
  155. package/types/modules/table/table.d.ts +2 -3
  156. package/types/modules/toolbar/button/button.d.ts +1 -1
  157. package/types/plugins/clean-html/config.d.ts +3 -3
  158. package/types/plugins/iframe/config.d.ts +15 -3
  159. package/types/plugins/indent/helpers.d.ts +1 -1
  160. package/types/plugins/inline-popup/config/items/a.d.ts +2 -2
  161. package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
  162. package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
  163. package/types/plugins/source/editor/engines/ace.d.ts +0 -1
  164. package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
  165. package/types/plugins/stat/config.d.ts +1 -0
  166. package/types/plugins/symbols/langs/index.d.ts +2 -1
  167. package/types/plugins/symbols/langs/ua.d.ts +1 -0
  168. package/types/polyfills.d.ts +10 -0
  169. package/types/tsconfig.json +1 -1
package/es2021/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.25
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 = (typeof document !== 'undefined'
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 = (typeof window !== 'undefined'
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 jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59146);
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 jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2461);
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 jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35642);
1041
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
1042
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
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,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__/* .isVoid */ .R)(timeout)) {
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,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__/* .isNumber */ .E)(timeout)) {
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,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .setTimeout */ .w)(callback, timeout, ...args), key = options.label || timer;
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,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(label));
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,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timerOrLabel);
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,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timer);
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,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(key)));
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.25";
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 window !== 'undefined' &&
1884
- /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
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 = document.currentScript, removeScriptName = (s) => {
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 = document.querySelectorAll('script[src]');
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 window.location.href;
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
- const tag = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)
2864
- ? create.element(newTagName)
2865
- : newTagName;
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 || document).createDocumentFragment();
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 = document;
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, body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4507
- ? jodit.o.shadowRoot
4508
- : jodit.od.body;
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 window.setTimeout(callback, timeout, ...args);
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
- window.clearTimeout(timer);
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 = document.createElement('input');
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 = document.createElement('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 = document.createElement('iframe');
5684
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
5658
5685
  iframe.style.display = 'none';
5659
- document.body.appendChild(iframe);
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 jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
5731
- /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42448);
5732
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59101);
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 = document.createElement('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
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.each(div, node => {
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
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(node);
5803
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(node);
5775
5804
  break;
5776
5805
  default:
5777
- (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(node.attributes).forEach((attr) => {
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
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove.apply(null, marks);
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(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__/* .trim */ .Bq).join('\n');
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 = document.createElement('div');
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 jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
6552
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97369);
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 = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(node);
6565
- const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.css)(node, 'overflowY');
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
- document.scrollingElement ||
6572
- document.body);
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 (window.location.protocol === 'file:' && /^\/\//.test(url)) {
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 jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
7623
- /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70807);
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,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)(url)) {
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 = document.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
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,_parse_query__WEBPACK_IMPORTED_MODULE_1__/* .parseQuery */ .m)(parser.search)
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 jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98253);
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,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .K)(language)) {
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 (document.documentElement && document.documentElement.lang) {
7879
- return document.documentElement.lang;
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 = document.createElement('iframe');
8670
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
8631
8671
  try {
8632
8672
  iframe.src = 'about:blank';
8633
- document.body.appendChild(iframe);
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 tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
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 jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26318);
9563
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65147);
9564
- /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50156);
9565
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
9566
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27337);
9567
- /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91672);
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 = jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.ConfigProto)(options || {}, defaultAjaxOptions);
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(obj) &&
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(this.o.queryBuild)) {
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isString)(obj) ||
9603
- obj instanceof window.FormData ||
9604
- (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.append))) {
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(obj);
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(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI('Connection error'));
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 _response__WEBPACK_IMPORTED_MODULE_5__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
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(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .abort */ .h2('Abort connection'));
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(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI(xhr.statusText));
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(headers)) {
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 jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .error */ .z3('Need URL for AJAX request');
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(data)) {
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.parseQuery)(url);
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,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)({ ...urlData, ...data });
9742
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)({ ...urlData, ...data });
9701
9743
  }
9702
9744
  else {
9703
- url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(this.o.data);
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,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
9728
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay
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 jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11394
- /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
11395
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59678);
11396
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
11397
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
11398
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
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(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11415
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
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,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
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,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value) &&
11467
+ return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(value) &&
11423
11468
  value !== '' &&
11424
- !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(rules[property]) &&
11425
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__/* .normalizeCssValue */ .iy)(property, rules[property])
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
- const elm = document.createElement('div');
11431
- elm.style.color = 'red';
11432
- void 0;
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(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11440
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
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,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
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
- const elm2 = document.createElement('div');
11447
- elm2.style.color = 'red';
11448
- void 0;
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 jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11832
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56298);
11833
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9823);
11834
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59678);
11835
- /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95350);
11836
- /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(449);
11837
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97369);
11838
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38322);
11839
- /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72197);
11840
- /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12043);
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,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__/* .size */ .E)(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,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__/* .kebabCase */ .k)(rule));
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,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__/* .normalizeCssValue */ .iy)(rule, newValue)) {
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,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, null);
11900
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
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 = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11955
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11905
11956
  if (!dry) {
11906
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, newValue);
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, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
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 = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
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,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class', null);
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 = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
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, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11937
- if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key) === value) {
11938
- !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, null);
11939
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
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 = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11994
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11944
11995
  if (!dry) {
11945
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, value);
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,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')) {
11956
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', null);
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
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(elm);
11959
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNWRAP */ .OJ;
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,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
11969
- return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot');
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,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .getContainer */ .My)(jodit);
11972
- const iframe = document.createElement('iframe');
11973
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(iframe, {
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,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
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,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(newElm, key);
11995
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(newElm);
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
- // TODO Move it inside __show method. Now it is here because testcase failed with capturing
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 jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
14454
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59101);
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,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value).length) {
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,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value))) {
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
  }
@@ -19017,10 +19078,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser
19017
19078
  jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
19018
19079
  upload: {
19019
19080
  icon: 'plus',
19081
+ tooltip: 'Upload file',
19020
19082
  isInput: true,
19021
19083
  isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
19022
- getContent: (filebrowser) => {
19084
+ getContent: (filebrowser, btnInt) => {
19023
19085
  const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
19086
+ tooltip: btnInt.control.tooltip,
19024
19087
  onlyImages: filebrowser.state.onlyImages
19025
19088
  });
19026
19089
  filebrowser.e.fire('bindUploader.filebrowser', btn.container);
@@ -19029,6 +19092,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19029
19092
  },
19030
19093
  remove: {
19031
19094
  icon: 'bin',
19095
+ tooltip: 'Remove file',
19032
19096
  isDisabled: (browser) => {
19033
19097
  return (!browser.state.activeElements.length ||
19034
19098
  !browser.dataProvider.canI('FileRemove'));
@@ -19038,11 +19102,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19038
19102
  }
19039
19103
  },
19040
19104
  update: {
19105
+ tooltip: 'Update file list',
19041
19106
  exec: (editor) => {
19042
19107
  editor.e.fire('update.filebrowser');
19043
19108
  }
19044
19109
  },
19045
19110
  select: {
19111
+ tooltip: 'Select file',
19046
19112
  icon: 'check',
19047
19113
  isDisabled: (browser) => !browser.state.activeElements.length,
19048
19114
  exec: (editor) => {
@@ -19050,6 +19116,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19050
19116
  }
19051
19117
  },
19052
19118
  edit: {
19119
+ tooltip: 'Edit image',
19053
19120
  icon: 'pencil',
19054
19121
  isDisabled: (browser) => {
19055
19122
  const selected = browser.state.activeElements;
@@ -19063,6 +19130,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19063
19130
  }
19064
19131
  },
19065
19132
  tiles: {
19133
+ tooltip: 'Tiles view',
19066
19134
  icon: 'th',
19067
19135
  isActive: (filebrowser) => filebrowser.state.view === 'tiles',
19068
19136
  exec: (filebrowser) => {
@@ -19070,6 +19138,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19070
19138
  }
19071
19139
  },
19072
19140
  list: {
19141
+ tooltip: 'List view',
19073
19142
  icon: 'th-list',
19074
19143
  isActive: (filebrowser) => filebrowser.state.view === 'list',
19075
19144
  exec: (filebrowser) => {
@@ -19483,7 +19552,6 @@ let DataProvider = class DataProvider {
19483
19552
  data: {}
19484
19553
  };
19485
19554
  }
19486
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19487
19555
  const query = this.o[type];
19488
19556
  if (query.data === undefined) {
19489
19557
  query.data = {
@@ -19729,7 +19797,6 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19729
19797
  get dataProvider() {
19730
19798
  return (0,_factories__WEBPACK_IMPORTED_MODULE_16__/* .makeDataProvider */ .S)(this, this.options);
19731
19799
  }
19732
- // eslint-disable-next-line no-unused-vars
19733
19800
  onSelect(callback) {
19734
19801
  return () => {
19735
19802
  if (this.state.activeElements.length) {
@@ -22242,7 +22309,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22242
22309
  const selector = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
22243
22310
  selector && selectors.push(selector);
22244
22311
  });
22245
- // eslint-disable-next-line no-prototype-builtins
22246
22312
  style.innerHTML = selectors.length
22247
22313
  ? selectors.join(',') +
22248
22314
  `{${this.jodit.options.table.selectionCellStyle}}`
@@ -22460,46 +22526,39 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22460
22526
  removeRow(table, rowIndex) {
22461
22527
  return Table.__removeRow(table, rowIndex);
22462
22528
  }
22463
- static __appendColumn(table, j, after, create) {
22529
+ /**
22530
+ * Insert column before / after all the columns containing the selected cells
22531
+ */
22532
+ appendColumn(table, selectedCell, insertAfter = true) {
22464
22533
  const box = Table.__formalMatrix(table);
22465
- let i;
22466
- if (j === undefined || j < 0) {
22467
- j = Table.__getColumnsCount(table) - 1;
22468
- }
22469
- for (i = 0; i < box.length; i += 1) {
22470
- const cell = create.element('td');
22471
- const td = box[i][j];
22472
- let added = false;
22473
- if (after) {
22474
- if ((box[i] && td && j + 1 >= box[i].length) ||
22475
- td !== box[i][j + 1]) {
22476
- if (td.nextSibling) {
22477
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(td.nextSibling, cell);
22478
- }
22479
- else {
22480
- td.parentNode && td.parentNode.appendChild(cell);
22481
- }
22482
- added = true;
22534
+ if (!insertAfter && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.isCell(selectedCell.previousElementSibling)) {
22535
+ return this.appendColumn(table, selectedCell.previousElementSibling, true);
22536
+ }
22537
+ const columnIndex = insertAfter
22538
+ ? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
22539
+ : selectedCell.cellIndex;
22540
+ const newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
22541
+ for (let i = 0; i < box.length;) {
22542
+ const cells = box[i];
22543
+ if (cells[columnIndex] !== cells[newColumnIndex] ||
22544
+ columnIndex === newColumnIndex) {
22545
+ const cell = this.j.createInside.element('td');
22546
+ if (insertAfter) {
22547
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.after(cells[columnIndex], cell);
22483
22548
  }
22484
- }
22485
- else {
22486
- if (j - 1 < 0 ||
22487
- (box[i][j] !== box[i][j - 1] && box[i][j].parentNode)) {
22488
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(box[i][j], cell);
22489
- added = true;
22549
+ else {
22550
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(cells[columnIndex], cell);
22551
+ }
22552
+ if (cells[columnIndex].rowSpan > 1) {
22553
+ cell.rowSpan = cells[columnIndex].rowSpan;
22490
22554
  }
22491
22555
  }
22492
- if (!added) {
22493
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', parseInt((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan') || '1', 10) + 1);
22556
+ else {
22557
+ cells[columnIndex].colSpan += 1;
22494
22558
  }
22559
+ i += cells[columnIndex].rowSpan || 1;
22495
22560
  }
22496
22561
  }
22497
- /**
22498
- * Insert column before / after all the columns containing the selected cells
22499
- */
22500
- appendColumn(table, j, after) {
22501
- return Table.__appendColumn(table, j, after, this.j.createInside);
22502
- }
22503
22562
  static __removeColumn(table, j) {
22504
22563
  const box = Table.__formalMatrix(table);
22505
22564
  let dec;
@@ -22717,7 +22776,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22717
22776
  alreadyMerged.delete(first);
22718
22777
  Table.__unmark(__marked);
22719
22778
  Table.__normalizeTable(table);
22720
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach((tr, index) => {
22779
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(tr => {
22721
22780
  if (!tr.cells.length) {
22722
22781
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(tr);
22723
22782
  }
@@ -22726,7 +22785,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22726
22785
  }
22727
22786
  }
22728
22787
  /**
22729
- * It combines all of the selected cells into one. The contents of the cells will also be combined
22788
+ * It combines all the selected cells into one. The contents of the cells will also be combined
22730
22789
  */
22731
22790
  mergeSelected(table) {
22732
22791
  return Table.__mergeSelected(table, this.j);
@@ -25068,7 +25127,9 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25068
25127
  editor.e
25069
25128
  .off(editor.editor, '.' + ns)
25070
25129
  .off(editor.container, '.' + ns)
25130
+ .off('.' + ns)
25071
25131
  .on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
25132
+ .on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
25072
25133
  .on(editor.editor, 'click' + '.' + ns, this.__hide)
25073
25134
  .on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
25074
25135
  .on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
@@ -25156,7 +25217,8 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25156
25217
  jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(this.__line);
25157
25218
  this.j.e
25158
25219
  .off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
25159
- .off(this.j.container, '.' + ns);
25220
+ .off(this.j.container, '.' + ns)
25221
+ .off('.' + ns);
25160
25222
  }
25161
25223
  }
25162
25224
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
@@ -26045,6 +26107,7 @@ function checkNotCollapsed(jodit) {
26045
26107
  * ```
26046
26108
  * @private
26047
26109
  */
26110
+ // eslint-disable-next-line complexity
26048
26111
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
26049
26112
  const step = backspace ? -1 : 1;
26050
26113
  const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
@@ -27338,13 +27401,21 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
27338
27401
  */
27339
27402
 
27340
27403
 
27404
+ const TABLE_CONTAINER_TAGS = new Set([
27405
+ 'table',
27406
+ 'tbody',
27407
+ 'thead',
27408
+ 'tfoot',
27409
+ 'tr'
27410
+ ]);
27341
27411
  /**
27342
27412
  * @private
27343
27413
  */
27344
27414
  function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
27345
27415
  if (jodit.o.cleanHTML.fillEmptyParagraph &&
27346
27416
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(nodeElm) &&
27347
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
27417
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) &&
27418
+ !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
27348
27419
  const br = jodit.createInside.element('br');
27349
27420
  nodeElm.appendChild(br);
27350
27421
  return true;
@@ -30563,7 +30634,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
30563
30634
  constructor() {
30564
30635
  super(...arguments);
30565
30636
  this.onKeyPress = (event) => {
30566
- const special = this.specialKeys[event.which], character = (event.key || String.fromCharCode(event.which)).toLowerCase();
30637
+ const special = this.specialKeys[event.which];
30638
+ const character = (event.key || String.fromCharCode(event.which)).toLowerCase();
30567
30639
  const modif = [special || character];
30568
30640
  ['alt', 'ctrl', 'shift', 'meta'].forEach(specialKey => {
30569
30641
  if (event[specialKey + 'Key'] && special !== specialKey) {
@@ -30657,7 +30729,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
30657
30729
  }
30658
30730
  })
30659
30731
  .on('keydown.hotkeys', (event) => {
30660
- const shortcut = this.onKeyPress(event), stop = {
30732
+ const shortcut = this.onKeyPress(event);
30733
+ const stop = {
30661
30734
  shouldStop: true
30662
30735
  };
30663
30736
  const resultOfFire = this.j.e.fire(shortcut + '.hotkey', event.type, stop);
@@ -30831,6 +30904,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeStyle
30831
30904
  '-ms-user-select: none' +
30832
30905
  '}';
30833
30906
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeCSSLinks = [];
30907
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox = null;
30834
30908
 
30835
30909
 
30836
30910
  /***/ }),
@@ -30907,6 +30981,9 @@ function iframe(editor) {
30907
30981
  iframe.setAttribute('allowtransparency', 'true');
30908
30982
  iframe.setAttribute('tabindex', opt.tabIndex.toString());
30909
30983
  iframe.setAttribute('frameborder', '0');
30984
+ if (opt.iframeSandbox != null) {
30985
+ iframe.setAttribute('sandbox', opt.iframeSandbox);
30986
+ }
30910
30987
  editor.workplace.appendChild(iframe);
30911
30988
  editor.iframe = iframe;
30912
30989
  const result = editor.e.fire('generateDocumentStructure.iframe', null, editor);
@@ -36678,13 +36755,13 @@ function generateCriticalCSS(jodit) {
36678
36755
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
36679
36756
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71842);
36680
36757
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
36681
- /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17527);
36682
- /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98434);
36683
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(931);
36684
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36115);
36685
- /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11131);
36686
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59827);
36687
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_7__);
36758
+ /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17527);
36759
+ /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98434);
36760
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(931);
36761
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36115);
36762
+ /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11131);
36763
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59827);
36764
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_8__);
36688
36765
  /*!
36689
36766
  * Jodit Editor (https://xdsoft.net/jodit/)
36690
36767
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36699,8 +36776,8 @@ function generateCriticalCSS(jodit) {
36699
36776
 
36700
36777
 
36701
36778
 
36702
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_7___default()));
36703
- jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.print = {
36779
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_8___default()));
36780
+ jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.prototype.controls.print = {
36704
36781
  exec: (editor) => {
36705
36782
  const iframe = editor.create.element('iframe');
36706
36783
  Object.assign(iframe.style, {
@@ -36711,7 +36788,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
36711
36788
  height: 0,
36712
36789
  border: 0
36713
36790
  });
36714
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T).appendChild(iframe);
36791
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T).appendChild(iframe);
36715
36792
  const afterFinishPrint = () => {
36716
36793
  editor.e.off(editor.ow, 'mousemove', afterFinishPrint);
36717
36794
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
@@ -36727,12 +36804,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
36727
36804
  }
36728
36805
  else {
36729
36806
  myWindow.document.write('<!doctype html><html lang="' +
36730
- (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__/* .defaultLanguage */ .e)(editor.o.language) +
36807
+ (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__/* .defaultLanguage */ .e)(editor.o.language) +
36731
36808
  '"><head><title></title></head><style>' +
36732
- (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__/* .generateCriticalCSS */ .Y)(editor) +
36809
+ (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__/* .generateCriticalCSS */ .Y)(editor) +
36733
36810
  '</style><body></body></html>');
36734
36811
  myWindow.document.close();
36735
- (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
36812
+ (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
36736
36813
  }
36737
36814
  const style = myWindow.document.createElement('style');
36738
36815
  style.innerHTML = `@media print {
@@ -37808,10 +37885,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
37808
37885
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
37809
37886
 
37810
37887
  "use strict";
37811
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(931);
37812
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36115);
37813
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21917);
37814
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_2__);
37888
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37889
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
37890
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
37891
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21917);
37892
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_3__);
37815
37893
  /*!
37816
37894
  * Jodit Editor (https://xdsoft.net/jodit/)
37817
37895
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37821,14 +37899,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
37821
37899
 
37822
37900
 
37823
37901
 
37824
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.useSearch = true;
37825
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.search = {
37902
+
37903
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.useSearch = true;
37904
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.search = {
37826
37905
  lazyIdleTimeout: 0,
37827
- // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37828
- useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
37906
+ useCustomHighlightAPI: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined'
37829
37907
  };
37830
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_2___default()));
37831
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.find = {
37908
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_3___default()));
37909
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find = {
37832
37910
  tooltip: 'Find',
37833
37911
  icon: 'search',
37834
37912
  exec(jodit, _, { control }) {
@@ -37869,8 +37947,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37869
37947
  /* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
37870
37948
  /* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
37871
37949
  /* harmony export */ });
37872
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
37873
- /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58720);
37950
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37951
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
37952
+ /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
37874
37953
  /*!
37875
37954
  * Jodit Editor (https://xdsoft.net/jodit/)
37876
37955
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37878,6 +37957,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37878
37957
  */
37879
37958
 
37880
37959
 
37960
+
37881
37961
  /**
37882
37962
  * @private
37883
37963
  */
@@ -37896,15 +37976,15 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37896
37976
  const span = ci.element('span', {
37897
37977
  [TMP_ATTR]: true
37898
37978
  });
37899
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
37979
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.markTemporary(span);
37900
37980
  normalizeRanges(rng, restRanges, ci);
37901
37981
  let next = rng.startContainer;
37902
37982
  do {
37903
37983
  if (!next) {
37904
37984
  break;
37905
37985
  }
37906
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37907
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37986
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37987
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37908
37988
  }
37909
37989
  if (next === rng.endContainer) {
37910
37990
  break;
@@ -37923,13 +38003,13 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37923
38003
  * @private
37924
38004
  */
37925
38005
  function getSelectionWrappers(root) {
37926
- return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__.$$)(`[${TMP_ATTR}]`, root);
38006
+ return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__.$$)(`[${TMP_ATTR}]`, root);
37927
38007
  }
37928
38008
  /**
37929
38009
  * @private
37930
38010
  */
37931
38011
  function clearSelectionWrappers(root) {
37932
- getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(span));
38012
+ getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
37933
38013
  }
37934
38014
  /**
37935
38015
  * @private
@@ -37941,12 +38021,13 @@ function clearSelectionWrappersFromHTML(root) {
37941
38021
  * @private
37942
38022
  */
37943
38023
  function isSelectionWrapper(node) {
37944
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
38024
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
37945
38025
  }
37946
38026
  function checkNativeSelectionMethod(jodit, rng, restRanges) {
37947
38027
  if (jodit.o.search.useCustomHighlightAPI &&
37948
38028
  // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37949
- typeof window.Highlight !== 'undefined') {
38029
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
38030
+ typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
37950
38031
  const ranges = [rng, ...restRanges].map(rng => {
37951
38032
  const range = jodit.selection.createRange();
37952
38033
  range.setStart(rng.startContainer, rng.startOffset);
@@ -37970,7 +38051,7 @@ function normalizeRanges(rng, restRanges, ci) {
37970
38051
  if (rng.startOffset !== 0) {
37971
38052
  const text = ci.text(startText.substring(0, rng.startOffset));
37972
38053
  rng.startContainer.nodeValue = startText.substring(rng.startOffset);
37973
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
38054
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before(rng.startContainer, text);
37974
38055
  if (rng.startContainer === rng.endContainer) {
37975
38056
  diff = rng.startOffset;
37976
38057
  rng.endOffset -= diff;
@@ -37981,7 +38062,7 @@ function normalizeRanges(rng, restRanges, ci) {
37981
38062
  if (rng.endOffset !== endText.length) {
37982
38063
  const text = ci.text(endText.substring(rng.endOffset));
37983
38064
  rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
37984
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
38065
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(rng.endContainer, text);
37985
38066
  for (const range of restRanges) {
37986
38067
  if (range.startContainer === rng.endContainer) {
37987
38068
  range.startContainer = text;
@@ -38988,7 +39069,7 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
38988
39069
  break;
38989
39070
  case 'addcolumnafter':
38990
39071
  case 'addcolumnbefore':
38991
- this.__tableModule.appendColumn(table, cell.cellIndex, command === 'addcolumnafter');
39072
+ this.__tableModule.appendColumn(table, cell, command === 'addcolumnafter');
38992
39073
  break;
38993
39074
  case 'addrowafter':
38994
39075
  case 'addrowbefore':
@@ -40852,6 +40933,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('spell
40852
40933
 
40853
40934
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showCharsCounter = true;
40854
40935
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countHTMLChars = false;
40936
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countTextSpaces = false;
40855
40937
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showWordsCounter = true;
40856
40938
 
40857
40939
 
@@ -40898,9 +40980,20 @@ class stat extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plug
40898
40980
  this.calc = this.j.async.throttle(() => {
40899
40981
  const text = this.j.text;
40900
40982
  if (this.j.o.showCharsCounter && this.charCounter) {
40901
- const chars = this.j.o.countHTMLChars
40902
- ? this.j.value
40903
- : text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
40983
+ let chars;
40984
+ if (this.j.o.countHTMLChars) {
40985
+ chars = this.j.value;
40986
+ }
40987
+ else {
40988
+ if (this.j.o.countTextSpaces) {
40989
+ chars = text
40990
+ .replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '')
40991
+ .replace(/[\r\n]/g, '');
40992
+ }
40993
+ else {
40994
+ chars = text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
40995
+ }
40996
+ }
40904
40997
  this.charCounter.textContent = this.j.i18n('Chars: %d', chars.length);
40905
40998
  }
40906
40999
  if (this.j.o.showWordsCounter && this.wordCounter) {
@@ -41534,8 +41627,9 @@ __webpack_require__.r(__webpack_exports__);
41534
41627
  /* harmony export */ pt_br: function() { return /* reexport module object */ _pt_br_js__WEBPACK_IMPORTED_MODULE_16__; },
41535
41628
  /* harmony export */ ru: function() { return /* reexport module object */ _ru_js__WEBPACK_IMPORTED_MODULE_17__; },
41536
41629
  /* harmony export */ tr: function() { return /* reexport module object */ _tr_js__WEBPACK_IMPORTED_MODULE_18__; },
41537
- /* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_19__; },
41538
- /* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_20__; }
41630
+ /* harmony export */ ua: function() { return /* reexport module object */ _ua_js__WEBPACK_IMPORTED_MODULE_19__; },
41631
+ /* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__; },
41632
+ /* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__; }
41539
41633
  /* harmony export */ });
41540
41634
  /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37605);
41541
41635
  /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
@@ -41575,10 +41669,12 @@ __webpack_require__.r(__webpack_exports__);
41575
41669
  /* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_ru_js__WEBPACK_IMPORTED_MODULE_17__);
41576
41670
  /* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98376);
41577
41671
  /* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_tr_js__WEBPACK_IMPORTED_MODULE_18__);
41578
- /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(47238);
41579
- /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_19__);
41580
- /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(72386);
41581
- /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_20__);
41672
+ /* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(28776);
41673
+ /* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_ua_js__WEBPACK_IMPORTED_MODULE_19__);
41674
+ /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(47238);
41675
+ /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_20__);
41676
+ /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(72386);
41677
+ /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_21__);
41582
41678
  /*!
41583
41679
  * Jodit Editor (https://xdsoft.net/jodit/)
41584
41680
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41606,6 +41702,7 @@ __webpack_require__.r(__webpack_exports__);
41606
41702
 
41607
41703
 
41608
41704
 
41705
+
41609
41706
 
41610
41707
 
41611
41708
  /***/ }),
@@ -41761,6 +41858,23 @@ module.exports = {
41761
41858
  };
41762
41859
 
41763
41860
 
41861
+ /***/ }),
41862
+
41863
+ /***/ 28776:
41864
+ /***/ (function(module) {
41865
+
41866
+ "use strict";
41867
+
41868
+ /*!
41869
+ * Jodit Editor (https://xdsoft.net/jodit/)
41870
+ * Released under MIT see LICENSE.txt in the project root for license information.
41871
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
41872
+ */
41873
+ module.exports = {
41874
+ symbols: 'символ'
41875
+ };
41876
+
41877
+
41764
41878
  /***/ }),
41765
41879
 
41766
41880
  /***/ 47238:
@@ -42331,6 +42445,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
42331
42445
  }
42332
42446
  },
42333
42447
  popup: (editor, current, close, button) => {
42448
+ editor.editor.normalize();
42449
+ const snapshot = editor.history.snapshot.make();
42334
42450
  const control = button.control;
42335
42451
  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;
42336
42452
  const generateExtraClasses = () => {
@@ -42423,10 +42539,24 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
42423
42539
  table.classList.add(className);
42424
42540
  });
42425
42541
  });
42426
- if (editor.editor.firstChild) {
42427
- editor.s.insertNode(crt.text('\n'), false, false);
42542
+ editor.s.restore();
42543
+ editor.s.removeMarkers();
42544
+ editor.editor.normalize();
42545
+ editor.history.snapshot.restore(snapshot);
42546
+ 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);
42547
+ if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isEmpty(block)) {
42548
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(block, table, undefined, false, true);
42549
+ }
42550
+ else {
42551
+ if (block) {
42552
+ const fake = crt.text('\n');
42553
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(block, fake);
42554
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(fake, table);
42555
+ }
42556
+ else {
42557
+ editor.s.insertNode(table, false);
42558
+ }
42428
42559
  }
42429
- editor.s.insertNode(table, false);
42430
42560
  if (first_td) {
42431
42561
  editor.s.setCursorIn(first_td);
42432
42562
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(first_td, editor.editor, editor.ed);
@@ -43816,7 +43946,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43816
43946
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43817
43947
  PERFORMANCE OF THIS SOFTWARE.
43818
43948
  ***************************************************************************** */
43819
- /* global Reflect, Promise, SuppressedError, Symbol */
43949
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
43820
43950
 
43821
43951
  var extendStatics = function(d, b) {
43822
43952
  extendStatics = Object.setPrototypeOf ||
@@ -43927,8 +44057,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
43927
44057
  }
43928
44058
 
43929
44059
  function __generator(thisArg, body) {
43930
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43931
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44060
+ 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);
44061
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43932
44062
  function verb(n) { return function (v) { return step([n, v]); }; }
43933
44063
  function step(op) {
43934
44064
  if (f) throw new TypeError("Generator is already executing.");
@@ -44032,8 +44162,9 @@ function __await(v) {
44032
44162
  function __asyncGenerator(thisArg, _arguments, generator) {
44033
44163
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
44034
44164
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
44035
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
44036
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
44165
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
44166
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
44167
+ 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]); } }
44037
44168
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
44038
44169
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
44039
44170
  function fulfill(value) { resume("next", value); }
@@ -44099,16 +44230,18 @@ function __classPrivateFieldIn(state, receiver) {
44099
44230
  function __addDisposableResource(env, value, async) {
44100
44231
  if (value !== null && value !== void 0) {
44101
44232
  if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
44102
- var dispose;
44233
+ var dispose, inner;
44103
44234
  if (async) {
44104
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
44105
- dispose = value[Symbol.asyncDispose];
44235
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
44236
+ dispose = value[Symbol.asyncDispose];
44106
44237
  }
44107
44238
  if (dispose === void 0) {
44108
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
44109
- dispose = value[Symbol.dispose];
44239
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
44240
+ dispose = value[Symbol.dispose];
44241
+ if (async) inner = dispose;
44110
44242
  }
44111
44243
  if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
44244
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
44112
44245
  env.stack.push({ value: value, dispose: dispose, async: async });
44113
44246
  }
44114
44247
  else if (async) {
@@ -44127,17 +44260,22 @@ function __disposeResources(env) {
44127
44260
  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
44128
44261
  env.hasError = true;
44129
44262
  }
44263
+ var r, s = 0;
44130
44264
  function next() {
44131
- while (env.stack.length) {
44132
- var rec = env.stack.pop();
44265
+ while (r = env.stack.pop()) {
44133
44266
  try {
44134
- var result = rec.dispose && rec.dispose.call(rec.value);
44135
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
44267
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
44268
+ if (r.dispose) {
44269
+ var result = r.dispose.call(r.value);
44270
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
44271
+ }
44272
+ else s |= 1;
44136
44273
  }
44137
44274
  catch (e) {
44138
- fail(e);
44275
+ fail(e);
44139
44276
  }
44140
44277
  }
44278
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
44141
44279
  if (env.hasError) throw env.error;
44142
44280
  }
44143
44281
  return next();