jodit 4.2.32 → 4.2.33
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 +11 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +27 -16
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +26 -15
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.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 +2 -2
- package/es2021/jodit.js +26 -15
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +26 -15
- package/es2021.en/jodit.min.js +2 -2
- 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/164.fat.min.js +1 -1
- package/es5/164.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +50 -27
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- 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/esm/core/constants.js +1 -1
- package/esm/plugins/search/helpers/highlight-text-ranges.d.ts +2 -1
- package/esm/plugins/search/helpers/highlight-text-ranges.js +12 -3
- package/esm/plugins/search/search.d.ts +2 -2
- package/esm/plugins/search/search.js +8 -7
- package/esm/plugins/search/ui/search.js +3 -3
- package/package.json +1 -1
- package/types/plugins/search/helpers/highlight-text-ranges.d.ts +2 -1
- package/types/plugins/search/search.d.ts +2 -2
package/es2021.en/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.2.
|
|
4
|
+
* Version: v4.2.33
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1736,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1736
1736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1737
1737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1738
1738
|
*/
|
|
1739
|
-
const APP_VERSION = "4.2.
|
|
1739
|
+
const APP_VERSION = "4.2.33";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2021";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -37062,6 +37062,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
37062
37062
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
37063
37063
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
37064
37064
|
/* harmony export */ });
|
|
37065
|
+
/* unused harmony export clearNativeSelection */
|
|
37065
37066
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
37066
37067
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
37067
37068
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
|
|
@@ -37123,8 +37124,9 @@ function getSelectionWrappers(root) {
|
|
|
37123
37124
|
/**
|
|
37124
37125
|
* @private
|
|
37125
37126
|
*/
|
|
37126
|
-
function clearSelectionWrappers(
|
|
37127
|
-
getSelectionWrappers(
|
|
37127
|
+
function clearSelectionWrappers(jodit) {
|
|
37128
|
+
getSelectionWrappers(jodit.editor).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
|
|
37129
|
+
clearNativeSelection(jodit);
|
|
37128
37130
|
}
|
|
37129
37131
|
/**
|
|
37130
37132
|
* @private
|
|
@@ -37149,7 +37151,6 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
37149
37151
|
range.setEnd(rng.endContainer, rng.endOffset);
|
|
37150
37152
|
return range;
|
|
37151
37153
|
});
|
|
37152
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37153
37154
|
const searchHighlight = new Highlight(...ranges);
|
|
37154
37155
|
// @ts-ignore
|
|
37155
37156
|
CSS.highlights.clear();
|
|
@@ -37160,6 +37161,15 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
37160
37161
|
}
|
|
37161
37162
|
return false;
|
|
37162
37163
|
}
|
|
37164
|
+
function clearNativeSelection(jodit) {
|
|
37165
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
37166
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37167
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
37168
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
37169
|
+
// @ts-ignore
|
|
37170
|
+
CSS.highlights.clear();
|
|
37171
|
+
}
|
|
37172
|
+
}
|
|
37163
37173
|
function normalizeRanges(rng, restRanges, ci) {
|
|
37164
37174
|
const startText = rng.startContainer.nodeValue;
|
|
37165
37175
|
let diff = 0;
|
|
@@ -37333,11 +37343,11 @@ class SentenceFinder {
|
|
|
37333
37343
|
*
|
|
37334
37344
|
* @example
|
|
37335
37345
|
* ```typescript
|
|
37336
|
-
*
|
|
37346
|
+
* const jodit = Jodit.make('#editor', {
|
|
37337
37347
|
* useSearch: false
|
|
37338
37348
|
* });
|
|
37339
37349
|
* // or
|
|
37340
|
-
*
|
|
37350
|
+
* const jodit = Jodit.make('#editor', {
|
|
37341
37351
|
* disablePlugins: 'search'
|
|
37342
37352
|
* });
|
|
37343
37353
|
* ```
|
|
@@ -37416,7 +37426,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37416
37426
|
rng.deleteContents();
|
|
37417
37427
|
const textNode = this.j.createInside.text(this.ui.replace);
|
|
37418
37428
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeInsertNode(rng, textNode);
|
|
37419
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
37429
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
37420
37430
|
this.j.s.setCursorAfter(textNode);
|
|
37421
37431
|
this.tryScrollToElement(textNode);
|
|
37422
37432
|
this.cache = {};
|
|
@@ -37443,7 +37453,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37443
37453
|
!(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
37444
37454
|
this.drawPromise?.rejectCallback();
|
|
37445
37455
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
37446
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
37456
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
37447
37457
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
37448
37458
|
}
|
|
37449
37459
|
this.previousQuery = query;
|
|
@@ -37556,14 +37566,15 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37556
37566
|
this.ui.close();
|
|
37557
37567
|
})
|
|
37558
37568
|
.on(this.ui, 'afterClose', () => {
|
|
37559
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
37569
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
37560
37570
|
this.ui.currentIndex = 0;
|
|
37561
37571
|
this.ui.count = 0;
|
|
37562
37572
|
this.cache = {};
|
|
37573
|
+
editor.focus();
|
|
37563
37574
|
})
|
|
37564
37575
|
.on('click', () => {
|
|
37565
37576
|
this.ui.currentIndex = 0;
|
|
37566
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
37577
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
37567
37578
|
})
|
|
37568
37579
|
.on('change.search', () => {
|
|
37569
37580
|
this.cache = {};
|
|
@@ -37574,7 +37585,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37574
37585
|
this.ui.selInfo = null;
|
|
37575
37586
|
}
|
|
37576
37587
|
if (this.ui.isOpened) {
|
|
37577
|
-
this.updateCounters();
|
|
37588
|
+
void this.updateCounters();
|
|
37578
37589
|
}
|
|
37579
37590
|
}, editor.defaultTimeout))
|
|
37580
37591
|
.on('searchNext.search searchPrevious.search', () => {
|
|
@@ -37754,7 +37765,7 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
37754
37765
|
return false;
|
|
37755
37766
|
})
|
|
37756
37767
|
.on(next, 'pointerdown', () => {
|
|
37757
|
-
jodit.e.fire('searchNext');
|
|
37768
|
+
void jodit.e.fire('searchNext');
|
|
37758
37769
|
return false;
|
|
37759
37770
|
})
|
|
37760
37771
|
.on(prev, 'pointerdown', () => {
|
|
@@ -37764,12 +37775,12 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
37764
37775
|
.on(this.queryInput, 'input', () => {
|
|
37765
37776
|
this.setMod('empty-query', !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.trim)(this.queryInput.value).length);
|
|
37766
37777
|
})
|
|
37767
|
-
.on(this.queryInput, 'keydown', this.j.async.debounce((e) => {
|
|
37778
|
+
.on(this.queryInput, 'keydown', this.j.async.debounce(async (e) => {
|
|
37768
37779
|
switch (e.key) {
|
|
37769
37780
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
|
|
37770
37781
|
e.preventDefault();
|
|
37771
37782
|
e.stopImmediatePropagation();
|
|
37772
|
-
if (jodit.e.fire('searchNext')) {
|
|
37783
|
+
if (await jodit.e.fire('searchNext')) {
|
|
37773
37784
|
this.close();
|
|
37774
37785
|
}
|
|
37775
37786
|
break;
|