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
@@ -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
  */
@@ -1824,7 +1824,7 @@ __webpack_require__.r(__webpack_exports__);
1824
1824
  * ```
1825
1825
  * @packageDocumentation
1826
1826
  * @module constants
1827
- */ const APP_VERSION = "4.18.2";
1827
+ */ const APP_VERSION = "4.18.3";
1828
1828
  // prettier-ignore
1829
1829
  const ES = "es2021";
1830
1830
  const IS_ES_MODERN = true;
@@ -8828,13 +8828,13 @@ const getClassName = (obj)=>{
8828
8828
  "use strict";
8829
8829
  __webpack_require__.r(__webpack_exports__);
8830
8830
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8831
- /* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.$$; },
8831
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.$$; },
8832
8832
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8833
8833
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8834
8834
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8835
8835
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8836
8836
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8837
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
8837
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
8838
8838
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8839
8839
  /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8840
8840
  /* harmony export */ abort: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.abort; },
@@ -8846,9 +8846,9 @@ __webpack_require__.r(__webpack_exports__);
8846
8846
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8847
8847
  /* harmony export */ browser: function() { return /* reexport safe */ _browser__WEBPACK_IMPORTED_MODULE_4__.browser; },
8848
8848
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8849
- /* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.call; },
8850
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
8851
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callThis; },
8849
+ /* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.call; },
8850
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8851
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.callThis; },
8852
8852
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8853
8853
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8854
8854
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.cns; },
@@ -8858,7 +8858,7 @@ __webpack_require__.r(__webpack_exports__);
8858
8858
  /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8859
8859
  /* harmony export */ css: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.css; },
8860
8860
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8861
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
8861
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
8862
8862
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8863
8863
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8864
8864
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8867,34 +8867,36 @@ __webpack_require__.r(__webpack_exports__);
8867
8867
  /* harmony export */ get: function() { return /* reexport safe */ _get__WEBPACK_IMPORTED_MODULE_15__.get; },
8868
8868
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8869
8869
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8870
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
8870
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
8871
8871
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8872
8872
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8873
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
8873
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
8874
8874
  /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8875
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
8875
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
8876
8876
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8877
8877
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8878
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.inView; },
8878
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_25__.inView; },
8879
8879
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8880
8880
  /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
8881
8881
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8882
- /* harmony export */ keys: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.keys; },
8883
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
8882
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.keys; },
8883
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
8884
8884
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8885
8885
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8886
8886
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8887
8887
  /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8888
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
8889
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
8888
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
8889
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
8890
8890
  /* harmony export */ options: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.options; },
8891
8891
  /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8892
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
8893
- /* harmony export */ refs: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.refs; },
8894
- /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_23__.reset; },
8895
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
8896
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
8897
- /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_26__.set; },
8892
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
8893
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
8894
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
8895
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.refs; },
8896
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_24__.reset; },
8897
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
8898
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
8899
+ /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_27__.set; },
8898
8900
  /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
8899
8901
  /* harmony export */ });
8900
8902
  /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
@@ -8923,13 +8925,14 @@ __webpack_require__.r(__webpack_exports__);
8923
8925
  /* harmony import */ var _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49385);
8924
8926
  /* harmony import */ var _media_wrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(83314);
8925
8927
  /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(36310);
8926
- /* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(57075);
8927
- /* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(43379);
8928
- /* harmony import */ var _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(60898);
8929
- /* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(28723);
8930
- /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(52144);
8931
- /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(42820);
8932
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(71125);
8928
+ /* harmony import */ var _prepare_media__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(89214);
8929
+ /* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(57075);
8930
+ /* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(43379);
8931
+ /* harmony import */ var _scroll_into_view__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(60898);
8932
+ /* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(28723);
8933
+ /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(52144);
8934
+ /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(42820);
8935
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(71125);
8933
8936
  /*!
8934
8937
  * Jodit Editor (https://xdsoft.net/jodit/)
8935
8938
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8965,6 +8968,7 @@ __webpack_require__.r(__webpack_exports__);
8965
8968
 
8966
8969
 
8967
8970
 
8971
+
8968
8972
 
8969
8973
 
8970
8974
  /***/ }),
@@ -9136,6 +9140,48 @@ const isWrapper = (node, wrapper)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0
9136
9140
  /* harmony export */ ]);
9137
9141
 
9138
9142
 
9143
+ /***/ }),
9144
+
9145
+ /***/ 89214:
9146
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9147
+
9148
+ "use strict";
9149
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9150
+ /* harmony export */ prepareEmbedCode: function() { return /* binding */ prepareEmbedCode; },
9151
+ /* harmony export */ prepareMedia: function() { return /* binding */ prepareMedia; }
9152
+ /* harmony export */ });
9153
+ /* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
9154
+ /* harmony import */ var jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83314);
9155
+ /*!
9156
+ * Jodit Editor (https://xdsoft.net/jodit/)
9157
+ * Released under MIT see LICENSE.txt in the project root for license information.
9158
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
9159
+ */ /**
9160
+ * @module helpers/utils
9161
+ */
9162
+
9163
+ /**
9164
+ * Puts new media in its wrapper (see `mediaWrappers`) and aligns it with
9165
+ * `mediaDefaultAlign`. Returns the wrapper, or `element` when there is none
9166
+ */ function prepareMedia(jodit, element) {
9167
+ const media = (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_1__.wrapMedia)(jodit, element);
9168
+ const { mediaDefaultAlign } = jodit.o;
9169
+ if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
9170
+ (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));
9171
+ }
9172
+ return media;
9173
+ }
9174
+ /**
9175
+ * Embed code that is one element is prepared as media (see `prepareMedia`);
9176
+ * other code is returned as it is
9177
+ */ function prepareEmbedCode(jodit, code) {
9178
+ const box = jodit.createInside.div();
9179
+ box.innerHTML = code.trim();
9180
+ const element = box.firstElementChild;
9181
+ return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
9182
+ }
9183
+
9184
+
9139
9185
  /***/ }),
9140
9186
 
9141
9187
  /***/ 57075:
@@ -13314,7 +13360,9 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
13314
13360
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, fragment);
13315
13361
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeInsertNode(range, wrapper);
13316
13362
  if (style.elementIsBlock) {
13317
- 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')) {
13363
+ // The wrapped content can bring its own `<br>` (an empty table
13364
+ // cell's), after or inside the temporary `<font>` around the selection
13365
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !wrapper.querySelector('br')) {
13318
13366
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, ci.element('br'));
13319
13367
  }
13320
13368
  }
@@ -22344,13 +22392,11 @@ class Command {
22344
22392
  /* harmony export */ History: function() { return /* binding */ History; }
22345
22393
  /* harmony export */ });
22346
22394
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
22347
- /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
22348
- /* harmony import */ var jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59609);
22349
- /* harmony import */ var jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55184);
22350
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5266);
22351
- /* harmony import */ var _command__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8838);
22352
- /* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46363);
22353
- /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33511);
22395
+ /* harmony import */ var jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59609);
22396
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5266);
22397
+ /* harmony import */ var _command__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8838);
22398
+ /* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46363);
22399
+ /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33511);
22354
22400
  /*!
22355
22401
  * Jodit Editor (https://xdsoft.net/jodit/)
22356
22402
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -22365,43 +22411,45 @@ class Command {
22365
22411
 
22366
22412
 
22367
22413
 
22368
-
22369
-
22370
- jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22414
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
22371
22415
  enable: true,
22372
22416
  maxHistoryLength: Infinity,
22373
22417
  timeout: 1000
22374
22418
  };
22375
22419
  /**
22376
22420
  * The module monitors the status of the editor and creates / deletes the required number of Undo / Redo shots .
22377
- */ class History extends jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_2__.ViewComponent {
22421
+ */ class History extends jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_1__.ViewComponent {
22378
22422
  /** @override */ className() {
22379
22423
  return 'History';
22380
22424
  }
22381
22425
  /**
22382
22426
  * Return state of the WYSIWYG editor to step back
22383
22427
  */ redo() {
22428
+ this.__processPendingChanges();
22384
22429
  if (this.__stack.redo()) {
22385
22430
  this.startValue = this.snapshot.make();
22386
22431
  this.fireChangeStack();
22387
22432
  }
22388
22433
  }
22389
22434
  canRedo() {
22390
- return this.__stack.canRedo();
22435
+ return !this.__hasPendingChanges && this.__stack.canRedo();
22391
22436
  }
22392
22437
  /**
22393
22438
  * Return the state of the WYSIWYG editor to step forward
22394
22439
  */ undo() {
22440
+ this.__processPendingChanges();
22395
22441
  if (this.__stack.undo()) {
22396
22442
  this.startValue = this.snapshot.make();
22397
22443
  this.fireChangeStack();
22398
22444
  }
22399
22445
  }
22400
22446
  canUndo() {
22401
- return this.__stack.canUndo();
22447
+ return this.__hasPendingChanges || this.__stack.canUndo();
22402
22448
  }
22403
22449
  clear() {
22404
22450
  this.startValue = this.snapshot.make();
22451
+ this.async.clearTimeout(this.__timer);
22452
+ this.__hasPendingChanges = false;
22405
22453
  this.__stack.clear();
22406
22454
  this.fireChangeStack();
22407
22455
  }
@@ -22421,9 +22469,29 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22421
22469
  this.updateTick += 1;
22422
22470
  }
22423
22471
  /**
22424
- * Push new command in stack on some changes
22472
+ * Push new command in stack on some changes. The first change opens a
22473
+ * step, and later ones join it until `history.timeout` has passed,
22474
+ * however close together they come.
22425
22475
  */ onChange() {
22426
- this.__processChanges();
22476
+ // A transaction is over by the time the step is recorded, so it is
22477
+ // checked now
22478
+ if (this.snapshot.isBlocked || this.__hasPendingChanges) {
22479
+ return;
22480
+ }
22481
+ this.__hasPendingChanges = true;
22482
+ this.__timer = this.async.setTimeout(()=>this.__processPendingChanges(), this.j.o.history.timeout);
22483
+ // With a timeout of 0 the step is already recorded. Otherwise
22484
+ // canUndo and canRedo count it from now
22485
+ if (this.__hasPendingChanges) {
22486
+ this.fireChangeStack();
22487
+ }
22488
+ }
22489
+ /**
22490
+ * Push the open step's changes now
22491
+ */ __processPendingChanges() {
22492
+ if (this.__hasPendingChanges) {
22493
+ this.__processChanges();
22494
+ }
22427
22495
  }
22428
22496
  /**
22429
22497
  * @internal
@@ -22431,13 +22499,15 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22431
22499
  if (this.snapshot.isBlocked || !this.j.o.history.enable) {
22432
22500
  return;
22433
22501
  }
22502
+ this.async.clearTimeout(this.__timer);
22503
+ this.__hasPendingChanges = false;
22434
22504
  this.updateStack();
22435
22505
  }
22436
22506
  /**
22437
22507
  * Update history stack
22438
22508
  */ updateStack(replace = false) {
22439
22509
  const newValue = this.snapshot.make();
22440
- if (_snapshot__WEBPACK_IMPORTED_MODULE_6__.Snapshot.equal(newValue, this.startValue)) {
22510
+ if (_snapshot__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
22441
22511
  return;
22442
22512
  }
22443
22513
  // Only the selection moved, for example when the selection markers
@@ -22447,7 +22517,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22447
22517
  this.startValue = newValue;
22448
22518
  return;
22449
22519
  }
22450
- const newCommand = new _command__WEBPACK_IMPORTED_MODULE_5__.Command(this.startValue, newValue, this, this.updateTick);
22520
+ const newCommand = new _command__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
22451
22521
  if (replace) {
22452
22522
  const command = this.__stack.current();
22453
22523
  if (command && this.updateTick === command.tick) {
@@ -22472,8 +22542,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22472
22542
  this.snapshot.destruct();
22473
22543
  super.destruct();
22474
22544
  }
22475
- constructor(editor, stack = new _stack__WEBPACK_IMPORTED_MODULE_7__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot__WEBPACK_IMPORTED_MODULE_6__.Snapshot(editor)){
22476
- 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);
22545
+ constructor(editor, stack = new _stack__WEBPACK_IMPORTED_MODULE_5__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot__WEBPACK_IMPORTED_MODULE_4__.Snapshot(editor)){
22546
+ 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), /**
22547
+ * A step is open: changes have come in that are not in the stack yet
22548
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__hasPendingChanges", false), /**
22549
+ * Records the open step `history.timeout` after its first change
22550
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__timer", 0);
22477
22551
  this.__stack = stack;
22478
22552
  this.snapshot = snapshot;
22479
22553
  if (editor.o.history.enable) {
@@ -22484,6 +22558,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22484
22558
  this.startValue = this.snapshot.make();
22485
22559
  editor.events// save selection
22486
22560
  .on('internalChange internalUpdate', ()=>{
22561
+ this.__processPendingChanges();
22487
22562
  this.startValue = this.snapshot.make();
22488
22563
  }).on(editor.editor, [
22489
22564
  'changeSelection',
@@ -22497,14 +22572,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.history = {
22497
22572
  if (this.startValue.html === this.j.getNativeEditorValue()) {
22498
22573
  this.startValue = this.snapshot.make();
22499
22574
  }
22500
- }).on(this, 'change.history', this.onChange);
22575
+ }).on(this, 'change.history', ()=>this.onChange());
22501
22576
  });
22502
22577
  }
22503
22578
  }
22504
22579
  }
22505
- ;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
22506
- (0,jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.debounce)()
22507
- ], History.prototype, "onChange", null);
22508
22580
 
22509
22581
 
22510
22582
  /***/ }),
@@ -24103,7 +24175,9 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24103
24175
  const columnsCount = Table.__getColumnsCount(table);
24104
24176
  row = create.element('tr');
24105
24177
  for(let j = 0; j < columnsCount; j += 1){
24106
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(row, create.element('td'));
24178
+ const cell = create.element('td');
24179
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(cell, create.element('br'));
24180
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(row, cell);
24107
24181
  }
24108
24182
  } else {
24109
24183
  row = line.cloneNode(true);
@@ -24120,6 +24194,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24120
24194
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.each(row, (cell)=>{
24121
24195
  if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isCell(cell)) {
24122
24196
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.detach(cell);
24197
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(cell, create.element('br'));
24123
24198
  }
24124
24199
  });
24125
24200
  }
@@ -24208,6 +24283,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24208
24283
  const cells = box[i];
24209
24284
  if (cells[columnIndex] !== cells[newColumnIndex] || columnIndex === newColumnIndex) {
24210
24285
  const cell = this.j.createInside.element('td');
24286
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.append(cell, this.j.createInside.element('br'));
24211
24287
  if (insertAfter) {
24212
24288
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.after(cells[columnIndex], cell);
24213
24289
  } else {
@@ -24431,7 +24507,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.ViewCompon
24431
24507
  Table.__setColumnWidthByDelta(table, first_j, 0, true, __marked);
24432
24508
  }
24433
24509
  }
24434
- first.innerHTML = html.join('<br/>');
24510
+ first.innerHTML = html.join('<br/>') || '<br/>';
24435
24511
  instance(jodit).addSelection(first);
24436
24512
  alreadyMerged.delete(first);
24437
24513
  Table.__unmark(__marked);
@@ -26663,8 +26739,8 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
26663
26739
  const box = (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__.TabsWidget)(editor, tabs);
26664
26740
  // Marks this popup so its tabs auto-size to their labels (see
26665
26741
  // `.jodit-file-selector` in tabs.less) — long localized tab captions are no
26666
- // longer clipped — while leaving other tab popups (link, video …)
26667
- // untouched.
26742
+ // longer clipped — while leaving other tab popups (link …) untouched. The
26743
+ // video popup, which has an Upload tab too, uses it as well.
26668
26744
  box.classList.add('jodit-file-selector');
26669
26745
  return box;
26670
26746
  };
@@ -27695,6 +27771,10 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugin {
27695
27771
  if (!sel.isFocused()) {
27696
27772
  sel.focus();
27697
27773
  }
27774
+ // Focused with no range, as WebKit leaves it after a click on an embed
27775
+ if (!sel.isInsideArea) {
27776
+ return;
27777
+ }
27698
27778
  if ((0,_cases_check_not_collapsed__WEBPACK_IMPORTED_MODULE_8__.checkNotCollapsed)(jodit)) {
27699
27779
  jodit.e.fire('backSpaceAfterDelete', backspace);
27700
27780
  return false;
@@ -28890,7 +28970,8 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
28890
28970
  /* harmony import */ var jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48155);
28891
28971
  /* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18855);
28892
28972
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11173);
28893
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54053);
28973
+ /* harmony import */ var _helpers_visitor_filters_replace_old_tags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(35104);
28974
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54053);
28894
28975
  /*!
28895
28976
  * Jodit Editor (https://xdsoft.net/jodit/)
28896
28977
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -28909,6 +28990,7 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
28909
28990
 
28910
28991
 
28911
28992
 
28993
+
28912
28994
  /**
28913
28995
  * Clean HTML after removeFormat and insertHorizontalRule command
28914
28996
  */ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
@@ -28933,18 +29015,18 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
28933
29015
  }
28934
29016
  startWalker() {
28935
29017
  const { jodit } = this;
28936
- const allow = (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.getHash)(this.j.o.cleanHTML.allowTags);
28937
- const deny = (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.getHash)(this.j.o.cleanHTML.denyTags);
28938
- this.walker.on('visit', (node)=>(0,_helpers__WEBPACK_IMPORTED_MODULE_9__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
29018
+ const allow = (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.getHash)(this.j.o.cleanHTML.allowTags);
29019
+ const deny = (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.getHash)(this.j.o.cleanHTML.denyTags);
29020
+ this.walker.on('visit', (node)=>(0,_helpers__WEBPACK_IMPORTED_MODULE_10__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
28939
29021
  this.j.e.fire(affected ? 'internalChange finishedCleanHTMLWorker' : 'finishedCleanHTMLWorker');
28940
29022
  });
28941
29023
  }
28942
29024
  beforeCommand(command) {
28943
29025
  if (command.toLowerCase() === 'removeformat') {
28944
29026
  if (this.j.s.isCollapsed()) {
28945
- (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.removeFormatForCollapsedSelection)(this.j);
29027
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.removeFormatForCollapsedSelection)(this.j);
28946
29028
  } else {
28947
- (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.removeFormatForSelection)(this.j);
29029
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.removeFormatForSelection)(this.j);
28948
29030
  }
28949
29031
  return false;
28950
29032
  }
@@ -28970,6 +29052,7 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
28970
29052
  ];
28971
29053
  sandBox.innerHTML = data.value;
28972
29054
  this.j.e.fire('safeHTML', sandBox);
29055
+ this.__replaceOldTags(sandBox);
28973
29056
  data.value = sandBox.innerHTML;
28974
29057
  (0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, {
28975
29058
  safeJavaScriptLink: true,
@@ -28978,6 +29061,20 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
28978
29061
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(iframe);
28979
29062
  return false;
28980
29063
  }
29064
+ /**
29065
+ * Replace old tags (`<b>` with `<strong>`, `<i>` with `<em>`) in an
29066
+ * assigned value straight away. The walker would get to them only after
29067
+ * every node before them, seconds later on a long document, and until
29068
+ * then Bold does not treat `<b>` as bold, and the swap can move the caret.
29069
+ */ __replaceOldTags(box) {
29070
+ const { replaceOldTags: list, disableCleanFilter } = this.j.o.cleanHTML;
29071
+ if (!list || disableCleanFilter?.has('replaceOldTags')) {
29072
+ return;
29073
+ }
29074
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.each(box, (node)=>{
29075
+ ;(0,_helpers_visitor_filters_replace_old_tags__WEBPACK_IMPORTED_MODULE_9__.replaceOldTags)(this.j, node, false);
29076
+ });
29077
+ }
28981
29078
  /**
28982
29079
  * Collapse a value that holds only a single empty block (e.g.
28983
29080
  * `<p><br></p>` left after deleting all content) to an empty string —
@@ -29710,10 +29807,33 @@ __webpack_require__.r(__webpack_exports__);
29710
29807
  }
29711
29808
  const tagName = list[oldParent.nodeName.toLowerCase()] || list[oldParent.nodeName];
29712
29809
  if (tagName) {
29713
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
29810
+ const restoreSelection = keepSelection(jodit, oldParent);
29811
+ const newParent = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
29812
+ restoreSelection?.(newParent);
29813
+ return newParent;
29714
29814
  }
29715
29815
  return oldParent;
29716
29816
  }
29817
+ /**
29818
+ * Moving the children out of an element collapses a selection inside them to
29819
+ * where the element was, so the caret jumps to the start of the text being
29820
+ * typed. Returns a callback that puts the selection back on the same nodes.
29821
+ *
29822
+ * Like `removeEmptyTextNode`, it leaves the selection alone once focus has
29823
+ * left the editor, because selecting would take focus back.
29824
+ */ function keepSelection(jodit, elm) {
29825
+ const { sel } = jodit.s;
29826
+ if (!sel?.anchorNode || !sel.focusNode || !jodit.s.isFocused()) {
29827
+ return null;
29828
+ }
29829
+ const { anchorNode, anchorOffset, focusNode, focusOffset } = sel;
29830
+ 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)) {
29831
+ return null;
29832
+ }
29833
+ return (newElm)=>{
29834
+ sel.setBaseAndExtent(anchorNode === elm ? newElm : anchorNode, anchorOffset, focusNode === elm ? newElm : focusNode, focusOffset);
29835
+ };
29836
+ }
29717
29837
 
29718
29838
 
29719
29839
  /***/ }),
@@ -31352,9 +31472,31 @@ const brBoxes = new Set([
31352
31472
  * @module plugins/dtd
31353
31473
  * @internal
31354
31474
  */
31475
+ /**
31476
+ * Moves the cursor out of a block that can't hold the inserted block: before
31477
+ * or after it when the cursor is at its edge, or between its two halves when
31478
+ * the cursor is inside its content. An empty block is removed
31479
+ */ function moveCursorOutOf(jodit, parent) {
31480
+ const { s } = jodit;
31481
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
31482
+ s.setCursorAfter(parent);
31483
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
31484
+ return;
31485
+ }
31486
+ if (s.cursorOnTheRight(parent)) {
31487
+ s.setCursorAfter(parent);
31488
+ return;
31489
+ }
31490
+ if (s.cursorOnTheLeft(parent)) {
31491
+ s.setCursorBefore(parent);
31492
+ return;
31493
+ }
31494
+ s.setCursorAfter(s.splitSelection(parent) ?? parent);
31495
+ }
31355
31496
  /**
31356
31497
  * Checks whether the insertion of an element at the current location is allowed,
31357
- * if it is not allowed, it deletes an empty block element or moves the cursor after it
31498
+ * if it is not allowed, it deletes an empty block element, moves the cursor
31499
+ * before or after it, or splits it at the cursor
31358
31500
  * @internal
31359
31501
  */ function checkBlockNesting(jodit, node) {
31360
31502
  if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(node)) {
@@ -31382,10 +31524,7 @@ const brBoxes = new Set([
31382
31524
  parent = current;
31383
31525
  }
31384
31526
  if (parent) {
31385
- jodit.s.setCursorAfter(parent);
31386
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
31387
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
31388
- }
31527
+ moveCursorOutOf(jodit, parent);
31389
31528
  }
31390
31529
  }
31391
31530
  }
@@ -31915,7 +32054,14 @@ function brBefore(start) {
31915
32054
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(link, fake);
31916
32055
  } else if (s.cursorOnTheLeft(link, fake)) {
31917
32056
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.before(link, fake);
32057
+ } else {
32058
+ return;
31918
32059
  }
32060
+ // The block is split at the caret, so the caret leaves the link too:
32061
+ // beside the fake, since Safari mislays a caret inside a removed node
32062
+ const range = s.createRange();
32063
+ range.setStartBefore(fake);
32064
+ s.selectRange(range);
31919
32065
  }
31920
32066
  }
31921
32067
 
@@ -32158,9 +32304,10 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
32158
32304
 
32159
32305
  "use strict";
32160
32306
  /* unused harmony export focus */
32161
- /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27795);
32162
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
32163
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5266);
32307
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
32308
+ /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
32309
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28077);
32310
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5266);
32164
32311
  /*!
32165
32312
  * Jodit Editor (https://xdsoft.net/jodit/)
32166
32313
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -32172,15 +32319,16 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
32172
32319
  */
32173
32320
 
32174
32321
 
32322
+
32175
32323
  /**
32176
32324
  * After loading the page into the editor once the focus is set
32177
- */ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.autofocus = false;
32325
+ */ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.autofocus = false;
32178
32326
  /**
32179
32327
  * Cursor position after autofocus
32180
- */ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.cursorAfterAutofocus = 'end';
32328
+ */ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.cursorAfterAutofocus = 'end';
32181
32329
  /**
32182
32330
  * Save current selection on blur event
32183
- */ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
32331
+ */ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.saveSelectionOnBlur = true;
32184
32332
  function focus(editor) {
32185
32333
  if (editor.o.saveSelectionOnBlur) {
32186
32334
  // A click that brings focus back places the caret itself, and Chrome
@@ -32212,10 +32360,10 @@ function focus(editor) {
32212
32360
  let textNode = null;
32213
32361
  switch(editor.o.cursorAfterAutofocus){
32214
32362
  case 'start':
32215
- textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.first(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
32363
+ textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.first(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
32216
32364
  break;
32217
32365
  case 'end':
32218
- textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.last(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
32366
+ textNode = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.last(editor.editor, (node)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
32219
32367
  break;
32220
32368
  }
32221
32369
  if (textNode) {
@@ -32233,7 +32381,8 @@ function focus(editor) {
32233
32381
  });
32234
32382
  editor.e.on('afterInit afterAddPlace', ()=>{
32235
32383
  editor.e.off(editor.editor, 'mousedown.autofocus').on(editor.editor, 'mousedown.autofocus', (e)=>{
32236
- if (editor.isEditorMode() && e.target && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(e.target) && !e.target.childNodes.length) {
32384
+ // An empty block takes the caret, but a video, say, can't hold one
32385
+ 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) {
32237
32386
  if (editor.editor === e.target) {
32238
32387
  editor.s.focus();
32239
32388
  } else {
@@ -32243,7 +32392,7 @@ function focus(editor) {
32243
32392
  });
32244
32393
  });
32245
32394
  }
32246
- jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
32395
+ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('focus', focus);
32247
32396
 
32248
32397
 
32249
32398
  /***/ }),
@@ -33404,15 +33553,25 @@ function hr(editor) {
33404
33553
  const elm = editor.createInside.element('hr');
33405
33554
  editor.s.insertNode(elm, false, false);
33406
33555
  const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm.parentElement, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor);
33407
- if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor) {
33556
+ // A block that holds other blocks, such as a list item or a table
33557
+ // cell, keeps the line
33558
+ if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor && !editor.o.dtd?.blockLimits[block.nodeName.toLowerCase()]) {
33408
33559
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(block, elm);
33409
33560
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(block);
33410
33561
  }
33411
- let p = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.next(elm, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor, false);
33412
- if (!p) {
33413
- p = editor.createInside.element(editor.o.enter);
33414
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
33562
+ const next = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, false);
33563
+ if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(next)) {
33564
+ editor.s.setCursorIn(next, true);
33565
+ return false;
33566
+ }
33567
+ // In a list item or a table cell the text goes on after the line, as
33568
+ // it does with the browsers' own command
33569
+ 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))) {
33570
+ editor.s.setCursorAfter(elm);
33571
+ return false;
33415
33572
  }
33573
+ const p = editor.createInside.element(editor.o.enter);
33574
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
33416
33575
  editor.s.setCursorIn(p);
33417
33576
  return false;
33418
33577
  });
@@ -33438,7 +33597,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
33438
33597
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
33439
33598
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
33440
33599
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
33441
- 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' + '}';
33600
+ 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' + '}';
33442
33601
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
33443
33602
  jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
33444
33603
 
@@ -36270,10 +36429,30 @@ const align = {
36270
36429
  // A media wrapper kept in the content gets the media popup
36271
36430
  const type = mediaWrapper ? 'jodit-media' : target?.nodeName.toLowerCase();
36272
36431
  if (target && type && this.canShowPopupForType(type)) {
36273
- this.showPopup(()=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(target, this.j), type, target);
36432
+ const isMedia = type === 'jodit-media';
36433
+ // Beside the media in a wrapper kept in the content, which can fill
36434
+ // the line
36435
+ const bound = mediaWrapper && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(this.j, mediaWrapper) || target;
36436
+ this.showPopup(()=>this.__bound(bound, isMedia), type, target);
36274
36437
  return false;
36275
36438
  }
36276
36439
  }
36440
+ /**
36441
+ * The box the popup opens beside: the target's, with room for the
36442
+ * resizer's handles when the target gets them, so it doesn't cover them
36443
+ */ __bound(target, isMedia) {
36444
+ const bound = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(target, this.j);
36445
+ const resizable = this.j.o.allowResizeTags;
36446
+ if (!isMedia && !(resizable && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(target, resizable))) {
36447
+ return bound;
36448
+ }
36449
+ const room = parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue('--jd-resizer-handle-size'), 10) / 2 || 0;
36450
+ return {
36451
+ ...bound,
36452
+ top: bound.top - room,
36453
+ height: bound.height + room * 2
36454
+ };
36455
+ }
36277
36456
  /**
36278
36457
  * Show inline popup with some toolbar
36279
36458
  *
@@ -37204,7 +37383,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
37204
37383
  height: jodit.o.video?.defaultHeight
37205
37384
  });
37206
37385
  if (embed !== html) {
37207
- return jodit.createInside.fromHTML(embed);
37386
+ const media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.prepareEmbedCode)(jodit, embed);
37387
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
37208
37388
  }
37209
37389
  }
37210
37390
  if (jodit.s.isCollapsed()) {
@@ -37690,10 +37870,27 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
37690
37870
  } else {
37691
37871
  return;
37692
37872
  }
37873
+ // Selected, as an image is, so Delete and Backspace remove it
37693
37874
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
37694
- editor.s.setCursorAfter(element);
37875
+ editor.s.select(element);
37695
37876
  });
37696
37877
  };
37878
+ // Media in a wrapper kept in the content let clicks through to it, as
37879
+ // jodit-media covers its media, so a click selects the media rather than
37880
+ // playing it. An inline wrapper holds it as an inline-block, unless its
37881
+ // classes or style give it a display of their own
37882
+ const wrappers = Object.values(mediaWrappers);
37883
+ if (wrappers.length) {
37884
+ editor.e.on('afterInit', ()=>{
37885
+ const selectors = (list)=>[
37886
+ ...new Set(list)
37887
+ ].join(',');
37888
+ const scoped = ({ tag, className })=>`.jodit-wysiwyg ${tag}.${className}`;
37889
+ const inline = selectors(wrappers.filter(({ tag })=>jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE.test(tag)).map(scoped));
37890
+ const media = selectors(wrappers.flatMap((wrapper)=>mediaBlocks.map((tag)=>`${scoped(wrapper)}>${tag}`)));
37891
+ (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}`;
37892
+ });
37893
+ }
37697
37894
  if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
