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/es5/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
  */
@@ -3084,7 +3084,7 @@ __webpack_require__.r(__webpack_exports__);
3084
3084
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3085
3085
  */
3086
3086
 
3087
- var APP_VERSION = "4.0.15";
3087
+ var APP_VERSION = "4.0.17";
3088
3088
  // prettier-ignore
3089
3089
  var ES = "es5";
3090
3090
  var IS_ES_MODERN = false;
@@ -10600,7 +10600,9 @@ function markOwner(jodit, elm) {
10600
10600
  }
10601
10601
  function callPromise(condition, callback) {
10602
10602
  if ((0,jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_3__/* .isPromise */ .t)(condition)) {
10603
- return condition.finally(callback);
10603
+ return condition
10604
+ .then(function (resp) { return resp; }, function () { return null; })
10605
+ .finally(callback);
10604
10606
  }
10605
10607
  return callback();
10606
10608
  }
@@ -18262,6 +18264,9 @@ var Jodit = /** @class */ (function (_super) {
18262
18264
  _this.selection = new jodit_modules__WEBPACK_IMPORTED_MODULE_2__.Selection(_this);
18263
18265
  var beforeInitHookResult = _this.beforeInitHook();
18264
18266
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.callPromise)(beforeInitHookResult, function () {
18267
+ if (_this.isInDestruct) {
18268
+ return;
18269
+ }
18265
18270
  _this.e.fire('beforeInit', _this);
18266
18271
  jodit_core_global__WEBPACK_IMPORTED_MODULE_4__/* .pluginSystem */ .pw.__init(_this);
18267
18272
  _this.e.fire('afterPluginSystemInit', _this);
@@ -18273,6 +18278,9 @@ var Jodit = /** @class */ (function (_super) {
18273
18278
  var addPlaceResult = _this.addPlace(element, options);
18274
18279
  jodit_core_global__WEBPACK_IMPORTED_MODULE_4__/* .instances */ .as[_this.id] = _this;
18275
18280
  var init = function () {
18281
+ if (_this.isInDestruct) {
18282
+ return;
18283
+ }
18276
18284
  if (_this.e) {
18277
18285
  _this.e.fire('afterInit', _this);
18278
18286
  }
@@ -19458,10 +19466,6 @@ var Jodit = /** @class */ (function (_super) {
19458
19466
  }
19459
19467
  this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_2__.STATUSES.beforeDestruct);
19460
19468
  this.__elementToPlace.clear();
19461
- if (!this.editor) {
19462
- return;
19463
- }
19464
- var buffer = this.getEditorValue();
19465
19469
  this.storage.clear();
19466
19470
  this.buffer.clear();
19467
19471
  this.commands.clear();
@@ -19470,8 +19474,12 @@ var Jodit = /** @class */ (function (_super) {
19470
19474
  this.e.off(this.ow);
19471
19475
  this.e.off(this.od);
19472
19476
  this.e.off(this.od.body);
19477
+ var buffer = this.editor ? this.getEditorValue() : '';
19473
19478
  this.places.forEach(function (_a) {
19474
19479
  var container = _a.container, workplace = _a.workplace, statusbar = _a.statusbar, element = _a.element, iframe = _a.iframe, editor = _a.editor, history = _a.history;
19480
+ if (!element) {
19481
+ return;
19482
+ }
19475
19483
  if (element !== container) {
19476
19484
  if (element.hasAttribute(__defaultStyleDisplayKey)) {
19477
19485
  var display = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(element, __defaultStyleDisplayKey);
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
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
  */
8
8
  /*!
9
9
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.0.15
11
+ * Version: v4.0.17
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */