jodit 4.13.16 → 4.13.18
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.js +3 -3
- package/es2015/jodit.js +26 -6
- package/es2015/jodit.min.js +3 -3
- 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 +3 -3
- package/es2018/jodit.min.js +3 -3
- 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 +4 -4
- package/es2021/jodit.js +26 -6
- package/es2021/jodit.min.js +4 -4
- 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 +4 -4
- package/es2021.en/jodit.js +26 -6
- package/es2021.en/jodit.min.js +4 -4
- 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 +26 -6
- 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/helpers/utils/scroll-into-view.d.ts +0 -3
- package/esm/core/helpers/utils/scroll-into-view.js +12 -2
- package/esm/modules/uploader/helpers/send-files.js +16 -2
- package/package.json +1 -1
- package/types/core/helpers/utils/scroll-into-view.d.ts +0 -3
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.13.
|
|
4
|
+
* Version: v4.13.18
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1843,7 +1843,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1843
1843
|
* ```
|
|
1844
1844
|
* @packageDocumentation
|
|
1845
1845
|
* @module constants
|
|
1846
|
-
*/ const APP_VERSION = "4.13.
|
|
1846
|
+
*/ const APP_VERSION = "4.13.18";
|
|
1847
1847
|
// prettier-ignore
|
|
1848
1848
|
const ES = "es2021";
|
|
1849
1849
|
const IS_ES_MODERN = true;
|
|
@@ -9060,6 +9060,14 @@ const map = {};
|
|
|
9060
9060
|
/**
|
|
9061
9061
|
* @module helpers/utils
|
|
9062
9062
|
*/ /**
|
|
9063
|
+
* `getBoundingClientRect` returns fractional values while `scrollTop`,
|
|
9064
|
+
* `offsetTop` and `clientHeight` are rounded to integers, so a container
|
|
9065
|
+
* scrolled right up to its limit can still appear to clip the element by a
|
|
9066
|
+
* fraction of a pixel. Treat anything clipped by less than a pixel as
|
|
9067
|
+
* visible — otherwise `scrollIntoViewIfNeeded` falls through to
|
|
9068
|
+
* `elm.scrollIntoView()` and needlessly scrolls the whole page.
|
|
9069
|
+
*/ const SUBPIXEL_TOLERANCE = 1;
|
|
9070
|
+
/**
|
|
9063
9071
|
* Check if element is in view
|
|
9064
9072
|
*/ function inView(elm, root, doc) {
|
|
9065
9073
|
let rect = elm.getBoundingClientRect(), el = elm;
|
|
@@ -9072,7 +9080,7 @@ const map = {};
|
|
|
9072
9080
|
// view even though its top still fits. The `top > rect.top` guard keeps
|
|
9073
9081
|
// elements taller than the container (which can never fully fit) from
|
|
9074
9082
|
// being treated as always out of view. See #1300
|
|
9075
|
-
if (top + height > rect.bottom && top > rect.top) {
|
|
9083
|
+
if (top + height > rect.bottom + SUBPIXEL_TOLERANCE && top > rect.top) {
|
|
9076
9084
|
return false;
|
|
9077
9085
|
}
|
|
9078
9086
|
// Check if the element is out of view due to a container scrolling
|
|
@@ -9086,7 +9094,7 @@ const map = {};
|
|
|
9086
9094
|
// element scrolled above the top was wrongly reported as visible and never
|
|
9087
9095
|
// scrolled to. See #1279
|
|
9088
9096
|
const clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
|
|
9089
|
-
return (top + height <= clientHeight || top <= 0) && top + height >= 0;
|
|
9097
|
+
return (top + height <= clientHeight + SUBPIXEL_TOLERANCE || top <= 0) && top + height >= 0;
|
|
9090
9098
|
}
|
|
9091
9099
|
/**
|
|
9092
9100
|
* Scroll element into view if it is not in view
|
|
@@ -24981,6 +24989,7 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
|
|
|
24981
24989
|
return Promise.all(promises);
|
|
24982
24990
|
}
|
|
24983
24991
|
function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
|
|
24992
|
+
const readerPromises = [];
|
|
24984
24993
|
let file, i;
|
|
24985
24994
|
for(i = 0; i < fileList.length; i += 1){
|
|
24986
24995
|
file = fileList[i];
|
|
@@ -24991,7 +25000,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
|
|
|
24991
25000
|
continue;
|
|
24992
25001
|
}
|
|
24993
25002
|
const reader = new FileReader();
|
|
24994
|
-
|
|
25003
|
+
const readerPromise = uploader.j.async.promise((resolve, reject)=>{
|
|
24995
25004
|
reader.onerror = reject;
|
|
24996
25005
|
reader.onloadend = ()=>{
|
|
24997
25006
|
const resp = {
|
|
@@ -25008,10 +25017,21 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
|
|
|
25008
25017
|
resolve(resp);
|
|
25009
25018
|
};
|
|
25010
25019
|
reader.readAsDataURL(file);
|
|
25011
|
-
})
|
|
25020
|
+
});
|
|
25021
|
+
readerPromises.push(readerPromise);
|
|
25022
|
+
promises.push(readerPromise);
|
|
25012
25023
|
fileList[i] = null;
|
|
25013
25024
|
}
|
|
25014
25025
|
}
|
|
25026
|
+
// Images inserted as base64 never reach the server branch in `sendFiles`,
|
|
25027
|
+
// which is the only other place that fires `filesWereUploaded`
|
|
25028
|
+
if (readerPromises.length) {
|
|
25029
|
+
Promise.all(readerPromises).then(()=>{
|
|
25030
|
+
uploader.j.events && uploader.j.e.fire('filesWereUploaded');
|
|
25031
|
+
}).catch(()=>{
|
|
25032
|
+
// Read errors are propagated to the caller via `promises`
|
|
25033
|
+
});
|
|
25034
|
+
}
|
|
25015
25035
|
}
|
|
25016
25036
|
|
|
25017
25037
|
|