37698
37895
  editor.e.on('afterGetValueFromEditor', (data)=>{
37699
37896
  const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
@@ -38584,12 +38781,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38584
38781
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38585
38782
  /* harmony export */ askInsertTypeDialog: function() { return /* binding */ askInsertTypeDialog; },
38586
38783
  /* harmony export */ getAllTypes: function() { return /* binding */ getAllTypes; },
38587
- /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; }
38784
+ /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; },
38785
+ /* harmony export */ removeGoogleDocsWrapper: function() { return /* binding */ removeGoogleDocsWrapper; }
38588
38786
  /* harmony export */ });
38589
38787
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
38590
38788
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
38591
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28686);
38592
- /* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53681);
38789
+ /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88475);
38790
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28686);
38791
+ /* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53681);
38593
38792
  /*!
38594
38793
  * Jodit Editor (https://xdsoft.net/jodit/)
38595
38794
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38600,6 +38799,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38600
38799
 
38601
38800
 
38602
38801
 
38802
+
38603
38803
  /**
38604
38804
  * Remove special HTML comments
38605
38805
  * @private
@@ -38615,6 +38815,21 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38615
38815
  }
38616
38816
  return html;
38617
38817
  }
38818
+ /**
38819
+ * Google Docs wraps the copied content in
38820
+ * `<b style="font-weight:normal;" id="docs-internal-guid-…">`. Kept, the
38821
+ * wrapper holds the pasted blocks, and without its style it makes the whole
38822
+ * paste bold
38823
+ * @private
38824
+ */ function removeGoogleDocsWrapper(html) {
38825
+ if (!/<b\s[^>]*docs-internal-guid-/i.test(html)) {
38826
+ return html;
38827
+ }
38828
+ // An inert document: images don't load and handlers don't run
38829
+ const { body } = new DOMParser().parseFromString(html, 'text/html');
38830
+ (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);
38831
+ return body.innerHTML;
38832
+ }
38618
38833
  /**
38619
38834
  * @private
38620
38835
  */ function isDragEvent(e) {
@@ -38631,11 +38846,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38631
38846
  editor.s.insertCursorAtPoint(e.clientX, e.clientY);
38632
38847
  }
