jodit 4.8.3 → 4.8.5

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 (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +4 -4
  4. package/es2015/jodit.js +15 -14
  5. package/es2015/jodit.min.js +4 -4
  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 +4 -4
  13. package/es2018/jodit.min.js +4 -4
  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 +1 -1
  17. package/es2021/jodit.fat.min.js +4 -4
  18. package/es2021/jodit.js +15 -14
  19. package/es2021/jodit.min.js +4 -4
  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 +1 -1
  27. package/es2021.en/jodit.fat.min.js +4 -4
  28. package/es2021.en/jodit.js +15 -14
  29. package/es2021.en/jodit.min.js +4 -4
  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 +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +18 -14
  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/core/constants.js +1 -1
  51. package/esm/modules/toolbar/collection/collection.js +3 -2
  52. package/esm/plugins/size/size.d.ts +1 -0
  53. package/esm/plugins/size/size.js +4 -1
  54. package/esm/plugins/source/editor/engines/ace.js +8 -10
  55. package/esm/plugins/source/editor/engines/area.js +1 -1
  56. package/package.json +1 -1
  57. package/types/plugins/size/size.d.ts +1 -0
  58. package/.nvmrc +0 -1
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/es5/polyfills.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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.8.3
4
+ * Version: v4.8.5
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -3,7 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.8.3";
6
+ export const APP_VERSION = "4.8.5";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -13,7 +13,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
13
13
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14
14
  return c > 3 && r && Object.defineProperty(target, key, r), r;
15
15
  };
16
- import { autobind, component, debounce, hook } from "../../../core/decorators/index.js";
16
+ import { autobind, component, debounce, hook, watch } from "../../../core/decorators/index.js";
17
17
  import { error } from "../../../core/helpers/utils/error/error.js";
18
18
  import { UIList } from "../../../core/ui/index.js";
19
19
  import { makeButton, makeSelect } from "../factory.js";
@@ -72,7 +72,7 @@ let ToolbarCollection = class ToolbarCollection extends UIList {
72
72
  }
73
73
  constructor(jodit) {
74
74
  super(jodit);
75
- this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
75
+ this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize ' +
76
76
  'selectionchange changeSelection focus afterSetMode touchstart focus blur';
77
77
  }
78
78
  __initEvents() {
@@ -110,6 +110,7 @@ let ToolbarCollection = class ToolbarCollection extends UIList {
110
110
  }
111
111
  };
112
112
  __decorate([
113
+ watch(':afterInit'),
113
114
  autobind
114
115
  ], ToolbarCollection.prototype, "__immediateUpdate", null);
115
116
  __decorate([
@@ -20,6 +20,7 @@ export declare class size extends Plugin {
20
20
  * Set editor size by options
21
21
  */
22
22
  private __initialize;
23
+ private __immediateInitialize;
23
24
  /**
24
25
  * Manually change height
25
26
  */
@@ -41,12 +41,15 @@ export class size extends Plugin {
41
41
  .on('afterInit.size resize.size afterUpdateToolbar.size ' +
42
42
  'scroll.size afterResize.size', this.__resizeWorkspaces)
43
43
  .on('toggleFullSize.size toggleToolbar.size', this.__resizeWorkspaceImd);
44
- this.__initialize();
44
+ this.__immediateInitialize();
45
45
  }
46
46
  /**
47
47
  * Set editor size by options
48
48
  */
49
49
  __initialize() {
50
+ this.__immediateInitialize();
51
+ }
52
+ __immediateInitialize() {
50
53
  const { j } = this;
51
54
  if (j.o.inline) {
52
55
  return;
@@ -121,23 +121,21 @@ export class AceEditor extends SourceEditor {
121
121
  onResize();
122
122
  this.onReady();
123
123
  };
124
- editor.e.on('afterSetMode', () => {
125
- if (editor.getRealMode() !== constants.MODE_SOURCE &&
126
- editor.getMode() !== constants.MODE_SPLIT) {
124
+ const initAceEditor = () => {
125
+ if (editor.isInDestruct ||
126
+ (editor.getRealMode() !== constants.MODE_SOURCE &&
127
+ editor.getMode() !== constants.MODE_SPLIT)) {
127
128
  return;
128
129
  }
129
130
  this.fromWYSIWYG();
130
131
  tryInitAceEditor();
131
- });
132
- tryInitAceEditor();
132
+ };
133
+ editor.e.on('afterSetMode', initAceEditor);
134
+ initAceEditor();
133
135
  // global add ace editor in browser
134
136
  if (!this.aceExists()) {
135
137
  loadNext(editor, editor.o.sourceEditorCDNUrlsJS)
136
- .then(() => {
137
- if (!editor.isInDestruct) {
138
- tryInitAceEditor();
139
- }
140
- })
138
+ .then(initAceEditor)
141
139
  .catch(() => null);
142
140
  }
143
141
  }
@@ -12,7 +12,7 @@ export class TextAreaEditor extends SourceEditor {
12
12
  this.autosize = this.j.async.debounce(() => {
13
13
  this.instance.style.height = 'auto';
14
14
  this.instance.style.height = this.instance.scrollHeight + 'px';
15
- }, this.j.defaultTimeout);
15
+ }, this.j.defaultTimeout, true);
16
16
  }
17
17
  init(editor) {
18
18
  this.instance = editor.c.element('textarea', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.8.3",
3
+ "version": "4.8.5",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -20,6 +20,7 @@ export declare class size extends Plugin {
20
20
  * Set editor size by options
21
21
  */
22
22
  private __initialize;
23
+ private __immediateInitialize;
23
24
  /**
24
25
  * Manually change height
25
26
  */
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 23