jodit 4.7.4 → 4.7.6

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 (65) hide show
  1. package/CHANGELOG.md +87 -31
  2. package/README.md +4 -18
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +8 -8
  5. package/es2015/jodit.js +103 -148
  6. package/es2015/jodit.min.js +7 -7
  7. package/es2015/plugins/debug/debug.css +1 -1
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +9 -3
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  13. package/es2018/jodit.fat.min.js +8 -8
  14. package/es2018/jodit.min.js +7 -7
  15. package/es2018/plugins/debug/debug.min.js +1 -1
  16. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  17. package/es2021/jodit.css +1 -1
  18. package/es2021/jodit.fat.min.js +11 -11
  19. package/es2021/jodit.js +103 -148
  20. package/es2021/jodit.min.js +10 -10
  21. package/es2021/plugins/debug/debug.css +1 -1
  22. package/es2021/plugins/debug/debug.js +1 -1
  23. package/es2021/plugins/debug/debug.min.js +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.js +9 -3
  26. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  27. package/es2021.en/jodit.css +1 -1
  28. package/es2021.en/jodit.fat.min.js +12 -12
  29. package/es2021.en/jodit.js +103 -148
  30. package/es2021.en/jodit.min.js +11 -11
  31. package/es2021.en/plugins/debug/debug.css +1 -1
  32. package/es2021.en/plugins/debug/debug.js +1 -1
  33. package/es2021.en/plugins/debug/debug.min.js +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.js +9 -3
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  37. package/es5/jodit.css +2 -2
  38. package/es5/jodit.fat.min.js +2 -2
  39. package/es5/jodit.js +106 -152
  40. package/es5/jodit.min.css +2 -2
  41. package/es5/jodit.min.js +2 -2
  42. package/es5/plugins/debug/debug.css +1 -1
  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 +9 -3
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  48. package/es5/polyfills.fat.min.js +1 -1
  49. package/es5/polyfills.js +1 -1
  50. package/es5/polyfills.min.js +1 -1
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/decorators/autobind/autobind.d.ts +19 -1
  53. package/esm/core/decorators/autobind/autobind.js +40 -1
  54. package/esm/modules/file-browser/data-provider.js +2 -17
  55. package/esm/modules/uploader/helpers/send.js +17 -11
  56. package/esm/modules/widget/file-selector/file-selector.js +5 -3
  57. package/esm/plugins/resize-handler/resize-handler.js +10 -5
  58. package/esm/plugins/size/size.js +8 -6
  59. package/esm/plugins/speech-recognize/helpers/recognize-manager.js +13 -9
  60. package/esm/tsconfig.json +1 -1
  61. package/esm/types/uploader.d.ts +14 -0
  62. package/package.json +1 -1
  63. package/types/core/decorators/autobind/autobind.d.ts +19 -1
  64. package/types/tsconfig.json +1 -1
  65. package/types/types/uploader.d.ts +14 -0
package/CHANGELOG.md CHANGED
@@ -9,6 +9,64 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.7.6
13
+
14
+ #### :boom: Breaking Change
15
+
16
+ - **`@autobind` decorator now only supports methods, not classes**
17
+ - Replaced external `autobind-decorator` dependency with internal implementation
18
+ - The old package is no longer maintained (last release was 7 years ago)
19
+ - **Migration Option 1** (Recommended): Apply `@autobind` to individual methods:
20
+ ```typescript
21
+ // Before (no longer supported):
22
+ @autobind
23
+ class MyClass {
24
+ method1() { }
25
+ method2() { }
26
+ }
27
+
28
+ // After:
29
+ class MyClass {
30
+ @autobind
31
+ method1() { }
32
+
33
+ @autobind
34
+ method2() { }
35
+ }
36
+ ```
37
+ - **Migration Option 2** (If you need class-level binding): Install and use the original package directly:
38
+ ```bash
39
+ npm install autobind-decorator
40
+ ```
41
+ ```typescript
42
+ import autobind from 'autobind-decorator';
43
+
44
+ @autobind
45
+ class MyClass {
46
+ method1() { }
47
+ method2() { }
48
+ }
49
+ ```
50
+ Note: `autobind-decorator` package is no longer maintained, but it still works if you need class-level binding.
51
+ - Internal affected files: `data-provider.ts`, `resize-handler.ts`, `size.ts`, `recognize-manager.ts`
52
+
53
+ ## 4.7.5
54
+
55
+ #### :rocket: New Feature
56
+
57
+ - Added method `uploader.customUploadFunction`. This method can be used to replace the function of uploading files
58
+ ```javascript
59
+ Jodit.make('#editor', {
60
+ uploader: {
61
+ customUploadFunction: (requestData, showProgress) =>
62
+ fetch(requestData).then(res => {
63
+ showProgress(100);
64
+ return res.json();
65
+ })
66
+ }
67
+ });
68
+ ```
69
+
12
70
  ## 4.7.1