38633
38848
  const result = editor.e.fire('beforePasteInsert', html);
38634
- 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))) {
38849
+ 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))) {
38635
38850
  html = result;
38636
38851
  }
38637
- if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) {
38638
- html = removeExtraFragments(html);
38852
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
38853
+ html = removeExtraFragments(removeGoogleDocsWrapper(html));
38639
38854
  }
38640
38855
  editor.s.insertHTML(html);
38641
38856
  }
@@ -38645,7 +38860,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38645
38860
  */ function getAllTypes(dt) {
38646
38861
  const types = dt.types;
38647
38862
  let types_str = '';
38648
- if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
38863
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
38649
38864
  for(let i = 0; i < types.length; i += 1){
38650
38865
  types_str += types[i] + ';';
38651
38866
  }
@@ -38662,7 +38877,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38662
38877
  return;
38663
38878
  }
38664
38879
  const dialog = jodit.confirm(`<div style="word-break: normal; white-space: normal">${jodit.i18n(msg)}</div>`, jodit.i18n(title));
38665
- const buttons = buttonList.map(({ text, value })=>(0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
38880
+ const buttons = buttonList.map(({ text, value })=>(0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
38666
38881
  text,
38667
38882
  name: text.toLowerCase(),
38668
38883
  tabIndex: 0
@@ -38678,7 +38893,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38678
38893
  }
38679
38894
  jodit.e.fire('afterClosePasteDialog', dialog);
38680
38895
  });
38681
- const cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
38896
+ const cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
38682
38897
  text: 'Cancel',
38683
38898
  tabIndex: 0
38684
38899
  }).onAction(()=>{
@@ -38830,7 +39045,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
38830
39045
  this.j.buffer.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.CLIPBOARD_ID, html);
38831
39046
  switch(action){
38832
39047
  case jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.INSERT_CLEAR_HTML:
38833
- html = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.cleanFromWord)(html);
39048
+ html = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.cleanFromWord)((0,_helpers__WEBPACK_IMPORTED_MODULE_9__.removeGoogleDocsWrapper)(html));
38834
39049
  break;
