jodit 4.2.32 → 4.2.34
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 +17 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +30 -17
- 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 +29 -16
- 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 +29 -16
- 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 +29 -16
- 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 +53 -28
- 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/core/selection/style/api/list/toggle-ordered-list.js +3 -1
- package/esm/core/selection/style/api/list/wrap-list.d.ts +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/core/selection/style/api/list/wrap-list.d.ts +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.34
|
|
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.34";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2021";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -11810,7 +11810,9 @@ function unwrapList(mode, list, li, jodit, cs) {
|
|
|
11810
11810
|
(0,jodit_core_selection_style_api_extract__WEBPACK_IMPORTED_MODULE_2__/* .extractSelectedPart */ .y)(list, li, jodit);
|
|
11811
11811
|
void 0;
|
|
11812
11812
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(li.parentElement);
|
|
11813
|
-
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(li, jodit.o.enter
|
|
11813
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(li, jodit.o.enter.toLowerCase() !== 'br'
|
|
11814
|
+
? jodit.o.enter
|
|
11815
|
+
: jodit.createInside.fragment(), jodit.createInside);
|
|
11814
11816
|
}
|
|
11815
11817
|
|
|
11816
11818
|
|
|
@@ -37062,6 +37064,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
37062
37064
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
37063
37065
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
37064
37066
|
/* harmony export */ });
|
|
37067
|
+
/* unused harmony export clearNativeSelection */
|
|
37065
37068
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
37066
37069
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
37067
37070
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
|
|
@@ -37123,8 +37126,9 @@ function getSelectionWrappers(root) {
|
|
|
37123
37126
|
/**
|
|
37124
37127
|
* @private
|
|
37125
37128
|
*/
|
|
37126
|
-
function clearSelectionWrappers(
|
|
37127
|
-
getSelectionWrappers(
|
|
37129
|
+
function clearSelectionWrappers(jodit) {
|
|
37130
|
+
getSelectionWrappers(jodit.editor).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
|
|
37131
|
+
clearNativeSelection(jodit);
|
|
37128
37132
|
}
|
|
37129
37133
|
/**
|
|
37130
37134
|
* @private
|
|
@@ -37149,7 +37153,6 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
37149
37153
|
range.setEnd(rng.endContainer, rng.endOffset);
|
|
37150
37154
|
return range;
|
|
37151
37155
|
});
|
|
37152
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37153
37156
|
const searchHighlight = new Highlight(...ranges);
|
|
37154
37157
|
// @ts-ignore
|
|
37155
37158
|
CSS.highlights.clear();
|
|
@@ -37160,6 +37163,15 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
37160
37163
|
}
|
|
37161
37164
|
return false;
|
|
37162
37165
|
}
|
|
37166
|
+
function clearNativeSelection(jodit) {
|
|
37167
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
37168
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37169
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
37170
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
37171
|
+
// @ts-ignore
|
|
37172
|
+
CSS.highlights.clear();
|
|
37173
|
+
}
|
|
37174
|
+
}
|
|
37163
37175
|
function normalizeRanges(rng, restRanges, ci) {
|
|
37164
37176
|
const startText = rng.startContainer.nodeValue;
|
|
37165
37177
|
let diff = 0;
|
|
@@ -37333,11 +37345,11 @@ class SentenceFinder {
|
|
|
37333
37345
|
*
|
|
37334
37346
|
* @example
|
|
37335
37347
|
* ```typescript
|
|
37336
|
-
*
|
|
37348
|
+
* const jodit = Jodit.make('#editor', {
|
|
37337
37349
|
* useSearch: false
|
|
37338
37350
|
* });
|
|
37339
37351
|
* // or
|
|
37340
|
-
*
|
|
37352
|
+
* const jodit = Jodit.make('#editor', {
|
|
37341
37353
|
* disablePlugins: 'search'
|
|
37342
37354
|
* });
|
|
37343
37355
|
* ```
|
|
@@ -37416,7 +37428,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37416
37428
|
rng.deleteContents();
|
|
37417
37429
|
const textNode = this.j.createInside.text(this.ui.replace);
|
|
37418
37430
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeInsertNode(rng, textNode);
|
|
37419
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
37431
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
37420
37432
|
this.j.s.setCursorAfter(textNode);
|
|
37421
37433
|
this.tryScrollToElement(textNode);
|
|
37422
37434
|
this.cache = {};
|
|
@@ -37443,7 +37455,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37443
37455
|
!(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
37444
37456
|
this.drawPromise?.rejectCallback();
|
|
37445
37457
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
37446
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
37458
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
37447
37459
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
37448
37460
|
}
|
|
37449
37461
|
this.previousQuery = query;
|
|
@@ -37556,14 +37568,15 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37556
37568
|
this.ui.close();
|
|
37557
37569
|
})
|
|
37558
37570
|
.on(this.ui, 'afterClose', () => {
|
|
37559
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
37571
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
37560
37572
|
this.ui.currentIndex = 0;
|
|
37561
37573
|
this.ui.count = 0;
|
|
37562
37574
|
this.cache = {};
|
|
37575
|
+
editor.focus();
|
|
37563
37576
|
})
|
|
37564
37577
|
.on('click', () => {
|
|
37565
37578
|
this.ui.currentIndex = 0;
|
|
37566
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
37579
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
37567
37580
|
})
|
|
37568
37581
|
.on('change.search', () => {
|
|
37569
37582
|
this.cache = {};
|
|
@@ -37574,7 +37587,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
37574
37587
|
this.ui.selInfo = null;
|
|
37575
37588
|
}
|
|
37576
37589
|
if (this.ui.isOpened) {
|
|
37577
|
-
this.updateCounters();
|
|
37590
|
+
void this.updateCounters();
|
|
37578
37591
|
}
|
|
37579
37592
|
}, editor.defaultTimeout))
|
|
37580
37593
|
.on('searchNext.search searchPrevious.search', () => {
|
|
@@ -37754,7 +37767,7 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
37754
37767
|
return false;
|
|
37755
37768
|
})
|
|
37756
37769
|
.on(next, 'pointerdown', () => {
|
|
37757
|
-
jodit.e.fire('searchNext');
|
|
37770
|
+
void jodit.e.fire('searchNext');
|
|
37758
37771
|
return false;
|
|
37759
37772
|
})
|
|
37760
37773
|
.on(prev, 'pointerdown', () => {
|
|
@@ -37764,12 +37777,12 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
37764
37777
|
.on(this.queryInput, 'input', () => {
|
|
37765
37778
|
this.setMod('empty-query', !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.trim)(this.queryInput.value).length);
|
|
37766
37779
|
})
|
|
37767
|
-
.on(this.queryInput, 'keydown', this.j.async.debounce((e) => {
|
|
37780
|
+
.on(this.queryInput, 'keydown', this.j.async.debounce(async (e) => {
|
|
37768
37781
|
switch (e.key) {
|
|
37769
37782
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
|
|
37770
37783
|
e.preventDefault();
|
|
37771
37784
|
e.stopImmediatePropagation();
|
|
37772
|
-
if (jodit.e.fire('searchNext')) {
|
|
37785
|
+
if (await jodit.e.fire('searchNext')) {
|
|
37773
37786
|
this.close();
|
|
37774
37787
|
}
|
|
37775
37788
|
break;
|