jodit 4.13.20 → 4.13.22
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 +12 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +27 -33
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +4 -4
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +4 -4
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +4 -4
- 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.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +25 -33
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +5 -5
- 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.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +25 -33
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +5 -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.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +53 -33
- package/es5/jodit.min.css +3 -3
- 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 +2 -2
- package/es5/polyfills.js +213 -87
- package/es5/polyfills.min.js +2 -2
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/scroll-into-view.js +5 -1
- package/esm/modules/uploader/helpers/data-uri-to-blob.d.ts +3 -1
- package/esm/modules/uploader/helpers/data-uri-to-blob.js +7 -8
- package/esm/plugins/image-processor/image-processor.js +11 -19
- package/package.json +1 -1
- package/types/modules/uploader/helpers/data-uri-to-blob.d.ts +3 -1
package/es5/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.13.
|
|
4
|
+
* Version: v4.13.22
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2107
2107
|
* @packageDocumentation
|
|
2108
2108
|
* @module constants
|
|
2109
2109
|
*/
|
|
2110
|
-
var APP_VERSION = "4.13.
|
|
2110
|
+
var APP_VERSION = "4.13.22";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -10214,7 +10214,13 @@ var map = {};
|
|
|
10214
10214
|
root.scrollTop = root.scrollTop < alignBottom ? alignBottom : elm.offsetTop;
|
|
10215
10215
|
}
|
|
10216
10216
|
if (!inView(elm, root, doc)) {
|
|
10217
|
-
|
|
10217
|
+
// `block: 'nearest'` scrolls the page the minimal distance (one
|
|
10218
|
+
// line while typing), while the default `block: 'start'` aligns
|
|
10219
|
+
// the element to the viewport top and the page jumps like
|
|
10220
|
+
// PageDown was pressed
|
|
10221
|
+
elm.scrollIntoView({
|
|
10222
|
+
block: 'nearest'
|
|
10223
|
+
});
|
|
10218
10224
|
}
|
|
10219
10225
|
}
|
|
10220
10226
|
}
|
|
@@ -30094,6 +30100,8 @@ function buildData(uploader, data) {
|
|
|
30094
30100
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30095
30101
|
/* harmony export */ dataURItoBlob: function() { return /* binding */ dataURItoBlob; }
|
|
30096
30102
|
/* harmony export */ });
|
|
30103
|
+
/* harmony import */ var _swc_helpers_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90625);
|
|
30104
|
+
|
|
30097
30105
|
/*!
|
|
30098
30106
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
30099
30107
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -30101,13 +30109,13 @@ function buildData(uploader, data) {
|
|
|
30101
30109
|
*/ /**
|
|
30102
30110
|
* @module modules/uploader
|
|
30103
30111
|
*/ /**
|
|
30104
|
-
* Convert dataURI to Blob
|
|
30112
|
+
* Convert dataURI to Blob. Both base64 and percent-encoded payloads are
|
|
30113
|
+
* supported — `data:image/svg+xml,%3Csvg...` is as valid as
|
|
30114
|
+
* `data:image/png;base64,...`
|
|
30105
30115
|
*/ function dataURItoBlob(dataURI) {
|
|
30106
|
-
|
|
30107
|
-
|
|
30108
|
-
var
|
|
30109
|
-
mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0], // write the bytes of the string to an ArrayBuffer
|
|
30110
|
-
ab = new ArrayBuffer(byteString.length), ia = new Uint8Array(ab);
|
|
30116
|
+
var _ref;
|
|
30117
|
+
var _header_split_;
|
|
30118
|
+
var _dataURI_split = (0,_swc_helpers_to_array__WEBPACK_IMPORTED_MODULE_0__._)(dataURI.split(',')), header = _dataURI_split[0], rest = _dataURI_split.slice(1), payload = rest.join(','), mimeString = (_ref = (_header_split_ = header.split(':')[1]) === null || _header_split_ === void 0 ? void 0 : _header_split_.split(';')[0]) !== null && _ref !== void 0 ? _ref : '', byteString = /;base64/i.test(header) ? atob(payload) : decodeURIComponent(payload), ab = new ArrayBuffer(byteString.length), ia = new Uint8Array(ab);
|
|
30111
30119
|
for(var i = 0; i < byteString.length; i += 1){
|
|
30112
30120
|
ia[i] = byteString.charCodeAt(i);
|
|
30113
30121
|
}
|
|
@@ -38340,7 +38348,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
38340
38348
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28077);
|
|
38341
38349
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
|
|
38342
38350
|
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(91206);
|
|
38343
|
-
/* harmony import */ var
|
|
38351
|
+
/* harmony import */ var jodit_modules_uploader_helpers_data_uri_to_blob__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(23112);
|
|
38352
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(51034);
|
|
38344
38353
|
/*!
|
|
38345
38354
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38346
38355
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38363,6 +38372,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
38363
38372
|
|
|
38364
38373
|
|
|
38365
38374
|
|
|
38375
|
+
|
|
38366
38376
|
var JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
38367
38377
|
var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
38368
38378
|
/**
|
|
@@ -38514,7 +38524,15 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
38514
38524
|
if (typeof ArrayBuffer === 'undefined' || typeof URL === 'undefined') {
|
|
38515
38525
|
return;
|
|
38516
38526
|
}
|
|
38517
|
-
var dataUri = elm.src
|
|
38527
|
+
var dataUri = elm.src;
|
|
38528
|
+
var blob;
|
|
38529
|
+
try {
|
|
38530
|
+
blob = (0,jodit_modules_uploader_helpers_data_uri_to_blob__WEBPACK_IMPORTED_MODULE_13__.dataURItoBlob)(dataUri);
|
|
38531
|
+
} catch (unused) {
|
|
38532
|
+
// A data URI the browser accepts but we cannot decode is not worth
|
|
38533
|
+
// breaking the editor over — keep the image as it is
|
|
38534
|
+
return;
|
|
38535
|
+
}
|
|
38518
38536
|
elm.src = URL.createObjectURL(blob);
|
|
38519
38537
|
editor.e.fire('internalUpdate');
|
|
38520
38538
|
var buffer = editor.buffer;
|
|
@@ -38522,28 +38540,6 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
38522
38540
|
list[elm.src] = dataUri;
|
|
38523
38541
|
editor.buffer.set(JODIT_IMAGE_BLOB_ID, list);
|
|
38524
38542
|
}
|
|
38525
|
-
// https://stackoverflow.com/a/12300351
|
|
38526
|
-
function dataURItoBlob(dataURI) {
|
|
38527
|
-
// convert base64 to raw binary data held in a string
|
|
38528
|
-
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
|
|
38529
|
-
var byteString = atob(dataURI.split(',')[1]);
|
|
38530
|
-
// separate out the mime component
|
|
38531
|
-
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
|
|
38532
|
-
// write the bytes of the string to an ArrayBuffer
|
|
38533
|
-
var ab = new ArrayBuffer(byteString.length);
|
|
38534
|
-
// create a view into the buffer
|
|
38535
|
-
var ia = new Uint8Array(ab);
|
|
38536
|
-
// set the bytes of the buffer to the correct values
|
|
38537
|
-
for(var i = 0; i < byteString.length; i++){
|
|
38538
|
-
ia[i] = byteString.charCodeAt(i);
|
|
38539
|
-
}
|
|
38540
|
-
// write the ArrayBuffer to a blob, and you're done
|
|
38541
|
-
return new Blob([
|
|
38542
|
-
ab
|
|
38543
|
-
], {
|
|
38544
|
-
type: mimeString
|
|
38545
|
-
});
|
|
38546
|
-
}
|
|
38547
38543
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_10__.pluginSystem.add('imageProcessor', imageProcessor);
|
|
38548
38544
|
|
|
38549
38545
|
|
|
@@ -54009,6 +54005,7 @@ function _inherits(subClass, superClass) {
|
|
|
54009
54005
|
/* harmony export */ _: function() { return /* binding */ _instanceof; }
|
|
54010
54006
|
/* harmony export */ });
|
|
54011
54007
|
function _instanceof(left, right) {
|
|
54008
|
+
"@swc/helpers - instanceof";
|
|
54012
54009
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
54013
54010
|
return !!right[Symbol.hasInstance](left);
|
|
54014
54011
|
} else return left instanceof right;
|
|
@@ -54303,6 +54300,29 @@ function _super_prop_base(object, property) {
|
|
|
54303
54300
|
|
|
54304
54301
|
|
|
54305
54302
|
|
|
54303
|
+
/***/ }),
|
|
54304
|
+
|
|
54305
|
+
/***/ 90625:
|
|
54306
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
54307
|
+
|
|
54308
|
+
"use strict";
|
|
54309
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
54310
|
+
/* harmony export */ _: function() { return /* binding */ _to_array; }
|
|
54311
|
+
/* harmony export */ });
|
|
54312
|
+
/* harmony import */ var _array_with_holes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43456);
|
|
54313
|
+
/* harmony import */ var _iterable_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43232);
|
|
54314
|
+
/* harmony import */ var _non_iterable_rest_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27301);
|
|
54315
|
+
/* harmony import */ var _unsupported_iterable_to_array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12600);
|
|
54316
|
+
|
|
54317
|
+
|
|
54318
|
+
|
|
54319
|
+
|
|
54320
|
+
function _to_array(arr) {
|
|
54321
|
+
return (0,_array_with_holes_js__WEBPACK_IMPORTED_MODULE_0__._)(arr) || (0,_iterable_to_array_js__WEBPACK_IMPORTED_MODULE_1__._)(arr) || (0,_unsupported_iterable_to_array_js__WEBPACK_IMPORTED_MODULE_3__._)(arr) || (0,_non_iterable_rest_js__WEBPACK_IMPORTED_MODULE_2__._)();
|
|
54322
|
+
}
|
|
54323
|
+
|
|
54324
|
+
|
|
54325
|
+
|
|
54306
54326
|
/***/ }),
|
|
54307
54327
|
|
|
54308
54328
|
/***/ 42395:
|