38835
39050
  case jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.INSERT_ONLY_TEXT:
38836
39051
  html = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags), this.j.o.nl2brInPlainText);
@@ -39987,7 +40202,7 @@ const keyBInd = '__jodit-resizer_binded';
39987
40202
  addEventListeners() {
39988
40203
  const editor = this.j;
39989
40204
  editor.e.off(editor.editor, '.resizer').off(editor.ow, '.resizer').on(editor.editor, 'keydown.resizer', (e)=>{
39990
- 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')) {
40205
+ 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')) {
39991
40206
  this.onDelete(e);
39992
40207
  }
39993
40208
  }).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize).on([
@@ -40194,8 +40409,12 @@ const keyBInd = '__jodit-resizer_binded';
40194
40409
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
40195
40410
  this.j.s.select(element);
40196
40411
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
40197
- ;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth + 'px');
40198
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight + 'px');
40412
+ // Only a resize sets the embed's size, and as the plain numbers
40413
+ // the attributes take, so a click leaves `width="100%"` alone
40414
+ if (this.isResizeMode) {
40415
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth);
40416
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight);
40417
+ }
40199
40418
  });
40200
40419
  }
40201
40420
  this.j.e.on(element, 'dragstart', this.hide);
@@ -41546,15 +41765,23 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
41546
41765
  this.__tableModule.mergeSelected(table);
