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/es2018/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
  */
@@ -1735,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
1735
1735
  * Released under MIT see LICENSE.txt in the project root for license information.
1736
1736
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1737
1737
  */
1738
- const APP_VERSION = "4.2.35";
1738
+ const APP_VERSION = "4.2.37";
1739
1739
  // prettier-ignore
1740
1740
  const ES = "es2018";
1741
1741
  const IS_ES_MODERN = true;
@@ -10643,11 +10643,7 @@ class Selection {
10643
10643
  String(dw).indexOf('%') < 0) {
10644
10644
  dw += 'px';
10645
10645
  }
10646
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(
10647
- // @ts-ignore
10648
- this.j.o.resizer.forImageChangeAttributes ? jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css, image, 'width',
10649
- // @ts-ignore
10650
- dw);
10646
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'width', dw);
10651
10647
  }
10652
10648
  if (styles && typeof styles === 'object') {
10653
10649
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
@@ -10670,7 +10666,7 @@ class Selection {
10670
10666
  * [[FileBrowser]] or [[Uploader]]
10671
10667
  * @example
10672
10668
  * ```javascript
10673
- * var editor = Jodit.make("#redactor");
10669
+ * const editor = Jodit.make("#redactor");
10674
10670
  * editor.e.on('afterInsertImage', function (image) {
10675
10671
  * image.className = 'bloghead4';
10676
10672
  * });
@@ -37670,6 +37666,16 @@ class resizer extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_5__/* .P
37670
37666
  node = node.parentNode;
37671
37667
  }
37672
37668
  }
37669
+ __afterInsertImage(image) {
37670
+ if (this.j.o.resizer.forImageChangeAttributes) {
37671
+ return;
37672
+ }
37673
+ const width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width');
37674
+ if (width && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', true)) {
37675
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
37676
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width', null);
37677
+ }
37678
+ }
37673
37679
  addEventListeners() {
37674
37680
  const editor = this.j;
37675
37681
  editor.e
@@ -37965,6 +37971,9 @@ class resizer extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_5__/* .P
37965
37971
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
37966
37972
  (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':click')
37967
37973
  ], resizer.prototype, "onEditorClick", null);
37974
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
37975
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterInsertImage')
37976
+ ], resizer.prototype, "__afterInsertImage", null);
37968
37977
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
37969
37978
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
37970
37979
  ], resizer.prototype, "onStartResizing", null);