jodit 4.18.2 → 4.18.3

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 (95) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/es2015/jodit.css +7 -6
  3. package/es2015/jodit.fat.min.js +10 -10
  4. package/es2015/jodit.js +475 -183
  5. package/es2015/jodit.min.js +10 -10
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +9 -9
  13. package/es2018/jodit.min.js +9 -9
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +7 -6
  17. package/es2021/jodit.fat.min.js +16 -16
  18. package/es2021/jodit.js +415 -129
  19. package/es2021/jodit.min.js +16 -16
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +7 -6
  27. package/es2021.en/jodit.fat.min.js +25 -25
  28. package/es2021.en/jodit.js +415 -129
  29. package/es2021.en/jodit.min.js +16 -16
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +8 -7
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +536 -209
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/config.d.ts +4 -2
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/helpers/utils/index.d.ts +1 -0
  53. package/esm/core/helpers/utils/index.js +1 -0
  54. package/esm/core/helpers/utils/prepare-media.d.ts +19 -0
  55. package/esm/core/helpers/utils/prepare-media.js +31 -0
  56. package/esm/core/selection/style/api/wrap-unwrapped-text.js +3 -2
  57. package/esm/modules/history/history.d.ts +17 -2
  58. package/esm/modules/history/history.js +41 -19
  59. package/esm/modules/table/table.js +7 -2
  60. package/esm/modules/widget/file-selector/file-selector.js +2 -2
  61. package/esm/plugins/backspace/backspace.js +4 -0
  62. package/esm/plugins/clean-html/clean-html.d.ts +7 -0
  63. package/esm/plugins/clean-html/clean-html.js +17 -0
  64. package/esm/plugins/clean-html/helpers/visitor/filters/replace-old-tags.js +26 -1
  65. package/esm/plugins/dtd/before-insert/check-block-nesting.d.ts +2 -1
  66. package/esm/plugins/dtd/before-insert/check-block-nesting.js +26 -5
  67. package/esm/plugins/enter/helpers/move-cursor-out-from-specal-tags.js +8 -0
  68. package/esm/plugins/focus/focus.js +3 -0
  69. package/esm/plugins/hr/hr.js +21 -5
  70. package/esm/plugins/iframe/config.js +8 -3
  71. package/esm/plugins/inline-popup/inline-popup.d.ts +5 -0
  72. package/esm/plugins/inline-popup/inline-popup.js +26 -2
  73. package/esm/plugins/link/link.js +5 -2
  74. package/esm/plugins/media/config.d.ts +2 -1
  75. package/esm/plugins/media/media.js +21 -2
  76. package/esm/plugins/paste/helpers.d.ts +8 -0
  77. package/esm/plugins/paste/helpers.js +18 -1
  78. package/esm/plugins/paste/paste.js +2 -2
  79. package/esm/plugins/resizer/resizer.js +8 -3
  80. package/esm/plugins/select-cells/select-cells.d.ts +10 -0
  81. package/esm/plugins/select-cells/select-cells.js +54 -6
  82. package/esm/plugins/table/config.js +51 -1
  83. package/esm/plugins/table-keyboard-navigation/table-keyboard-navigation.js +1 -1
  84. package/esm/plugins/video/config.js +6 -22
  85. package/package.json +1 -1
  86. package/types/config.d.ts +4 -2
  87. package/types/core/helpers/utils/index.d.ts +1 -0
  88. package/types/core/helpers/utils/prepare-media.d.ts +19 -0
  89. package/types/modules/history/history.d.ts +17 -2
  90. package/types/plugins/clean-html/clean-html.d.ts +7 -0
  91. package/types/plugins/dtd/before-insert/check-block-nesting.d.ts +2 -1
  92. package/types/plugins/inline-popup/inline-popup.d.ts +5 -0
  93. package/types/plugins/media/config.d.ts +2 -1
  94. package/types/plugins/paste/helpers.d.ts +8 -0
  95. package/types/plugins/select-cells/select-cells.d.ts +10 -0