41547
41766
  break;
41548
41767
  case 'empty':
41549
- cells.forEach((td)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.detach(td));
41768
+ cells.forEach((td)=>{
41769
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.detach(td);
41770
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.append(td, this.j.createInside.element('br'));
41771
+ });
41550
41772
  break;
41551
41773
  case 'bin':
41552
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(table);
41774
+ this.__removeTable(table);
41553
41775
  break;
41554
41776
  case 'binrow':
41555
- new Set(cells.map((td)=>td.parentNode)).forEach((row)=>{
41556
- this.__tableModule.removeRow(table, row.rowIndex);
41557
- });
41777
+ {
41778
+ const rows = new Set(cells.map((td)=>td.parentNode));
41779
+ const next = this.__nearestCell(table, cell, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.toArray)(rows).map((row)=>row.rowIndex), true);
41780
+ rows.forEach((row)=>{
41781
+ this.__tableModule.removeRow(table, row.rowIndex);
41782
+ });
41783
+ next && this.j.s.setCursorIn(next);
41784
+ }
41558
41785
  break;
41559
41786
  case 'bincolumn':
41560
41787
  {
@@ -41567,9 +41794,11 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
41567
41794
  columnsSet.add(col);
41568
41795
  }
41569
41796
  });
41797
+ const next = this.__nearestCell(table, cell, columns, false);
41570
41798
  columns.sort((a, b)=>b - a).forEach((col)=>{
41571
41799
  this.__tableModule.removeColumn(table, col);
41572
41800
  });
