jodit 4.0.15 → 4.0.17

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 (59) hide show
  1. package/CHANGELOG.md +10 -5
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +15 -7
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.js +1 -1
  7. package/es2015/plugins/debug/debug.min.js +1 -1
  8. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  11. package/es2018/jodit.css +1 -1
  12. package/es2018/jodit.fat.min.js +2 -2
  13. package/es2018/jodit.js +15 -7
  14. package/es2018/jodit.min.js +2 -2
  15. package/es2018/plugins/debug/debug.js +1 -1
  16. package/es2018/plugins/debug/debug.min.js +1 -1
  17. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +1 -1
  21. package/es2021/jodit.fat.min.js +2 -2
  22. package/es2021/jodit.js +15 -7
  23. package/es2021/jodit.min.js +2 -2
  24. package/es2021/plugins/debug/debug.js +1 -1
  25. package/es2021/plugins/debug/debug.min.js +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  28. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  29. package/es2021.en/jodit.css +1 -1
  30. package/es2021.en/jodit.fat.min.js +2 -2
  31. package/es2021.en/jodit.js +15 -7
  32. package/es2021.en/jodit.min.js +2 -2
  33. package/es2021.en/plugins/debug/debug.js +1 -1
  34. package/es2021.en/plugins/debug/debug.min.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  37. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  38. package/es5/jodit.css +2 -2
  39. package/es5/jodit.fat.min.js +2 -2
  40. package/es5/jodit.js +15 -7
  41. package/es5/jodit.min.css +2 -2
  42. package/es5/jodit.min.js +2 -2
  43. package/es5/plugins/debug/debug.js +1 -1
  44. package/es5/plugins/debug/debug.min.js +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  48. package/esm/core/constants.js +1 -1
  49. package/esm/core/helpers/utils/utils.js +3 -1
  50. package/esm/jodit.js +10 -4
  51. package/esm/modules/toolbar/button/button.d.ts +1 -1
  52. package/esm/plugins/inline-popup/config/items/a.d.ts +1 -1
  53. package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
  54. package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
  55. package/package.json +1 -1
  56. package/types/modules/toolbar/button/button.d.ts +1 -1
  57. package/types/plugins/inline-popup/config/items/a.d.ts +1 -1
  58. package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
  59. package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
package/es2015/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.0.15
4
+ * Version: v4.0.17
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1691,7 +1691,7 @@ __webpack_require__.r(__webpack_exports__);
1691
1691
  * Released under MIT see LICENSE.txt in the project root for license information.
1692
1692
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1693
1693
  */
1694
- const APP_VERSION = "4.0.15";
1694
+ const APP_VERSION = "4.0.17";
1695
1695
  // prettier-ignore
1696
1696
  const ES = "es2015";
1697
1697
  const IS_ES_MODERN = true;
@@ -8922,7 +8922,9 @@ function markOwner(jodit, elm) {
8922
8922
  }
8923
8923
  function callPromise(condition, callback) {
8924
8924
  if ((0,jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_2__/* .isPromise */ .t)(condition)) {
8925
- return condition.finally(callback);
8925
+ return condition
8926
+ .then(resp => resp, () => null)
8927
+ .finally(callback);
8926
8928
  }
8927
8929
  return callback();
8928
8930
  }
@@ -16911,6 +16913,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
16911
16913
  this.selection = new jodit_modules__WEBPACK_IMPORTED_MODULE_2__.Selection(this);
16912
16914
  const beforeInitHookResult = this.beforeInitHook();
16913
16915
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.callPromise)(beforeInitHookResult, () => {
16916
+ if (this.isInDestruct) {
16917
+ return;
16918
+ }
16914
16919
  this.e.fire('beforeInit', this);
16915
16920
  jodit_core_global__WEBPACK_IMPORTED_MODULE_4__/* .pluginSystem */ .pw.__init(this);
16916
16921
  this.e.fire('afterPluginSystemInit', this);
@@ -16922,6 +16927,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
16922
16927
  const addPlaceResult = this.addPlace(element, options);
16923
16928
  jodit_core_global__WEBPACK_IMPORTED_MODULE_4__/* .instances */ .as[this.id] = this;
16924
16929
  const init = () => {
16930
+ if (this.isInDestruct) {
16931
+ return;
16932
+ }
16925
16933
  if (this.e) {
16926
16934
  this.e.fire('afterInit', this);
16927
16935
  }
@@ -17194,10 +17202,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17194
17202
  }
17195
17203
  this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_2__.STATUSES.beforeDestruct);
17196
17204
  this.__elementToPlace.clear();
17197
- if (!this.editor) {
17198
- return;
17199
- }
17200
- const buffer = this.getEditorValue();
17201
17205
  this.storage.clear();
17202
17206
  this.buffer.clear();
17203
17207
  this.commands.clear();
@@ -17206,7 +17210,11 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17206
17210
  this.e.off(this.ow);
17207
17211
  this.e.off(this.od);
17208
17212
  this.e.off(this.od.body);
17213
+ const buffer = this.editor ? this.getEditorValue() : '';
17209
17214
  this.places.forEach(({ container, workplace, statusbar, element, iframe, editor, history }) => {
17215
+ if (!element) {
17216
+ return;
17217
+ }
17210
17218
  if (element !== container) {
17211
17219
  if (element.hasAttribute(__defaultStyleDisplayKey)) {
17212
17220
  const display = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(element, __defaultStyleDisplayKey);