jodit 4.11.13 → 4.11.15
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 +34 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +5 -5
- package/es2015/jodit.js +286 -40
- package/es2015/jodit.min.js +5 -5
- 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 +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +7 -7
- package/es2018/jodit.min.js +26 -26
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +12 -8
- package/es2021/jodit.js +102 -4
- package/es2021/jodit.min.js +25 -21
- 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 +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +10 -6
- package/es2021.en/jodit.js +102 -4
- package/es2021.en/jodit.min.js +9 -5
- 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 +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +403 -47
- 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 +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- 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/request/ajax.d.ts +1 -0
- package/esm/core/request/ajax.js +104 -0
- package/esm/plugins/image-properties/ui/ui-image-main-tab.js +2 -2
- package/esm/types/ajax.d.ts +9 -0
- package/package.json +1 -1
- package/types/core/request/ajax.d.ts +1 -0
- package/types/types/ajax.d.ts +9 -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.11.
|
|
4
|
+
* Version: v4.11.15
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1758,7 +1758,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1758
1758
|
* ```
|
|
1759
1759
|
* @packageDocumentation
|
|
1760
1760
|
* @module constants
|
|
1761
|
-
*/ const APP_VERSION = "4.11.
|
|
1761
|
+
*/ const APP_VERSION = "4.11.15";
|
|
1762
1762
|
// prettier-ignore
|
|
1763
1763
|
const ES = "es2021";
|
|
1764
1764
|
const IS_ES_MODERN = true;
|
|
@@ -9632,6 +9632,104 @@ class Ajax {
|
|
|
9632
9632
|
}, 0);
|
|
9633
9633
|
});
|
|
9634
9634
|
}
|
|
9635
|
+
async *stream() {
|
|
9636
|
+
this.__activated = true;
|
|
9637
|
+
const { xhr, o } = this;
|
|
9638
|
+
const request = this.prepareRequest();
|
|
9639
|
+
let lastIndex = 0;
|
|
9640
|
+
let buffer = '';
|
|
9641
|
+
const queue = [];
|
|
9642
|
+
let waitResolve = null;
|
|
9643
|
+
let done = false;
|
|
9644
|
+
let streamError = null;
|
|
9645
|
+
const notify = ()=>{
|
|
9646
|
+
if (waitResolve) {
|
|
9647
|
+
const r = waitResolve;
|
|
9648
|
+
waitResolve = null;
|
|
9649
|
+
r();
|
|
9650
|
+
}
|
|
9651
|
+
};
|
|
9652
|
+
const processChunk = (final)=>{
|
|
9653
|
+
const text = xhr.responseText;
|
|
9654
|
+
buffer += text.substring(lastIndex);
|
|
9655
|
+
lastIndex = text.length;
|
|
9656
|
+
const events = buffer.split('\n\n');
|
|
9657
|
+
buffer = final ? '' : events.pop() ?? '';
|
|
9658
|
+
for (const event of events){
|
|
9659
|
+
const trimmed = event.trim();
|
|
9660
|
+
if (!trimmed) {
|
|
9661
|
+
continue;
|
|
9662
|
+
}
|
|
9663
|
+
const dataLines = [];
|
|
9664
|
+
for (const line of trimmed.split('\n')){
|
|
9665
|
+
if (line.startsWith('data: ')) {
|
|
9666
|
+
dataLines.push(line.slice(6));
|
|
9667
|
+
} else if (line.startsWith('data:')) {
|
|
9668
|
+
dataLines.push(line.slice(5));
|
|
9669
|
+
}
|
|
9670
|
+
}
|
|
9671
|
+
if (dataLines.length) {
|
|
9672
|
+
queue.push(dataLines.join('\n'));
|
|
9673
|
+
}
|
|
9674
|
+
}
|
|
9675
|
+
notify();
|
|
9676
|
+
};
|
|
9677
|
+
xhr.onprogress = ()=>processChunk(false);
|
|
9678
|
+
xhr.onload = ()=>{
|
|
9679
|
+
processChunk(true);
|
|
9680
|
+
done = true;
|
|
9681
|
+
this.__isFulfilled = true;
|
|
9682
|
+
notify();
|
|
9683
|
+
};
|
|
9684
|
+
xhr.onerror = ()=>{
|
|
9685
|
+
streamError = jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_6__.connection('Connection error');
|
|
9686
|
+
done = true;
|
|
9687
|
+
this.__isFulfilled = true;
|
|
9688
|
+
notify();
|
|
9689
|
+
};
|
|
9690
|
+
xhr.onabort = ()=>{
|
|
9691
|
+
streamError = jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_6__.abort('Abort connection');
|
|
9692
|
+
done = true;
|
|
9693
|
+
this.__isFulfilled = true;
|
|
9694
|
+
notify();
|
|
9695
|
+
};
|
|
9696
|
+
xhr.withCredentials = o.withCredentials ?? false;
|
|
9697
|
+
const { url, data, method } = request;
|
|
9698
|
+
xhr.open(method, url, true);
|
|
9699
|
+
if (o.contentType && xhr.setRequestHeader) {
|
|
9700
|
+
xhr.setRequestHeader('Content-type', o.contentType);
|
|
9701
|
+
}
|
|
9702
|
+
let { headers } = o;
|
|
9703
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(headers)) {
|
|
9704
|
+
headers = await headers.call(this);
|
|
9705
|
+
}
|
|
9706
|
+
if (headers && xhr.setRequestHeader) {
|
|
9707
|
+
Object.keys(headers).forEach((key)=>{
|
|
9708
|
+
xhr.setRequestHeader(key, headers[key]);
|
|
9709
|
+
});
|
|
9710
|
+
}
|
|
9711
|
+
xhr.send(data ? this.__buildParams(data) : undefined);
|
|
9712
|
+
try {
|
|
9713
|
+
while(true){
|
|
9714
|
+
if (queue.length > 0) {
|
|
9715
|
+
yield queue.shift();
|
|
9716
|
+
} else if (done) {
|
|
9717
|
+
break;
|
|
9718
|
+
} else {
|
|
9719
|
+
await new Promise((r)=>{
|
|
9720
|
+
waitResolve = r;
|
|
9721
|
+
});
|
|
9722
|
+
}
|
|
9723
|
+
}
|
|
9724
|
+
} finally{
|
|
9725
|
+
if (!this.__isFulfilled) {
|
|
9726
|
+
this.abort();
|
|
9727
|
+
}
|
|
9728
|
+
}
|
|
9729
|
+
if (streamError) {
|
|
9730
|
+
throw streamError;
|
|
9731
|
+
}
|
|
9732
|
+
}
|
|
9635
9733
|
prepareRequest() {
|
|
9636
9734
|
if (!this.o.url) {
|
|
9637
9735
|
throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_6__.error('Need URL for AJAX request');
|
|
@@ -31849,8 +31947,8 @@ class UIImageMainTab extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_
|
|
|
31849
31947
|
<div class="jodit-input_group">
|
|
31850
31948
|
<input class="jodit-input &__imageSrc" type="text"/>
|
|
31851
31949
|
<div class="jodit-input_group-buttons &__fixImage">
|
|
31852
|
-
|
|
31853
|
-
|
|
31950
|
+
<a class="jodit-button &__changeImage" data-ref="changeImage">*image*</a>
|
|
31951
|
+
<a class="jodit-button &__editImage" data-ref="editImage">*crop*</a>
|
|
31854
31952
|
</div>
|
|
31855
31953
|
</div>
|
|
31856
31954
|
</div>
|