41801
+ next && this.j.s.setCursorIn(next);
41573
41802
  }
41574
41803
  break;
41575
41804
  case 'addcolumnafter':
@@ -41581,10 +41810,36 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
41581
41810
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
41582
41811
  break;
41583
41812
  }
41813
+ if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
41814
+ this.__removeTable(table);
41815
+ }
41584
41816
  }
41585
41817
  return false;
41586
41818
  }
41587
41819
  }
41820
+ /**
41821
+ * The cell that takes the caret when rows or columns are deleted: the next
41822
+ * one in the same column (or row) that is not deleted, else the previous one
41823
+ */ __nearestCell(table, cell, deleted, isRow) {
41824
+ const box = this.__tableModule.formalMatrix(table);
41825
+ const [row, column] = this.__tableModule.formalCoordinate(table, cell);
41826
+ const start = isRow ? row : column;
41827
+ const count = isRow ? box.length : box[row].length;
41828
+ const find = (i)=>!deleted.includes(i) && (isRow ? box[i][column] : box[row][i]) || null;
41829
+ for(let i = start + 1; i < count; i += 1){
41830
+ const next = find(i);
41831
+ if (next) {
41832
+ return next;
41833
+ }
41834
+ }
41835
+ for(let i = start - 1; i >= 0; i -= 1){
41836
+ const prev = find(i);
41837
+ if (prev) {
41838
+ return prev;
41839
+ }
41840
+ }
41841
+ return null;
41842
+ }
41588
41843
  /**
41589
41844
  * Add some align after native command
41590
41845
  */ onAfterCommand(command) {
@@ -41592,6 +41847,14 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
41592
41847
  this.__tableModule.getAllSelectedCells().forEach((elm)=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.alignElement)(command, elm));
