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.
- package/CHANGELOG.md +87 -31
- package/README.md +4 -18
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +103 -148
- package/es2015/jodit.min.js +7 -7
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +11 -11
- package/es2021/jodit.js +103 -148
- package/es2021/jodit.min.js +10 -10
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +12 -12
- package/es2021.en/jodit.js +103 -148
- package/es2021.en/jodit.min.js +11 -11
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +106 -152
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/decorators/autobind/autobind.d.ts +19 -1
- package/esm/core/decorators/autobind/autobind.js +40 -1
- package/esm/modules/file-browser/data-provider.js +2 -17
- package/esm/modules/uploader/helpers/send.js +17 -11
- package/esm/modules/widget/file-selector/file-selector.js +5 -3
- package/esm/plugins/resize-handler/resize-handler.js +10 -5
- package/esm/plugins/size/size.js +8 -6
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +13 -9
- package/esm/tsconfig.json +1 -1
- package/esm/types/uploader.d.ts +14 -0
- package/package.json +1 -1
- package/types/core/decorators/autobind/autobind.d.ts +19 -1
- package/types/tsconfig.json +1 -1
- 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
|
-
|
|
74
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
151
|
-
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
113
|
+
href="https://unpkg.com/jodit@4.7.6/es2021/jodit.min.css"
|
|
128
114
|
/>
|
|
129
|
-
<script src="https://unpkg.com/jodit@4.
|
|
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