package/es2015/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.18.2
4
+ * Version: v4.18.3
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1830,7 +1830,7 @@ __webpack_require__.r(__webpack_exports__);
1830
1830
  * ```
1831
1831
  * @packageDocumentation
1832
1832
  * @module constants
1833
- */ const APP_VERSION = "4.18.2";
1833
+ */ const APP_VERSION = "4.18.3";
1834
1834
  // prettier-ignore
1835
1835
  const ES = "es2015";
1836
1836
  const IS_ES_MODERN = true;
@@ -8860,13 +8860,13 @@ const getClassName = (obj)=>{
8860
8860
  "use strict";
8861
8861
  __webpack_require__.r(__webpack_exports__);
8862
8862
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8863
- /* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.$$; },
8863
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.$$; },
8864
8864
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8865
8865
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8866
8866
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8867
8867
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8868
8868
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8869
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
8869
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
8870
8870
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8871
8871
  /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8872
8872
  /* harmony export */ abort: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.abort; },
@@ -8878,9 +8878,9 @@ __webpack_require__.r(__webpack_exports__);
8878
8878
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8879
8879
  /* harmony export */ browser: function() { return /* reexport safe */ _browser__WEBPACK_IMPORTED_MODULE_4__.browser; },
8880
8880
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8881
- /* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.call; },
8882
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
8883
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callThis; },
8881
+ /* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.call; },
8882
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8883
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.callThis; },
8884
8884
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8885
8885
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8886
8886
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.cns; },
@@ -8890,7 +8890,7 @@ __webpack_require__.r(__webpack_exports__);
8890
8890
  /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8891
8891
  /* harmony export */ css: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.css; },
8892
8892
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8893
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
8893
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
8894
8894
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8895
8895
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8896
8896
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8899,34 +8899,36 @@ __webpack_require__.r(__webpack_exports__);
8899
8899
  /* harmony export */ get: function() { return /* reexport safe */ _get__WEBPACK_IMPORTED_MODULE_15__.get; },
8900
8900
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8901
8901
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8902
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
8902
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
8903
8903
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8904
8904
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8905
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
8905
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
8906
8906
  /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8907
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
8907
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
8908
8908
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8909
8909
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8910
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.inView; },
8910
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_25__.inView; },
8911
8911
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8912
8912
  /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
8913
8913
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8914
- /* harmony export */ keys: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.keys; },
8915
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
8914
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.keys; },
8915
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
8916
8916
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8917
8917
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8918
8918
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8919
8919
  /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8920
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
8921
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
8920
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
8921
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
8922
8922
  /* harmony export */ options: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.options; },
8923
8923
  /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8924
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
8925
- /* harmony export */ refs: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.refs; },
8926
- /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_23__.reset; },
8927
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
8928
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
8929
- /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_26__.set; },
8924
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
8925
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
8926
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
8927
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.refs; },
8928
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_24__.reset; },
8929
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
8930
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
8931
+ /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_27__.set; },
8930
8932
  /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
8931
8933
  /* harmony export */ });
8932
8934
  /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
@@ -8955,13 +8957,14 @@ __webpack_require__.r(__webpack_exports__);
8955
8957
  /* harmony import */ var _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49385);
8956
8958
  /* harmony import */ var _media_wrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(83314);
8957
8959
  /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(36310);
8958
- /* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(57075);
8959
- /* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(43379);
8960
- /* harmony import */ var _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(60898);
8961
- /* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(28723);
8962
- /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(52144);
8963
- /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(42820);
8964
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(71125);
8960
+ /* harmony import */ var _prepare_media__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(89214);
8961
+ /* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(57075);
8962
+ /* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(43379);
8963
+ /* harmony import */ var _scroll_into_view__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(60898);
8964
+ /* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(28723);
8965
+ /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(52144);
8966
+ /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(42820);
8967
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(71125);
8965
8968
  /*!
8966
8969
  * Jodit Editor (https://xdsoft.net/jodit/)
8967
8970
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8997,6 +9000,7 @@ __webpack_require__.r(__webpack_exports__);
8997
9000
 
8998
9001
 
8999
9002
 
9003
+
9000
9004
 
9001
9005
 
9002
9006
  /***/ }),
@@ -9170,6 +9174,48 @@ const isWrapper = (node, wrapper)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0
9170
9174
  /* harmony export */ ]);
9171
9175
 
9172
9176
 
9177
+ /***/ }),
9178
+
9179
+ /***/ 89214:
9180
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9181
+
9182
+ "use strict";
9183
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9184
+ /* harmony export */ prepareEmbedCode: function() { return /* binding */ prepareEmbedCode; },
9185
+ /* harmony export */ prepareMedia: function() { return /* binding */ prepareMedia; }
9186
+ /* harmony export */ });
9187
+ /* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
9188
+ /* harmony import */ var jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83314);
9189
+ /*!
9190
+ * Jodit Editor (https://xdsoft.net/jodit/)
9191
+ * Released under MIT see LICENSE.txt in the project root for license information.
9192
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
9193
+ */ /**
9194
+ * @module helpers/utils
9195
+ */
9196
+
9197
+ /**
9198
+ * Puts new media in its wrapper (see `mediaWrappers`) and aligns it with
9199
+ * `mediaDefaultAlign`. Returns the wrapper, or `element` when there is none
9200
+ */ function prepareMedia(jodit, element) {
9201
+ const media = (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_1__.wrapMedia)(jodit, element);
9202
+ const { mediaDefaultAlign } = jodit.o;
9203
+ if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
9204
+ (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
9205
+ }
9206
+ return media;
9207
+ }
9208
+ /**
9209
+ * Embed code that is one element is prepared as media (see `prepareMedia`);
9210
+ * other code is returned as it is
9211
+ */ function prepareEmbedCode(jodit, code) {
9212
+ const box = jodit.createInside.div();
9213
+ box.innerHTML = code.trim();
9214
+ const element = box.firstElementChild;
9215
+ return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
9216
+ }
9217
+
9218
+
9173
9219
  /***/ }),
9174
9220
 
9175
9221
  /***/ 57075:
@@ -13407,7 +13453,9 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
13407
13453
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, fragment);
13408
13454
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeInsertNode(range, wrapper);
13409
13455
  if (style.elementIsBlock) {
13410
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(wrapper.firstElementChild, 'br')) {
13456
+ // The wrapped content can bring its own `<br>` (an empty table
13457
+ // cell's), after or inside the temporary `<font>` around the selection
13458
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !wrapper.querySelector('br')) {
13411
13459
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, ci.element('br'));
13412
13460
  }
13413
13461
  }
@@ -22556,13 +22604,11 @@ class Command {
22556
22604
  /* harmony export */ History: function() { return /* binding */ History; }
22557
22605
  /* harmony export */ });
22558
22606
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
22559
- /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
22560
- /* harmony import */ var jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59609);
22561
- /* harmony import */ var jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55184);
22562
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5266);
22563
- /* harmony import */ var _command__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8838);
22564
- /* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46363);
22565
- /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33511);
22607
+ /* harmony import */ var jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59609);
22608
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5266);
22609
+ /* harmony import */ var _command__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8838);
22610
+ /* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46363);
22611
+ /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33511);
22566
22612
  /*!
22567
22613
  * Jodit Editor (https://xdsoft.net/jodit/)
22568
22614
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -22577,43 +22623,45 @@ class Command {
22577
22623
 
22578
22624
 
22579
22625
 
22580
-
22581
-
22582
- jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22626
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
22583
22627
  enable: true,
22584
22628
  maxHistoryLength: Infinity,
22585
22629
  timeout: 1000
22586
22630
  };
22587
22631
  /**
22588
22632
  * The module monitors the status of the editor and creates / deletes the required number of Undo / Redo shots .
22589
- */ class History extends jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_2__.ViewComponent {
22633
+ */ class History extends jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_1__.ViewComponent {
22590
22634
  /** @override */ className() {
22591
22635
  return 'History';
22592
22636
  }
22593
22637
  /**
22594
22638
  * Return state of the WYSIWYG editor to step back
22595
22639
  */ redo() {
22640
+ this.__processPendingChanges();
22596
22641
  if (this.__stack.redo()) {
22597
22642
  this.startValue = this.snapshot.make();
22598
22643
  this.fireChangeStack();
22599
22644
  }
22600
22645
  }
22601
22646
  canRedo() {
22602
- return this.__stack.canRedo();
22647
+ return !this.__hasPendingChanges && this.__stack.canRedo();
22603
22648
  }
22604
22649
  /**
22605
22650
  * Return the state of the WYSIWYG editor to step forward
22606
22651
  */ undo() {
22652
+ this.__processPendingChanges();
22607
22653
  if (this.__stack.undo()) {
22608
22654
  this.startValue = this.snapshot.make();
22609
22655
  this.fireChangeStack();
22610
22656
  }
22611
22657
  }
22612
22658
  canUndo() {
22613
- return this.__stack.canUndo();
22659
+ return this.__hasPendingChanges || this.__stack.canUndo();
22614
22660
  }
22615
22661
  clear() {
22616
22662
  this.startValue = this.snapshot.make();
22663
+ this.async.clearTimeout(this.__timer);
22664
+ this.__hasPendingChanges = false;
22617
22665
  this.__stack.clear();
22618
22666
  this.fireChangeStack();
22619
22667
  }
@@ -22633,9 +22681,29 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22633
22681
  this.updateTick += 1;
22634
22682
  }
22635
22683
  /**
22636
- * Push new command in stack on some changes
22684
+ * Push new command in stack on some changes. The first change opens a
22685
+ * step, and later ones join it until `history.timeout` has passed,
22686
+ * however close together they come.
22637
22687
  */ onChange() {
22638
- this.__processChanges();
22688
+ // A transaction is over by the time the step is recorded, so it is
22689
+ // checked now
22690
+ if (this.snapshot.isBlocked || this.__hasPendingChanges) {
22691
+ return;
22692
+ }
22693
+ this.__hasPendingChanges = true;
22694
+ this.__timer = this.async.setTimeout(()=>this.__processPendingChanges(), this.j.o.history.timeout);
22695
+ // With a timeout of 0 the step is already recorded. Otherwise
22696
+ // canUndo and canRedo count it from now
22697
+ if (this.__hasPendingChanges) {
22698
+ this.fireChangeStack();
22699
+ }
22700
+ }
22701
+ /**
22702
+ * Push the open step's changes now
22703
+ */ __processPendingChanges() {
22704
+ if (this.__hasPendingChanges) {
22705
+ this.__processChanges();
22706
+ }
22639
22707
  }
22640
22708
  /**
22641
22709
  * @internal
@@ -22643,13 +22711,15 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22643
22711
  if (this.snapshot.isBlocked || !this.j.o.history.enable) {
22644
22712
  return;
22645
22713
  }
22714
+ this.async.clearTimeout(this.__timer);
22715
+ this.__hasPendingChanges = false;
22646
22716
  this.updateStack();
22647
22717
  }
22648
22718
  /**
22649
22719
  * Update history stack
22650
22720
  */ updateStack(replace = false) {
22651
22721
  const newValue = this.snapshot.make();
22652
- if (_snapshot__WEBPACK_IMPORTED_MODULE_6__.Snapshot.equal(newValue, this.startValue)) {
22722
+ if (_snapshot__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
22653
22723
  return;
22654
22724
  }
22655
22725
  // Only the selection moved, for example when the selection markers
@@ -22659,7 +22729,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22659
22729
  this.startValue = newValue;
22660
22730
  return;
22661
22731
  }
22662
- const newCommand = new _command__WEBPACK_IMPORTED_MODULE_5__.Command(this.startValue, newValue, this, this.updateTick);
22732
+ const newCommand = new _command__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
22663
22733
  if (replace) {
22664
22734
  const command = this.__stack.current();
22665
22735
  if (command && this.updateTick === command.tick) {
@@ -22685,8 +22755,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22685
22755
  this.snapshot.destruct();
22686
22756
  super.destruct();
22687
22757
  }
22688
- constructor(editor, stack = new _stack__WEBPACK_IMPORTED_MODULE_7__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot__WEBPACK_IMPORTED_MODULE_6__.Snapshot(editor)){
22689
- super(editor), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__startValue", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__stack", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "snapshot", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "updateTick", 0);
22758
+ constructor(editor, stack = new _stack__WEBPACK_IMPORTED_MODULE_5__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot__WEBPACK_IMPORTED_MODULE_4__.Snapshot(editor)){
22759
+ super(editor), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__startValue", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__stack", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "snapshot", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "updateTick", 0), /**
22760
+ * A step is open: changes have come in that are not in the stack yet
22761
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__hasPendingChanges", false), /**
22762
+ * Records the open step `history.timeout` after its first change
22763
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__timer", 0);
22690
22764
  this.__stack = stack;
22691
22765
  this.snapshot = snapshot;
22692
22766
  if (editor.o.history.enable) {
@@ -22697,6 +22771,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22697
22771
  this.startValue = this.snapshot.make();
22698
22772
  editor.events// save selection
22699
22773
  .on('internalChange internalUpdate', ()=>{
22774
+ this.__processPendingChanges();
22700
22775
  this.startValue = this.snapshot.make();
22701
22776
  }).on(editor.editor, [
22702
22777
  'changeSelection',
@@ -22710,14 +22785,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22710
22785
  if (this.startValue.html === this.j.getNativeEditorValue()) {
22711
22786
  this.startValue = this.snapshot.make();
22712
22787
  }
22713
- }).on(this, 'change.history', this.onChange);
22788
+ }).on(this, 'change.history', ()=>this.onChange());
22714
22789
  });
22715
22790
  }
22716
22791
  }
22717
22792
  }
22718
- ;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
22719
- (0,jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.debounce)()
22720
- ], History.prototype, "onChange", null);
22721
22793
 
22722
22794
 
22723
22795
  /***/ }),
@@ -24319,7 +24391,9 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24319
24391
  const columnsCount = Table.__getColumnsCount(table);
24320
24392
  row = create.element('tr');
24321
24393
  for(let j = 0; j < columnsCount; j += 1){
24322
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(row, create.element('td'));
24394
+ const cell = create.element('td');
24395
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(cell, create.element('br'));
24396
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(row, cell);
24323
24397
  }
24324
24398
  } else {
24325
24399
  row = line.cloneNode(true);
@@ -24336,6 +24410,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24336
24410
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.each(row, (cell)=>{
24337
24411
  if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isCell(cell)) {
24338
24412
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.detach(cell);
24413
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(cell, create.element('br'));
24339
24414
  }
24340
24415
  });
24341
24416
  }
@@ -24424,6 +24499,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24424
24499
  const cells = box[i];
24425
24500
  if (cells[columnIndex] !== cells[newColumnIndex] || columnIndex === newColumnIndex) {
24426
24501
  const cell = this.j.createInside.element('td');
24502
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(cell, this.j.createInside.element('br'));
24427
24503
  if (insertAfter) {
24428
24504
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.after(cells[columnIndex], cell);
24429
24505
  } else {
@@ -24647,7 +24723,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24647
24723
  Table.__setColumnWidthByDelta(table, first_j, 0, true, __marked);
24648
24724
  }
24649
24725
  }
24650
- first.innerHTML = html.join('<br/>');
24726
+ first.innerHTML = html.join('<br/>') || '<br/>';
24651
24727
  instance(jodit).addSelection(first);
24652
24728
  alreadyMerged.delete(first);
24653
24729
  Table.__unmark(__marked);
@@ -26905,8 +26981,8 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
26905
26981
  const box = (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__.TabsWidget)(editor, tabs);
26906
26982
  // Marks this popup so its tabs auto-size to their labels (see
26907
26983
  // `.jodit-file-selector` in tabs.less) — long localized tab captions are no
26908
- // longer clipped — while leaving other tab popups (link, video …)
26909
- // untouched.
26984
+ // longer clipped — while leaving other tab popups (link …) untouched. The
26985
+ // video popup, which has an Upload tab too, uses it as well.
26910
26986
  box.classList.add('jodit-file-selector');
26911
26987
  return box;
26912
26988
  };
@@ -27991,6 +28067,10 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugin {
27991
28067
  if (!sel.isFocused()) {
27992
28068
  sel.focus();
27993
28069
  }
28070
+ // Focused with no range, as WebKit leaves it after a click on an embed
28071
+ if (!sel.isInsideArea) {
28072
+ return;
28073
+ }
27994
28074
  if ((0,_cases_check_not_collapsed__WEBPACK_IMPORTED_MODULE_8__.checkNotCollapsed)(jodit)) {
27995
28075
  jodit.e.fire('backSpaceAfterDelete', backspace);
27996
28076
  return false;
@@ -29191,7 +29271,8 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
29191
29271
  /* harmony import */ var jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48155);
29192
29272
  /* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18855);
29193
29273
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11173);
29194
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54053);
29274
+ /* harmony import */ var _helpers_visitor_filters_replace_old_tags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(35104);
29275
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54053);
29195
29276
  /*!
29196
29277
  * Jodit Editor (https://xdsoft.net/jodit/)
29197
29278
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -29210,6 +29291,7 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
29210
29291
 
29211
29292
 
29212
29293
 
29294
+
29213
29295
  /**
29214
29296
  * Clean HTML after removeFormat and insertHorizontalRule command
29215
29297
  */ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
@@ -29234,18 +29316,18 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
29234
29316
  }
29235
29317
  startWalker() {
29236
29318
  const { jodit } = this;
29237
- const allow = (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.getHash)(this.j.o.cleanHTML.allowTags);
29238
- const deny = (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.getHash)(this.j.o.cleanHTML.denyTags);
29239
- this.walker.on('visit', (node)=>(0,_helpers__WEBPACK_IMPORTED_MODULE_9__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
29319
+ const allow = (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.getHash)(this.j.o.cleanHTML.allowTags);
29320
+ const deny = (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.getHash)(this.j.o.cleanHTML.denyTags);
29321
+ this.walker.on('visit', (node)=>(0,_helpers__WEBPACK_IMPORTED_MODULE_10__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
29240
29322
  this.j.e.fire(affected ? 'internalChange finishedCleanHTMLWorker' : 'finishedCleanHTMLWorker');
29241
29323
  });
29242
29324
  }
29243
29325
  beforeCommand(command) {
29244
29326
  if (command.toLowerCase() === 'removeformat') {
29245
29327
  if (this.j.s.isCollapsed()) {
29246
- (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.removeFormatForCollapsedSelection)(this.j);
29328
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.removeFormatForCollapsedSelection)(this.j);
29247
29329
  } else {
29248
- (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.removeFormatForSelection)(this.j);
29330
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.removeFormatForSelection)(this.j);
29249
29331
  }
29250
29332
  return false;
29251
29333
  }
@@ -29271,6 +29353,7 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
29271
29353
  ];
29272
29354
  sandBox.innerHTML = data.value;
29273
29355
  this.j.e.fire('safeHTML', sandBox);
29356
+ this.__replaceOldTags(sandBox);
29274
29357
  data.value = sandBox.innerHTML;
29275
29358
  (0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, {
29276
29359
  safeJavaScriptLink: true,
@@ -29279,6 +29362,20 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
29279
29362
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(iframe);
29280
29363
  return false;
29281
29364
  }
29365
+ /**
29366
+ * Replace old tags (`<b>` with `<strong>`, `<i>` with `<em>`) in an
29367
+ * assigned value straight away. The walker would get to them only after
29368
+ * every node before them, seconds later on a long document, and until
29369
+ * then Bold does not treat `<b>` as bold, and the swap can move the caret.
29370
+ */ __replaceOldTags(box) {
29371
+ const { replaceOldTags: list, disableCleanFilter } = this.j.o.cleanHTML;
29372
+ if (!list || (disableCleanFilter === null || disableCleanFilter === void 0 ? void 0 : disableCleanFilter.has('replaceOldTags'))) {
29373
+ return;
29374
+ }
29375
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.each(box, (node)=>{
29376
+ ;(0,_helpers_visitor_filters_replace_old_tags__WEBPACK_IMPORTED_MODULE_9__.replaceOldTags)(this.j, node, false);
29377
+ });
29378
+ }
29282
29379
  /**
29283
29380
  * Collapse a value that holds only a single empty block (e.g.
29284
29381
  * `<p><br></p>` left after deleting all content) to an empty string —
@@ -30012,10 +30109,33 @@ __webpack_require__.r(__webpack_exports__);
30012
30109
  }
30013
30110
  const tagName = list[oldParent.nodeName.toLowerCase()] || list[oldParent.nodeName];
30014
30111
  if (tagName) {
30015
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
30112
+ const restoreSelection = keepSelection(jodit, oldParent);
30113
+ const newParent = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
30114
+ restoreSelection === null || restoreSelection === void 0 ? void 0 : restoreSelection(newParent);
30115
+ return newParent;
30016
30116
  }
30017
30117
  return oldParent;
30018
30118
  }
30119
+ /**
30120
+ * Moving the children out of an element collapses a selection inside them to
30121
+ * where the element was, so the caret jumps to the start of the text being
30122
+ * typed. Returns a callback that puts the selection back on the same nodes.
30123
+ *
30124
+ * Like `removeEmptyTextNode`, it leaves the selection alone once focus has
30125
+ * left the editor, because selecting would take focus back.
30126
+ */ function keepSelection(jodit, elm) {
30127
+ const { sel } = jodit.s;
30128
+ if (!(sel === null || sel === void 0 ? void 0 : sel.anchorNode) || !sel.focusNode || !jodit.s.isFocused()) {
30129
+ return null;
30130
+ }
30131
+ const { anchorNode, anchorOffset, focusNode, focusOffset } = sel;
30132
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(elm, anchorNode) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(elm, focusNode)) {
30133
+ return null;
30134
+ }
30135
+ return (newElm)=>{
30136
+ sel.setBaseAndExtent(anchorNode === elm ? newElm : anchorNode, anchorOffset, focusNode === elm ? newElm : focusNode, focusOffset);
30137
+ };
30138
+ }
30019
30139
 
30020
30140
 
30021
30141
  /***/ }),
@@ -31973,9 +32093,32 @@ const brBoxes = new Set([
31973
32093
  * @module plugins/dtd
31974
32094
  * @internal
31975
32095
  */
32096
+ /**
32097
+ * Moves the cursor out of a block that can't hold the inserted block: before
32098
+ * or after it when the cursor is at its edge, or between its two halves when
32099
+ * the cursor is inside its content. An empty block is removed
32100
+ */ function moveCursorOutOf(jodit, parent) {
32101
+ var _s_splitSelection;
32102
+ const { s } = jodit;
32103
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
32104
+ s.setCursorAfter(parent);
32105
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
32106
+ return;
32107
+ }
32108
+ if (s.cursorOnTheRight(parent)) {
32109
+ s.setCursorAfter(parent);
32110
+ return;
32111
+ }
32112
+ if (s.cursorOnTheLeft(parent)) {
32113
+ s.setCursorBefore(parent);
32114
+ return;
32115
+ }
32116
+ s.setCursorAfter((_s_splitSelection = s.splitSelection(parent)) !== null && _s_splitSelection !== void 0 ? _s_splitSelection : parent);
32117
+ }
31976
32118
  /**
31977
32119
  * Checks whether the insertion of an element at the current location is allowed,
31978
- * if it is not allowed, it deletes an empty block element or moves the cursor after it
32120
+ * if it is not allowed, it deletes an empty block element, moves the cursor
32121
+ * before or after it, or splits it at the cursor
31979
32122
  * @internal
31980
32123
  */ function checkBlockNesting(jodit, node) {
31981
32124
  if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(node)) {
@@ -32005,10 +32148,7 @@ const brBoxes = new Set([
32005
32148
  parent = current;
32006
32149
  }
32007
32150
  if (parent) {
32008
- jodit.s.setCursorAfter(parent);
32009
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
32010
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
32011
- }
32151
+ moveCursorOutOf(jodit, parent);
32012
32152
  }
32013
32153
  }
32014
32154
  }
@@ -32538,7 +32678,14 @@ function brBefore(start) {
32538
32678
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(link, fake);
32539
32679
  } else if (s.cursorOnTheLeft(link, fake)) {
32540
32680
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.before(link, fake);
32681
+ } else {
32682
+ return;
32541
32683
  }
32684
+ // The block is split at the caret, so the caret leaves the link too:
32685
+ // beside the fake, since Safari mislays a caret inside a removed node
32686
+ const range = s.createRange();
32687
+ range.setStartBefore(fake);
32688
+ s.selectRange(range);
32542
32689
  }
32543
32690
  }
32544
32691
 
@@ -32784,9 +32931,10 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
32784
32931
 
32785
32932
  "use strict";
32786
32933
  /* unused harmony export focus */
32787
- /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27795);
32788
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
32789
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5266);
32934
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
32935
+ /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
32936
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28077);
32937
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5266);
32790
32938
  /*!
32791
32939
  * Jodit Editor (https://xdsoft.net/jodit/)
32792
32940
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -32798,15 +32946,16 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
32798
32946
  */
32799
32947
 
32800
32948
 
32949
+
32801
32950
  /**
32802
32951
  * After loading the page into the editor once the focus is set
32803
- */ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.autofocus = false;
32952
+ */ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.autofocus = false;
32804
32953
  /**
32805
32954
  * Cursor position after autofocus
32806
- */ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.cursorAfterAutofocus = 'end';
32955
+ */ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.cursorAfterAutofocus = 'end';
32807
32956
  /**
32808
32957
  * Save current selection on blur event
32809
- */ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
32958
+ */ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.saveSelectionOnBlur = true;
32810
32959
  function focus(editor) {
32811
32960
  if (editor.o.saveSelectionOnBlur) {
32812
32961
  // A click that brings focus back places the caret itself, and Chrome
@@ -32838,10 +32987,10 @@ function focus(editor) {
32838
32987
  let textNode = null;
32839
32988
  switch(editor.o.cursorAfterAutofocus){
32840
32989
  case 'start':
32841
- textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.first(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
32990
+ textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.first(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
32842
32991
  break;
32843
32992
  case 'end':
32844
- textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.last(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
32993
+ textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.last(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
32845
32994
  break;
32846
32995
  }
32847
32996
  if (textNode) {
@@ -32859,7 +33008,8 @@ function focus(editor) {
32859
33008
  });
32860
33009
  editor.e.on('afterInit afterAddPlace', ()=>{
32861
33010
  editor.e.off(editor.editor, 'mousedown.autofocus').on(editor.editor, 'mousedown.autofocus', (e)=>{
32862
- if (editor.isEditorMode() && e.target && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(e.target) && !e.target.childNodes.length) {
33011
+ // An empty block takes the caret, but a video, say, can't hold one
33012
+ if (editor.isEditorMode() && e.target && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(e.target) && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(e.target, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && !e.target.childNodes.length) {
32863
33013
  if (editor.editor === e.target) {
32864
33014
  editor.s.focus();
32865
33015
  } else {
@@ -32869,7 +33019,7 @@ function focus(editor) {
32869
33019
  });
32870
33020
  });
32871
33021
  }
32872
- jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
33022
+ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('focus', focus);
32873
33023
 
32874
33024
 
32875
33025
  /***/ }),
@@ -34049,18 +34199,29 @@ function hr(editor) {
34049
34199
  group: 'insert'
34050
34200
  });
34051
34201
  editor.registerCommand('insertHorizontalRule', ()=>{
34202
+ var _editor_o_dtd;
34052
34203
  const elm = editor.createInside.element('hr');
34053
34204
  editor.s.insertNode(elm, false, false);
34054
34205
  const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm.parentElement, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor);
34055
- if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor) {
34206
+ // A block that holds other blocks, such as a list item or a table
34207
+ // cell, keeps the line
34208
+ if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor && !((_editor_o_dtd = editor.o.dtd) === null || _editor_o_dtd === void 0 ? void 0 : _editor_o_dtd.blockLimits[block.nodeName.toLowerCase()])) {
34056
34209
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(block, elm);
34057
34210
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(block);
34058
34211
  }
34059
- let p = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.next(elm, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor, false);
34060
- if (!p) {
34061
- p = editor.createInside.element(editor.o.enter);
34062
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
34212
+ const next = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, false);
34213
+ if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(next)) {
34214
+ editor.s.setCursorIn(next, true);
34215
+ return false;
34063
34216
  }
34217
+ // In a list item or a table cell the text goes on after the line, as
34218
+ // it does with the browsers' own command
34219
+ if (next || elm.parentNode !== editor.editor && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, true))) {
34220
+ editor.s.setCursorAfter(elm);
34221
+ return false;
34222
+ }
34223
+ const p = editor.createInside.element(editor.o.enter);
34224
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
34064
34225
  editor.s.setCursorIn(p);
34065
34226
  return false;
34066
34227
  });
@@ -34086,7 +34247,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
34086
34247
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
34087
34248
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
34088
34249
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
34089
- jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '.jodit_editor .jodit_iframe_wrapper{' + 'display: block;' + 'clear: both;' + 'user-select: none;' + 'position: relative;' + '}' + '.jodit_editor .jodit_iframe_wrapper:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
34250
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '[data-jodit_iframe_wrapper]{' + 'display: block;' + 'user-select: none;' + 'position: relative;' + '}' + '[data-jodit_iframe_wrapper] iframe{' + 'position: relative;' + '}' + '[data-jodit_iframe_wrapper]:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '[data-jodit_iframe_wrapper][data-jodit-wrapper_active=true] iframe{' + 'z-index: 2;' + '}' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
34090
34251
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
34091
34252
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
34092
34253
 
@@ -36905,16 +37066,18 @@ const align = {
36905
37066
  "use strict";
36906
37067
  /* unused harmony export inlinePopup */
36907
37068
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
36908
- /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
36909
- /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84839);
36910
- /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27795);
36911
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28077);
36912
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65946);
36913
- /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91206);
36914
- /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4099);
36915
- /* harmony import */ var jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(56490);
36916
- /* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(4274);
36917
- /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(89873);
37069
+ /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41411);
37070
+ /* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15366);
37071
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
37072
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84839);
37073
+ /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27795);
37074
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28077);
37075
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65946);
37076
+ /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(91206);
37077
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(4099);
37078
+ /* harmony import */ var jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(56490);
37079
+ /* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4274);
37080
+ /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(89873);
36918
37081
  /*!
36919
37082
  * Jodit Editor (https://xdsoft.net/jodit/)
36920
37083
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36935,24 +37098,45 @@ const align = {
36935
37098
 
36936
37099
 
36937
37100
 
37101
+
37102
+
36938
37103
  /**
36939
37104
  * Plugin for show inline popup dialog
36940
- */ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
37105
+ */ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_8__.Plugin {
36941
37106
  get popup() {
36942
- return new jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_8__.Popup(this.jodit, false);
37107
+ return new jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_10__.Popup(this.jodit, false);
36943
37108
  }
36944
37109
  get toolbar() {
36945
- return (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_9__.makeCollection)(this.jodit, this.popup);
37110
+ return (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_11__.makeCollection)(this.jodit, this.popup);
36946
37111
  }
36947
37112
  onClick(node) {
36948
- const elements = this.elmsList, mediaWrapper = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(node, 'img') ? node : jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.closest(node, elements, this.j.editor);
37113
+ const elements = this.elmsList, mediaWrapper = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(node, 'img') ? node : jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.closest(node, elements, this.j.editor);
36949
37114
  // A media wrapper kept in the content gets the media popup
36950
37115
  const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
36951
37116
  if (target && type && this.canShowPopupForType(type)) {
36952
- this.showPopup(()=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(target, this.j), type, target);
37117
+ const isMedia = type === 'jodit-media';
37118
+ // Beside the media in a wrapper kept in the content, which can fill
37119
+ // the line
37120
+ const bound = mediaWrapper && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.getWrappedMedia)(this.j, mediaWrapper) || target;
37121
+ this.showPopup(()=>this.__bound(bound, isMedia), type, target);
36953
37122
  return false;
36954
37123
  }
36955
37124
  }
37125
+ /**
37126
+ * The box the popup opens beside: the target's, with room for the
37127
+ * resizer's handles when the target gets them, so it doesn't cover them
37128
+ */ __bound(target, isMedia) {
37129
+ const bound = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.position)(target, this.j);
37130
+ const resizable = this.j.o.allowResizeTags;
37131
+ if (!isMedia && !(resizable && jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(target, resizable))) {
37132
+ return bound;
37133
+ }
37134
+ const room = parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue('--jd-resizer-handle-size'), 10) / 2 || 0;
37135
+ return (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, bound), {
37136
+ top: bound.top - room,
37137
+ height: bound.height + room * 2
37138
+ });
37139
+ }
36956
37140
  /**
36957
37141
  * Show inline popup with some toolbar
36958
37142
  *
@@ -36966,15 +37150,15 @@ const align = {
36966
37150
  this.previousTarget = target;
36967
37151
  const data = this.j.o.popup[type];
36968
37152
  let content;
36969
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(data)) {
37153
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isFunction)(data)) {
36970
37154
  content = data(this.j, target, this.popup.close);
36971
37155
  } else {
36972
37156
  content = data;
36973
37157
  }
36974
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isArray)(content)) {
37158
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isArray)(content)) {
36975
37159
  const disabled = this.j.o.toolbarInlineDisabledButtons;
36976
37160
  this.toolbar.build(disabled.length ? content.filter((item)=>{
36977
- const name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(item) ? item : item.name;
37161
+ const name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isString)(item) ? item : item.name;
36978
37162
  return !disabled.includes(name !== null && name !== void 0 ? name : '');
36979
37163
  }) : content, target);
36980
37164
  this.toolbar.buttonSize = this.j.o.toolbarButtonSize;
@@ -36989,7 +37173,7 @@ const align = {
36989
37173
  /**
36990
37174
  * Hide opened popup
36991
37175
  */ hidePopup(type) {
36992
- if (this.popup.isOpened && (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(type) || type === this.type)) {
37176
+ if (this.popup.isOpened && (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isString)(type) || type === this.type)) {
36993
37177
  this.popup.close();
36994
37178
  }
36995
37179
  }
@@ -37008,19 +37192,19 @@ const align = {
37008
37192
  /**
37009
37193
  * For some elements do not show popup
37010
37194
  */ isExcludedTarget(type) {
37011
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.splitArray)(this.j.o.toolbarInlineDisableFor).map((a)=>a.toLowerCase()).includes(type.toLowerCase());
37195
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.splitArray)(this.j.o.toolbarInlineDisableFor).map((a)=>a.toLowerCase()).includes(type.toLowerCase());
37012
37196
  }
37013
37197
  /** @override **/ afterInit(jodit) {
37014
37198
  this.j.e.on('getDiffButtons.mobile', (toolbar)=>{
37015
37199
  if (this.toolbar === toolbar) {
37016
37200
  const names = this.toolbar.getButtonsNames();
37017
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.toArray)(jodit.registeredButtons).filter((btn)=>!this.j.o.toolbarInlineDisabledButtons.includes(btn.name)).filter((item)=>{
37018
- const name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(item) ? item : item.name;
37201
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.toArray)(jodit.registeredButtons).filter((btn)=>!this.j.o.toolbarInlineDisabledButtons.includes(btn.name)).filter((item)=>{
37202
+ const name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isString)(item) ? item : item.name;
37019
37203
  return name && name !== '|' && name !== '\n' && !names.includes(name);
37020
37204
  });
37021
37205
  }
37022
37206
  }).on('hidePopup', this.hidePopup).on('showInlineToolbar', this.showInlineToolbar).on('showPopup', (elm, rect, type)=>{
37023
- this.showPopup(rect, type || ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(elm) ? elm : elm.nodeName), (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(elm) ? undefined : elm);
37207
+ this.showPopup(rect, type || ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isString)(elm) ? elm : elm.nodeName), (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isString)(elm) ? undefined : elm);
37024
37208
  }).on('mousedown keydown', this.onSelectionStart).on('change', ()=>{
37025
37209
  if (this.popup.isOpened && this.previousTarget && !this.previousTarget.parentNode) {
37026
37210
  this.hidePopup();
@@ -37036,7 +37220,7 @@ const align = {
37036
37220
  this.addListenersForElements();
37037
37221
  }
37038
37222
  __onDocumentMouseDown(e) {
37039
- if (this.popup.isOpened && this.type === 'selection' && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_8__.Popup)) {
37223
+ if (this.popup.isOpened && this.type === 'selection' && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_9__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_10__.Popup)) {
37040
37224
  this.__reopenSelectionPopup = true;
37041
37225
  }
37042
37226
  }
@@ -37066,7 +37250,7 @@ const align = {
37066
37250
  const rect = this.j.s.range.getBoundingClientRect();
37067
37251
  let { left, top } = rect;
37068
37252
  if (this.j.iframe) {
37069
- const offset = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(this.j.iframe, this.j, true);
37253
+ const offset = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.position)(this.j.iframe, this.j, true);
37070
37254
  left += offset.left;
37071
37255
  top += offset.top;
37072
37256
  }
@@ -37081,7 +37265,7 @@ const align = {
37081
37265
  this.snapRange = this.j.s.range.cloneRange();
37082
37266
  }
37083
37267
  onSelectionEnd(e) {
37084
- if (e && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_8__.Popup)) {
37268
+ if (e && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_9__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_10__.Popup)) {
37085
37269
  return;
37086
37270
  }
37087
37271
  const { snapRange } = this, { range } = this.j.s;
@@ -37114,7 +37298,7 @@ const align = {
37114
37298
  * In not collapsed selection - only one image
37115
37299
  */ isSelectedTarget(r) {
37116
37300
  const sc = r.startContainer;
37117
- return jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isElement(sc) && sc === r.endContainer && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(sc.childNodes[r.startOffset], new Set((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.keys)(this.j.o.popup, false))) && r.startOffset === r.endOffset - 1;
37301
+ return jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isElement(sc) && sc === r.endContainer && jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(sc.childNodes[r.startOffset], new Set((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.keys)(this.j.o.popup, false))) && r.startOffset === r.endOffset - 1;
37118
37302
  }
37119
37303
  /**
37120
37304
  * Shortcut for Table module
@@ -37138,7 +37322,7 @@ const align = {
37138
37322
  const el = [
37139
37323
  ...new Set(this.elmsList.concat(wrapperTags))
37140
37324
  ];
37141
- return el.map((e)=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.camelCase)(`click_${e}`)).concat(el.map((e)=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.camelCase)(`touchstart_${e}`))).join(' ');
37325
+ return el.map((e)=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.camelCase)(`click_${e}`)).concat(el.map((e)=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.camelCase)(`touchstart_${e}`))).join(' ');
37142
37326
  }
37143
37327
  addListenersForElements() {
37144
37328
  this.j.e.on(this._eventsList(), this.onClick);
@@ -37162,54 +37346,54 @@ const align = {
37162
37346
  * The user pressed a button inside the selection toolbar — after the
37163
37347
  * command fires `closeAllPopups`, the toolbar should be shown again
37164
37348
  * while the selection is still there. See #1238
37165
- */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "elmsList", (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.keys)(this.j.o.popup, false).filter((s)=>!this.isExcludedTarget(s)));
37349
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "elmsList", (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.keys)(this.j.o.popup, false).filter((s)=>!this.isExcludedTarget(s)));
37166
37350
  }
37167
37351
  }
37168
37352
  ;(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(inlinePopup, "requires", [
37169
37353
  'select'
37170
37354
  ]);
37171
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37172
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
37355
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37356
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.cache
37173
37357
  ], inlinePopup.prototype, "popup", null);
37174
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37175
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
37358
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37359
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.cache
37176
37360
  ], inlinePopup.prototype, "toolbar", null);
37177
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37178
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37361
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37362
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37179
37363
  ], inlinePopup.prototype, "onClick", null);
37180
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37181
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.wait)((ctx)=>!ctx.j.isLocked)
37364
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37365
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.wait)((ctx)=>!ctx.j.isLocked)
37182
37366
  ], inlinePopup.prototype, "showPopup", null);
37183
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37184
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)([
37367
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37368
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.watch)([
37185
37369
  ':clickEditor',
37186
37370
  ':beforeCommandDelete',
37187
37371
  ':backSpaceAfterDelete'
37188
37372
  ]),
37189
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37373
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37190
37374
  ], inlinePopup.prototype, "hidePopup", null);
37191
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37192
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':outsideClick')
37375
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37376
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.watch)(':outsideClick')
37193
37377
  ], inlinePopup.prototype, "onOutsideClick", null);
37194
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37195
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37378
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37379
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37196
37380
  ], inlinePopup.prototype, "__onDocumentMouseDown", null);
37197
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37198
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37381
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37382
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37199
37383
  ], inlinePopup.prototype, "__onCloseAllPopups", null);
37200
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37201
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37384
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37385
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37202
37386
  ], inlinePopup.prototype, "onSelectionStart", null);
37203
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37204
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37387
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37388
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37205
37389
  ], inlinePopup.prototype, "onSelectionEnd", null);
37206
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37207
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.debounce)((ctx)=>ctx.defaultTimeout)
37390
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37391
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.debounce)((ctx)=>ctx.defaultTimeout)
37208
37392
  ], inlinePopup.prototype, "onSelectionChange", null);
37209
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
37210
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
37393
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
37394
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
37211
37395
  ], inlinePopup.prototype, "showInlineToolbar", null);
37212
- jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('inlinePopup', inlinePopup);
37396
+ jodit_core_global__WEBPACK_IMPORTED_MODULE_6__.pluginSystem.add('inlinePopup', inlinePopup);
37213
37397
 
37214
37398
 
37215
37399
  /***/ }),
@@ -38253,7 +38437,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
38253
38437
  height: (_jodit_o_video2 = jodit.o.video) === null || _jodit_o_video2 === void 0 ? void 0 : _jodit_o_video2.defaultHeight
38254
38438
  });
38255
38439
  if (embed !== html) {
38256
- return jodit.createInside.fromHTML(embed);
38440
+ const media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.prepareEmbedCode)(jodit, embed);
38441
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
38257
38442
  }
38258
38443
  }
38259
38444
  if (jodit.s.isCollapsed()) {
@@ -38741,10 +38926,27 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
38741
38926
  } else {
38742
38927
  return;
38743
38928
  }
38929
+ // Selected, as an image is, so Delete and Backspace remove it
38744
38930
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
38745
- editor.s.setCursorAfter(element);
38931
+ editor.s.select(element);
38746
38932
  });
38747
38933
  };
38934
+ // Media in a wrapper kept in the content let clicks through to it, as
38935
+ // jodit-media covers its media, so a click selects the media rather than
38936
+ // playing it. An inline wrapper holds it as an inline-block, unless its
38937
+ // classes or style give it a display of their own
38938
+ const wrappers = Object.values(mediaWrappers);
38939
+ if (wrappers.length) {
38940
+ editor.e.on('afterInit', ()=>{
38941
+ const selectors = (list)=>[
38942
+ ...new Set(list)
38943
+ ].join(',');
38944
+ const scoped = ({ tag, className })=>`.jodit-wysiwyg ${tag}.${className}`;
38945
+ const inline = selectors(wrappers.filter(({ tag })=>jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE.test(tag)).map(scoped));
38946
+ const media = selectors(wrappers.flatMap((wrapper)=>mediaBlocks.map((tag)=>`${scoped(wrapper)}>${tag}`)));
38947
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.getContainer)(editor, 'media-wrappers', 'style', true).innerHTML = (inline ? `:where(${inline}){display:inline-block}` : '') + `${media}{pointer-events:none}`;
38948
+ });
38949
+ }
38748
38950
  if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
38749
38951
  editor.e.on('afterGetValueFromEditor', (data)=>{
38750
38952
  const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
@@ -39646,12 +39848,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39646
39848
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39647
39849
  /* harmony export */ askInsertTypeDialog: function() { return /* binding */ askInsertTypeDialog; },
39648
39850
  /* harmony export */ getAllTypes: function() { return /* binding */ getAllTypes; },
39649
- /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; }
39851
+ /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; },
39852
+ /* harmony export */ removeGoogleDocsWrapper: function() { return /* binding */ removeGoogleDocsWrapper; }
39650
39853
  /* harmony export */ });
39651
39854
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
39652
39855
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
39653
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28686);
39654
- /* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53681);
39856
+ /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88475);
39857
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28686);
39858
+ /* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53681);
39655
39859
  /*!
39656
39860
  * Jodit Editor (https://xdsoft.net/jodit/)
39657
39861
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -39662,6 +39866,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39662
39866
 
39663
39867
 
39664
39868
 
39869
+
39665
39870
  /**
39666
39871
  * Remove special HTML comments
39667
39872
  * @private
@@ -39677,6 +39882,21 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39677
39882
  }
39678
39883
  return html;
39679
39884
  }
39885
+ /**
39886
+ * Google Docs wraps the copied content in
39887
+ * `<b style="font-weight:normal;" id="docs-internal-guid-…">`. Kept, the
39888
+ * wrapper holds the pasted blocks, and without its style it makes the whole
39889
+ * paste bold
39890
+ * @private
39891
+ */ function removeGoogleDocsWrapper(html) {
39892
+ if (!/<b\s[^>]*docs-internal-guid-/i.test(html)) {
39893
+ return html;
39894
+ }
39895
+ // An inert document: images don't load and handlers don't run
39896
+ const { body } = new DOMParser().parseFromString(html, 'text/html');
39897
+ (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__.toArray)(body.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap);
39898
+ return body.innerHTML;
39899
+ }
39680
39900
  /**
39681
39901
  * @private
39682
39902
  */ function isDragEvent(e) {
@@ -39693,11 +39913,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39693
39913
  editor.s.insertCursorAtPoint(e.clientX, e.clientY);
39694
39914
  }
39695
39915
  const result = editor.e.fire('beforePasteInsert', html);
39696
- if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isVoid)(result) && ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isString)(result) || (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isNumber)(result) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(result))) {
39916
+ if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isVoid)(result) && ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isString)(result) || (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isNumber)(result) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(result))) {
39697
39917
  html = result;
39698
39918
  }
39699
- if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) {
39700
- html = removeExtraFragments(html);
39919
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
39920
+ html = removeExtraFragments(removeGoogleDocsWrapper(html));
39701
39921
  }
39702
39922
  editor.s.insertHTML(html);
39703
39923
  }
@@ -39707,7 +39927,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39707
39927
  */ function getAllTypes(dt) {
39708
39928
  const types = dt.types;
39709
39929
  let types_str = '';
39710
- if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
39930
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
39711
39931
  for(let i = 0; i < types.length; i += 1){
39712
39932
  types_str += types[i] + ';';
39713
39933
  }
@@ -39724,7 +39944,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39724
39944
  return;
39725
39945
  }
39726
39946
  const dialog = jodit.confirm(`<div style="word-break: normal; white-space: normal">${jodit.i18n(msg)}</div>`, jodit.i18n(title));
39727
- const buttons = buttonList.map(({ text, value })=>(0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
39947
+ const buttons = buttonList.map(({ text, value })=>(0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
39728
39948
  text,
39729
39949
  name: text.toLowerCase(),
39730
39950
  tabIndex: 0
@@ -39740,7 +39960,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39740
39960
  }
39741
39961
  jodit.e.fire('afterClosePasteDialog', dialog);
39742
39962
  });
39743
- const cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
39963
+ const cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
39744
39964
  text: 'Cancel',
39745
39965
  tabIndex: 0
39746
39966
  }).onAction(()=>{
@@ -39892,7 +40112,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.paste = {
39892
40112
  this.j.buffer.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.CLIPBOARD_ID, html);
39893
40113
  switch(action){
39894
40114
  case jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.INSERT_CLEAR_HTML:
39895
- html = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.cleanFromWord)(html);
40115
+ html = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.cleanFromWord)((0,_helpers__WEBPACK_IMPORTED_MODULE_9__.removeGoogleDocsWrapper)(html));
39896
40116
  break;
39897
40117
  case jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.INSERT_ONLY_TEXT:
39898
40118
  html = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags), this.j.o.nl2brInPlainText);
@@ -41051,7 +41271,7 @@ const keyBInd = '__jodit-resizer_binded';
41051
41271
  addEventListeners() {
41052
41272
  const editor = this.j;
41053
41273
  editor.e.off(editor.editor, '.resizer').off(editor.ow, '.resizer').on(editor.editor, 'keydown.resizer', (e)=>{
41054
- if (this.isShown && e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.KEY_DELETE && this.element && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(this.element, 'table')) {
41274
+ if (this.isShown && (e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.KEY_DELETE || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.KEY_BACKSPACE) && this.element && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(this.element, 'table')) {
41055
41275
  this.onDelete(e);
41056
41276
  }
41057
41277
  }).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize).on([
@@ -41258,8 +41478,12 @@ const keyBInd = '__jodit-resizer_binded';
41258
41478
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
41259
41479
  this.j.s.select(element);
41260
41480
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
41261
- ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth + 'px');
41262
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight + 'px');
41481
+ // Only a resize sets the embed's size, and as the plain numbers
41482
+ // the attributes take, so a click leaves `width="100%"` alone
41483
+ if (this.isResizeMode) {
41484
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth);
41485
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight);
41486
+ }
41263
41487
  });
41264
41488
  }
41265
41489
  this.j.e.on(element, 'dragstart', this.hide);
@@ -42644,15 +42868,23 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
42644
42868
  this.__tableModule.mergeSelected(table);
42645
42869
  break;
42646
42870
  case 'empty':
42647
- cells.forEach((td)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.detach(td));
42871
+ cells.forEach((td)=>{
42872
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.detach(td);
42873
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.append(td, this.j.createInside.element('br'));
42874
+ });
42648
42875
  break;
42649
42876
  case 'bin':
42650
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(table);
42877
+ this.__removeTable(table);
42651
42878
  break;
42652
42879
  case 'binrow':
42653
- new Set(cells.map((td)=>td.parentNode)).forEach((row)=>{
42654
- this.__tableModule.removeRow(table, row.rowIndex);
42655
- });
42880
+ {
42881
+ const rows = new Set(cells.map((td)=>td.parentNode));
42882
+ const next = this.__nearestCell(table, cell, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.toArray)(rows).map((row)=>row.rowIndex), true);
42883
+ rows.forEach((row)=>{
42884
+ this.__tableModule.removeRow(table, row.rowIndex);
42885
+ });
42886
+ next && this.j.s.setCursorIn(next);
42887
+ }
42656
42888
  break;
42657
42889
  case 'bincolumn':
42658
42890
  {
@@ -42665,9 +42897,11 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
42665
42897
  columnsSet.add(col);
42666
42898
  }
42667
42899
  });
42900
+ const next = this.__nearestCell(table, cell, columns, false);
42668
42901
  columns.sort((a, b)=>b - a).forEach((col)=>{
42669
42902
  this.__tableModule.removeColumn(table, col);
42670
42903
  });
42904
+ next && this.j.s.setCursorIn(next);
42671
42905
  }
42672
42906
  break;
42673
42907
  case 'addcolumnafter':
@@ -42679,10 +42913,36 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
42679
42913
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
42680
42914
  break;
42681
42915
  }
42916
+ if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
42917
+ this.__removeTable(table);
42918
+ }
42682
42919
  }
42683
42920
  return false;
42684
42921
  }
42685
42922
  }
42923
+ /**
42924
+ * The cell that takes the caret when rows or columns are deleted: the next
42925
+ * one in the same column (or row) that is not deleted, else the previous one
42926
+ */ __nearestCell(table, cell, deleted, isRow) {
42927
+ const box = this.__tableModule.formalMatrix(table);
42928
+ const [row, column] = this.__tableModule.formalCoordinate(table, cell);
42929
+ const start = isRow ? row : column;
42930
+ const count = isRow ? box.length : box[row].length;
42931
+ const find = (i)=>!deleted.includes(i) && (isRow ? box[i][column] : box[row][i]) || null;
42932
+ for(let i = start + 1; i < count; i += 1){
42933
+ const next = find(i);
42934
+ if (next) {
42935
+ return next;
42936
+ }
42937
+ }
42938
+ for(let i = start - 1; i >= 0; i -= 1){
42939
+ const prev = find(i);
42940
+ if (prev) {
42941
+ return prev;
42942
+ }
42943
+ }
42944
+ return null;
42945
+ }
42686
42946
  /**
42687
42947
  * Add some align after native command
42688
42948
  */ onAfterCommand(command) {
@@ -42690,6 +42950,14 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
42690
42950
  this.__tableModule.getAllSelectedCells().forEach((elm)=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.alignElement)(command, elm));
42691
42951
  }
42692
42952
  }
42953
+ /**
42954
+ * Remove the table and put the caret where it stood: at the start of what
42955
+ * follows it, else at the end of what precedes it
42956
+ */ __removeTable(table) {
42957
+ const parent = table.parentNode, next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.findNotEmptySibling(table, false), prev = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.findNotEmptySibling(table, true);
42958
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(table);
42959
+ this.j.s.setCursorIn(next || prev || parent, Boolean(next));
42960
+ }
42693
42961
  /** @override */ beforeDestruct(jodit) {
42694
42962
  this.__onRemoveSelection();
42695
42963
  jodit.e.off('.select-cells');
@@ -46023,7 +46291,7 @@ const WORK_KEYS = new Set([
46023
46291
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
46024
46292
  editor.s.setCursorBefore(first);
46025
46293
  } else {
46026
- if (key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
46294
+ if (key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(next)) {
46027
46295
  editor.s.select(next, true);
46028
46296
  } else {
46029
46297
  editor.s.setCursorIn(next, key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN);
@@ -46091,6 +46359,37 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.table = {
46091
46359
  useExtraClassesOptions: false
46092
46360
  };
46093
46361
  jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__.Icon.set('table', (_table_svg__WEBPACK_IMPORTED_MODULE_6___default()));
46362
+ /**
46363
+ * Elements in `dtd.blockLimits` that hold only rows, cells or list items, so
46364
+ * a table can't go directly inside them
46365
+ */ const ROW_AND_ITEM_HOLDERS = new Set([
46366
+ 'table',
46367
+ 'thead',
46368
+ 'tbody',
46369
+ 'tfoot',
46370
+ 'tr',
46371
+ 'ul',
46372
+ 'ol',
46373
+ 'dl'
46374
+ ]);
46375
+ /**
46376
+ * The nearest block around the cursor that can hold the new table: an element
46377
+ * in `dtd.blockLimits`, such as a table cell, a list item or a `<div>`. The
46378
+ * cursor's own block of the `enter` tag is a line, not a container, as in the
46379
+ * dtd plugin's `checkBlockNesting`
46380
+ */ function findTableContainer(editor, current) {
46381
+ const line = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
46382
+ const container = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, (node)=>{
46383
+ var _editor_o_dtd;
46384
+ if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) || node === line && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, editor.o.enter)) {
46385
+ return false;
46386
+ }
46387
+ const tag = node.nodeName.toLowerCase();
46388
+ return Boolean((_editor_o_dtd = editor.o.dtd) === null || _editor_o_dtd === void 0 ? void 0 : _editor_o_dtd.blockLimits[tag]) && !ROW_AND_ITEM_HOLDERS.has(tag);
46389
+ }, editor.editor);
46390
+ // With the cursor between two rows, `current` is the next row's text
46391
+ return container && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(container, editor.s.range.startContainer) ? container : null;
46392
+ }
46094
46393
  jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
46095
46394
  data: {
46096
46395
  cols: 10,
@@ -46188,7 +46487,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
46188
46487
  editor.s.removeMarkers();
46189
46488
  editor.editor.normalize();
46190
46489
  editor.history.snapshot.restore(snapshot);
46191
- const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(editor.s.current(), jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
46490
+ const current = editor.s.current();
46491
+ // The table goes into the cell, list item or box holding the
46492
+ // cursor, and only a block inside it is split
46493
+ const container = findTableContainer(editor, current);
46494
+ const block = container === current ? null : jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, container !== null && container !== void 0 ? container : editor.editor);
46192
46495
  if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(block)) {
46193
46496
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.replace(block, table, undefined, false, true);
46194
46497
  } else {
@@ -46210,6 +46513,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
46210
46513
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, table);
46211
46514
  }
46212
46515
  }
46516
+ } else if (container && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(container) && !editor.o.table.splitBlockOnInsertTable) {
46517
+ // With no block to go after, the table goes after the text
46518
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(container, table);
46213
46519
  } else {
46214
46520
  editor.s.insertNode(table, false);
46215
46521
  }
@@ -46471,33 +46777,15 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('toolbarNavigati
46471
46777
 
46472
46778
 
46473
46779
 
46474
- // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
46475
- // with `mediaDefaultAlign`
46476
- function prepareMedia(jodit, element) {
46477
- const media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
46478
- const { mediaDefaultAlign } = jodit.o;
46479
- if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
46480
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
46481
- }
46482
- return media;
46483
- }
46484
46780
  function insertVideos(data) {
46485
46781
  var _data_files;
46486
46782
  (_data_files = data.files) === null || _data_files === void 0 ? void 0 : _data_files.forEach((file)=>{
46487
- this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
46783
+ this.s.insertNode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.prepareMedia)(this, this.createInside.element('video', {
46488
46784
  controls: '',
46489
46785
  src: data.baseurl + file
46490
46786
  })));
46491
46787
  });
46492
46788
  }
46493
- // Embed code that is one element is prepared as media; other code goes in as
46494
- // it is
46495
- function prepareEmbedCode(jodit, code) {
46496
- const box = jodit.createInside.div();
46497
- box.innerHTML = code.trim();
46498
- const element = box.firstElementChild;
46499
- return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
46500
- }
46501
46789
  jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
46502
46790
  parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
46503
46791
  defaultWidth: 400,
@@ -46535,7 +46823,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
46535
46823
  ])
46536
46824
  ]), tabs = [], insertCode = (code)=>{
46537
46825
  jodit.s.restore();
46538
- jodit.s.insertHTML(prepareEmbedCode(jodit, code));
46826
+ jodit.s.insertHTML((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.prepareEmbedCode)(jodit, code));
46539
46827
  close();
46540
46828
  };
46541
46829
  jodit.s.save();
@@ -46572,7 +46860,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
46572
46860
  formCode.onSubmit((data)=>{
46573
46861
  insertCode(data.code);
46574
46862
  });
46575
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
46863
+ const box = (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
46864
+ // Its tabs are sized to their labels, as the file selector's are, since
46865
+ // "Upload" doesn't fit a third of the popup
46866
+ box.classList.add('jodit-file-selector');
46867
+ return box;
46576
46868
  },
46577
46869
  tags: [
46578
46870
  'iframe'