41593
41848
  }
41594
41849
  }
41850
+ /**
41851
+ * Remove the table and put the caret where it stood: at the start of what
41852
+ * follows it, else at the end of what precedes it
41853
+ */ __removeTable(table) {
41854
+ 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);
41855
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(table);
41856
+ this.j.s.setCursorIn(next || prev || parent, Boolean(next));
41857
+ }
41595
41858
  /** @override */ beforeDestruct(jodit) {
41596
41859
  this.__onRemoveSelection();
41597
41860
  jodit.e.off('.select-cells');
@@ -44170,7 +44433,7 @@ const WORK_KEYS = new Set([
44170
44433
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
44171
44434
  editor.s.setCursorBefore(first);
44172
44435
  } else {
44173
- if (key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
44436
+ if (key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(next)) {
44174
44437
  editor.s.select(next, true);
44175
44438
  } else {
44176
44439
  editor.s.setCursorIn(next, key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN);
@@ -44238,6 +44501,36 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.table = {
44238
44501
  useExtraClassesOptions: false
44239
44502
  };
44240
44503
  jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__.Icon.set('table', (_table_svg__WEBPACK_IMPORTED_MODULE_6___default()));
44504
+ /**
44505
+ * Elements in `dtd.blockLimits` that hold only rows, cells or list items, so
44506
+ * a table can't go directly inside them
44507
+ */ const ROW_AND_ITEM_HOLDERS = new Set([
44508
+ 'table',
44509
+ 'thead',
44510
+ 'tbody',
44511
+ 'tfoot',
44512
+ 'tr',
44513
+ 'ul',
44514
+ 'ol',
44515
+ 'dl'
44516
+ ]);
44517
+ /**
44518
+ * The nearest block around the cursor that can hold the new table: an element
44519
+ * in `dtd.blockLimits`, such as a table cell, a list item or a `<div>`. The
44520
+ * cursor's own block of the `enter` tag is a line, not a container, as in the
44521
+ * dtd plugin's `checkBlockNesting`
44522
+ */ function findTableContainer(editor, current) {
44523
+ const line = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
44524
+ const container = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, (node)=>{
44525
+ 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)) {
44526
+ return false;
44527
+ }
44528
+ const tag = node.nodeName.toLowerCase();
44529
+ return Boolean(editor.o.dtd?.blockLimits[tag]) && !ROW_AND_ITEM_HOLDERS.has(tag);
44530
+ }, editor.editor);
44531
+ // With the cursor between two rows, `current` is the next row's text
44532
+ return container && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(container, editor.s.range.startContainer) ? container : null;
44533
+ }
44241
44534
  jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
44242
44535
  data: {
44243
44536
  cols: 10,
@@ -44335,7 +44628,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
44335
44628
  editor.s.removeMarkers();
44336
44629
  editor.editor.normalize();
44337
44630
  editor.history.snapshot.restore(snapshot);
44338
- 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);
44631
+ const current = editor.s.current();
44632
+ // The table goes into the cell, list item or box holding the
44633
+ // cursor, and only a block inside it is split
44634
+ const container = findTableContainer(editor, current);
44635
+ 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 ?? editor.editor);
44339
44636
  if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(block)) {
44340
44637
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.replace(block, table, undefined, false, true);
44341
44638
  } else {
@@ -44357,6 +44654,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
44357
44654
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, table);
44358
44655
  }
