jodit 4.2.35 → 4.2.37

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 (57) hide show
  1. package/CHANGELOG.md +11 -5
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +17 -8
  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 +17 -8
  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 +17 -8
  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 +17 -8
  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/164.fat.min.js +1 -1
  39. package/es5/164.min.js +1 -1
  40. package/es5/5.fat.min.js +1 -1
  41. package/es5/5.min.js +1 -1
  42. package/es5/jodit.css +2 -2
  43. package/es5/jodit.fat.min.js +2 -2
  44. package/es5/jodit.js +17 -8
  45. package/es5/jodit.min.css +2 -2
  46. package/es5/jodit.min.js +2 -2
  47. package/es5/plugins/debug/debug.js +1 -1
  48. package/es5/plugins/debug/debug.min.js +1 -1
  49. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  50. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  51. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  52. package/esm/core/constants.js +1 -1
  53. package/esm/core/selection/selection.js +3 -7
  54. package/esm/plugins/resizer/resizer.d.ts +1 -0
  55. package/esm/plugins/resizer/resizer.js +13 -0
  56. package/package.json +1 -1
  57. package/types/plugins/resizer/resizer.d.ts +1 -0
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.35
4
+ * Version: v4.2.37
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1736,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
1736
1736
  * Released under MIT see LICENSE.txt in the project root for license information.
1737
1737
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1738
1738
  */
1739
- const APP_VERSION = "4.2.35";
1739
+ const APP_VERSION = "4.2.37";
1740
1740
  // prettier-ignore
1741
1741
  const ES = "es2021";
1742
1742
  const IS_ES_MODERN = true;
@@ -10614,11 +10614,7 @@ class Selection {
10614
10614
  String(dw).indexOf('%') < 0) {
10615
10615
  dw += 'px';
10616
10616
  }
10617
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(
10618
- // @ts-ignore
10619
- this.j.o.resizer.forImageChangeAttributes ? jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css, image, 'width',
10620
- // @ts-ignore
10621
- dw);
10617
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'width', dw);
10622
10618
  }
10623
10619
  if (styles && typeof styles === 'object') {
10624
10620
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
@@ -10641,7 +10637,7 @@ class Selection {
10641
10637
  * [[FileBrowser]] or [[Uploader]]
10642
10638
  * @example
10643
10639
  * ```javascript
10644
- * var editor = Jodit.make("#redactor");
10640
+ * const editor = Jodit.make("#redactor");
10645
10641
  * editor.e.on('afterInsertImage', function (image) {
10646
10642
  * image.className = 'bloghead4';
10647
10643
  * });
@@ -37563,6 +37559,16 @@ class resizer extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_5__/* .P
37563
37559
  node = node.parentNode;
37564
37560
  }
37565
37561
  }
37562
+ __afterInsertImage(image) {
37563
+ if (this.j.o.resizer.forImageChangeAttributes) {
37564
+ return;
37565
+ }
37566
+ const width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width');
37567
+ if (width && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', true)) {
37568
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
37569
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width', null);
37570
+ }
37571
+ }
37566
37572
  addEventListeners() {
37567
37573
  const editor = this.j;
37568
37574
  editor.e
@@ -37858,6 +37864,9 @@ class resizer extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_5__/* .P
37858
37864
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
37859
37865
  (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':click')
37860
37866
  ], resizer.prototype, "onEditorClick", null);
37867
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
37868
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterInsertImage')
37869
+ ], resizer.prototype, "__afterInsertImage", null);
37861
37870
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
37862
37871
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
37863
37872
  ], resizer.prototype, "onStartResizing", null);