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