44359
44656
  }
44657
+ } else if (container && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(container) && !editor.o.table.splitBlockOnInsertTable) {
44658
+ // With no block to go after, the table goes after the text
44659
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(container, table);
44360
44660
  } else {
44361
44661
  editor.s.insertNode(table, false);
44362
44662
  }
@@ -44618,32 +44918,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('toolbarNavigati
44618
44918
 
44619
44919
 
44620
44920
 
44621
- // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
44622
- // with `mediaDefaultAlign`
44623
- function prepareMedia(jodit, element) {
44624
- const media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
44625
- const { mediaDefaultAlign } = jodit.o;
44626
- if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
44627
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
44628
- }
44629
- return media;
44630
- }
44631
44921
  function insertVideos(data) {
44632
44922
  data.files?.forEach((file)=>{
44633
- this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
44923
+ this.s.insertNode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.prepareMedia)(this, this.createInside.element('video', {
44634
44924
  controls: '',
44635
44925
  src: data.baseurl + file
44636
44926
  })));
44637
44927
  });
44638
44928
  }
44639
- // Embed code that is one element is prepared as media; other code goes in as
44640
- // it is
44641
- function prepareEmbedCode(jodit, code) {
44642
- const box = jodit.createInside.div();
44643
- box.innerHTML = code.trim();
44644
- const element = box.firstElementChild;
44645
- return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
44646
- }
44647
44929
  jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
44648
44930
  parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
44649
44931
  defaultWidth: 400,
@@ -44681,7 +44963,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
44681
44963
  ])
44682
44964
  ]), tabs = [], insertCode = (code)=>{
44683
44965
  jodit.s.restore();
44684
- jodit.s.insertHTML(prepareEmbedCode(jodit, code));
44966
+ jodit.s.insertHTML((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.prepareEmbedCode)(jodit, code));
44685
44967
  close();
44686
44968
  };
44687
44969
  jodit.s.save();
@@ -44714,7 +44996,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
44714
44996
  formCode.onSubmit((data)=>{
44715
44997
  insertCode(data.code);
44716
44998
  });
44717
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
44999
+ const box = (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
45000
+ // Its tabs are sized to their labels, as the file selector's are, since
45001
+ // "Upload" doesn't fit a third of the popup
45002
+ box.classList.add('jodit-file-selector');
45003
+ return box;
44718
45004
  },
44719
45005
  tags: [
44720
45006
  'iframe'