13
71
 
14
72
  #### :boom: Breaking Change
@@ -17,7 +75,6 @@
17
75
  You can include them manually by importing `jodit/es5/polyfills.min.js`
18
76
  - Use `swc-loader` for build instead of `ts-loader` for better performance and smaller bundle size.
19
77
 
20
-
21
78
  #### :house: Internal
22
79
 
23
80
  ```
@@ -70,8 +127,8 @@
70
127
  #### :rocket: New Feature and :boom: Breaking Change
71
128
 
72
129
  - Added `table.splitBlockOnInsertTable` option to control table insertion behavior ([#1295](https://github.com/xdan/jodit/issues/1295))
73
- - When `true` (default): splits the current block when inserting a table
74
- - When `false`: inserts table after the current block without splitting it
130
+ - When `true` (default): splits the current block when inserting a table
131
+ - When `false`: inserts table after the current block without splitting it
75
132
 
76
133
  ## 4.6.14
77
134
 
@@ -82,10 +139,9 @@
82
139
  #### :bug: Bug Fix
83
140
 
84
141
  - Fixed HTML structure destruction when applying inline styles to partial text selections within block elements
85
- - Prevented block elements (divs, paragraphs) from being split into multiple fragments when applying inline styles
86
- - Modified style application to create proper span wrappers inside existing elements instead of extracting parts
87
- - Preserves block element structure while allowing style application (PR #1284)
88
-
142
+ - Prevented block elements (divs, paragraphs) from being split into multiple fragments when applying inline styles
143
+ - Modified style application to create proper span wrappers inside existing elements instead of extracting parts
144
+ - Preserves block element structure while allowing style application (PR #1284)
89
145
 
90
146
  ## 4.6.12
91
147
 
@@ -98,15 +154,15 @@ Remove reconcileArrays functionality and associated tests
98
154
  #### :rocket: New Feature
99
155
 
100
156
  - Added ability to insert UI elements at specific index positions in UIGroup using the `append` method
101
- - `group.append(element, 0)` - inserts at the beginning
102
- - `group.append(element, index)` - inserts at specific position
103
- - Maintains backward compatibility with existing `append(element, distElement)` usage
157
+ - `group.append(element, 0)` - inserts at the beginning
158
+ - `group.append(element, index)` - inserts at specific position
159
+ - Maintains backward compatibility with existing `append(element, distElement)` usage
104
160
 
105
161
  - Added array reconciliation utilities in `core/helpers/array`
106
- - `reconcileArrays` - compares two arrays and returns differences (added, removed, kept, moved items)
107
- - `applyArrayReconciliation` - applies reconciliation patches to transform one array into another
108
- - Supports both primitive arrays and object arrays with custom key functions
109
- - Useful for efficient list updates and state management
162
+ - `reconcileArrays` - compares two arrays and returns differences (added, removed, kept, moved items)
163
+ - `applyArrayReconciliation` - applies reconciliation patches to transform one array into another
164
+ - Supports both primitive arrays and object arrays with custom key functions
165
+ - Useful for efficient list updates and state management
110
166
 
111
167
  ## 4.6.6
112
168
 
@@ -141,20 +197,21 @@ Remove reconcileArrays functionality and associated tests
141
197
  - When the option is turned on `extraPlugins`. If the plugin module does not find the desired plugin, then it tries to load it from the same folder where the plugin itself.
142
198
  For example, if you connect the Jodit script from `./node_moudules/jodit/es2018/jodit.js` and you have a plugin `./node_moudules/jodit/es2018/plugins/my-plugin/`
143
199
 
144
- ```js
145
- Jodit.make ('#Editor', {
146
- extraPlugins: ['my-plugin'] // Will Be Loaded from ./node_modules/jodit/plugins/my-plugin/my-plugin.js
147
- });
148
- `` `
200
+ ````js
201
+ Jodit.make ('#Editor', {
202
+ extraPlugins: ['my-plugin'] // Will Be Loaded from ./node_modules/jodit/plugins/my-plugin/my-plugin.js
203
+ });
204
+ `` `
149
205
 
