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/es2018/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
|
*/
|
|
@@ -1735,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1735
1735
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1736
1736
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1737
1737
|
*/
|
|
1738
|
-
const APP_VERSION = "4.2.
|
|
1738
|
+
const APP_VERSION = "4.2.33";
|
|
1739
1739
|
// prettier-ignore
|
|
1740
1740
|
const ES = "es2018";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -38054,6 +38054,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
38054
38054
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
38055
38055
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
38056
38056
|
/* harmony export */ });
|
|
38057
|
+
/* unused harmony export clearNativeSelection */
|
|
38057
38058
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
38058
38059
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
38059
38060
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
|
|
@@ -38115,8 +38116,9 @@ function getSelectionWrappers(root) {
|
|
|
38115
38116
|
/**
|
|
38116
38117
|
* @private
|
|
38117
38118
|
*/
|
|
38118
|
-
function clearSelectionWrappers(
|
|
38119
|
-
getSelectionWrappers(
|
|
38119
|
+
function clearSelectionWrappers(jodit) {
|
|
38120
|
+
getSelectionWrappers(jodit.editor).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
|
|
38121
|
+
clearNativeSelection(jodit);
|
|
38120
38122
|
}
|
|
38121
38123
|
/**
|
|
38122
38124
|
* @private
|
|
@@ -38141,7 +38143,6 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
38141
38143
|
range.setEnd(rng.endContainer, rng.endOffset);
|
|
38142
38144
|
return range;
|
|
38143
38145
|
});
|
|
38144
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38145
38146
|
const searchHighlight = new Highlight(...ranges);
|
|
38146
38147
|
// @ts-ignore
|
|
38147
38148
|
CSS.highlights.clear();
|
|
@@ -38152,6 +38153,15 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
38152
38153
|
}
|
|
38153
38154
|
return false;
|
|
38154
38155
|
}
|
|
38156
|
+
function clearNativeSelection(jodit) {
|
|
38157
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
38158
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38159
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
38160
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
38161
|
+
// @ts-ignore
|
|
38162
|
+
CSS.highlights.clear();
|
|
38163
|
+
}
|
|
38164
|
+
}
|
|
38155
38165
|
function normalizeRanges(rng, restRanges, ci) {
|
|
38156
38166
|
const startText = rng.startContainer.nodeValue;
|
|
38157
38167
|
let diff = 0;
|
|
@@ -38326,11 +38336,11 @@ class SentenceFinder {
|
|
|
38326
38336
|
*
|
|
38327
38337
|
* @example
|
|
38328
38338
|
* ```typescript
|
|
38329
|
-
*
|
|
38339
|
+
* const jodit = Jodit.make('#editor', {
|
|
38330
38340
|
* useSearch: false
|
|
38331
38341
|
* });
|
|
38332
38342
|
* // or
|
|
38333
|
-
*
|
|
38343
|
+
* const jodit = Jodit.make('#editor', {
|
|
38334
38344
|
* disablePlugins: 'search'
|
|
38335
38345
|
* });
|
|
38336
38346
|
* ```
|
|
@@ -38409,7 +38419,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38409
38419
|
rng.deleteContents();
|
|
38410
38420
|
const textNode = this.j.createInside.text(this.ui.replace);
|
|
38411
38421
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeInsertNode(rng, textNode);
|
|
38412
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
38422
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
38413
38423
|
this.j.s.setCursorAfter(textNode);
|
|
38414
38424
|
this.tryScrollToElement(textNode);
|
|
38415
38425
|
this.cache = {};
|
|
@@ -38437,7 +38447,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38437
38447
|
!(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
38438
38448
|
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
38439
38449
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
38440
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
38450
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
38441
38451
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
38442
38452
|
}
|
|
38443
38453
|
this.previousQuery = query;
|
|
@@ -38554,14 +38564,15 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38554
38564
|
this.ui.close();
|
|
38555
38565
|
})
|
|
38556
38566
|
.on(this.ui, 'afterClose', () => {
|
|
38557
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
38567
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
38558
38568
|
this.ui.currentIndex = 0;
|
|
38559
38569
|
this.ui.count = 0;
|
|
38560
38570
|
this.cache = {};
|
|
38571
|
+
editor.focus();
|
|
38561
38572
|
})
|
|
38562
38573
|
.on('click', () => {
|
|
38563
38574
|
this.ui.currentIndex = 0;
|
|
38564
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
38575
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
38565
38576
|
})
|
|
38566
38577
|
.on('change.search', () => {
|
|
38567
38578
|
this.cache = {};
|
|
@@ -38572,7 +38583,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38572
38583
|
this.ui.selInfo = null;
|
|
38573
38584
|
}
|
|
38574
38585
|
if (this.ui.isOpened) {
|
|
38575
|
-
this.updateCounters();
|
|
38586
|
+
void this.updateCounters();
|
|
38576
38587
|
}
|
|
38577
38588
|
}, editor.defaultTimeout))
|
|
38578
38589
|
.on('searchNext.search searchPrevious.search', () => {
|
|
@@ -38752,7 +38763,7 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
38752
38763
|
return false;
|
|
38753
38764
|
})
|
|
38754
38765
|
.on(next, 'pointerdown', () => {
|
|
38755
|
-
jodit.e.fire('searchNext');
|
|
38766
|
+
void jodit.e.fire('searchNext');
|
|
38756
38767
|
return false;
|
|
38757
38768
|
})
|
|
38758
38769
|
.on(prev, 'pointerdown', () => {
|
|
@@ -38762,12 +38773,12 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
38762
38773
|
.on(this.queryInput, 'input', () => {
|
|
38763
38774
|
this.setMod('empty-query', !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.trim)(this.queryInput.value).length);
|
|
38764
38775
|
})
|
|
38765
|
-
.on(this.queryInput, 'keydown', this.j.async.debounce((e) => {
|
|
38776
|
+
.on(this.queryInput, 'keydown', this.j.async.debounce(async (e) => {
|
|
38766
38777
|
switch (e.key) {
|
|
38767
38778
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
|
|
38768
38779
|
e.preventDefault();
|
|
38769
38780
|
e.stopImmediatePropagation();
|
|
38770
|
-
if (jodit.e.fire('searchNext')) {
|
|
38781
|
+
if (await jodit.e.fire('searchNext')) {
|
|
38771
38782
|
this.close();
|
|
38772
38783
|
}
|
|
38773
38784
|
break;
|