150
- But now if you connect Jodit from `./node_moudules/jodit/es2018/jodit.min.js`
151
- then the plugin will be loaded from `./node_modules/jodit/es2018/plugins/my-plugin/my-plugin.min.js`
206
+ But now if you connect Jodit from `./node_moudules/jodit/es2018/jodit.min.js`
207
+ then the plugin will be loaded from `./node_modules/jodit/es2018/plugins/my-plugin/my-plugin.min.js`
152
208
 
153
- ```js
154
- Jodit.make ('#Editor', {
155
- extraPlugins: ['my-plugin'] // Will Be Loaded from ./node_modules/jodit/plugins/my-plugin/my-plugin.min.js
156
- });
157
- `` `
209
+ ```js
210
+ Jodit.make ('#Editor', {
211
+ extraPlugins: ['my-plugin'] // Will Be Loaded from ./node_modules/jodit/plugins/my-plugin/my-plugin.min.js
212
+ });
213
+ `` `
214
+ ````
158
215
 
159
216
  ## 4.6.1
160
217
 
@@ -229,10 +286,10 @@ console.log(Jodit.fatMode); // true`
229
286
 
230
287
  ```js
231
288
  const editor = Jodit.make('#editor', {
232
- readonly: true,
233
- link: {
234
- preventReadOnlyNavigation: true
235
- }
289
+ readonly: true,
290
+ link: {
291
+ preventReadOnlyNavigation: true
292
+ }
236
293
  });
237
294
  ```
238
295
 
@@ -1268,7 +1325,6 @@ webpack 5.88.2 → 5.89.0
1268
1325
  }
1269
1326
  ```
1270
1327
  - Deprecated were removed
1271
-
1272
1328
  - `Dom.isTag` does not support array
1273
1329
  - `Select.applyStyle` method was removed
1274
1330
  - `history.observer` was removed
package/README.md CHANGED
@@ -58,13 +58,6 @@ ES2021 Version (for modern browsers only):
58
58
  #### ESM Modules:
59
59
 
60
60
  ```html
61
- <script type="importmap">
62
- {
63
- "imports": {
64
- "autobind-decorator": "https://unpkg.com/autobind-decorator@2.4.0/lib/esm/index.js"
65
- }
66
- }
67
- </script>
68
61
  <link rel="stylesheet" href="./node_modules/jodit/es2021/jodit.min.css" />
69
62
  <script type="module">
70
63
  import { Jodit } from './node_modules/jodit/esm/index.js';
@@ -79,13 +72,6 @@ The ESM modules automatically include only the [basic set of plugins](https://gi
79
72
  You can manually include additional plugins and languages as needed.
80
73
 
81
74
  ```html
82
- <script type="importmap">
83
- {
84
- "imports": {
85
- "autobind-decorator": "https://unpkg.com/autobind-decorator@2.4.0/lib/esm/index.js"
86
- }
87
- }
88
- </script>
89
75
  <link rel="stylesheet" href="./node_modules/jodit/es2021/jodit.min.css" />
90
76
  <script type="module">
91
77
  import { Jodit } from './node_modules/jodit/esm/index.js';
@@ -114,9 +100,9 @@ You can manually include additional plugins and languages as needed.
114
100
  ```html
115
101
  <link
116
102
  rel="stylesheet"
117
- href="https://cdnjs.cloudflare.com/ajax/libs/jodit/4.0.1/es2021/jodit.min.css"
103
+ href="https://cdnjs.cloudflare.com/ajax/libs/jodit/4.7.6/es2021/jodit.min.css"
118
104
  />
119
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jodit/4.0.1/es2021/jodit.min.js"></script>
105
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jodit/4.7.6/es2021/jodit.min.js"></script>
120
106
  ```
121
107
 
122
108
  #### unpkg
@@ -124,9 +110,9 @@ You can manually include additional plugins and languages as needed.
124
110
  ```html
125
111
  <link
126
112
  rel="stylesheet"
127
- href="https://unpkg.com/jodit@4.0.1/es2021/jodit.min.css"
113
+ href="https://unpkg.com/jodit@4.7.6/es2021/jodit.min.css"
128
114
  />
129
- <script src="https://unpkg.com/jodit@4.0.1/es2021/jodit.min.js"></script>
115
+ <script src="https://unpkg.com/jodit@4.7.6/es2021/jodit.min.js"></script>
130
116
  ```
131
117
 
132
118
  ### Usage
package/es2015/jodit.css 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.7.4
4
+ * Version: v4.7.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */