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/es5/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
|
*/
|
|
@@ -1838,7 +1838,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1838
1838
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1839
1839
|
*/
|
|
1840
1840
|
|
|
1841
|
-
var APP_VERSION = "4.2.
|
|
1841
|
+
var APP_VERSION = "4.2.33";
|
|
1842
1842
|
// prettier-ignore
|
|
1843
1843
|
var ES = "es5";
|
|
1844
1844
|
var IS_ES_MODERN = false;
|
|
@@ -39526,6 +39526,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
39526
39526
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
39527
39527
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
39528
39528
|
/* harmony export */ });
|
|
39529
|
+
/* unused harmony export clearNativeSelection */
|
|
39529
39530
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
|
|
39530
39531
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
39531
39532
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
@@ -39590,8 +39591,9 @@ function getSelectionWrappers(root) {
|
|
|
39590
39591
|
/**
|
|
39591
39592
|
* @private
|
|
39592
39593
|
*/
|
|
39593
|
-
function clearSelectionWrappers(
|
|
39594
|
-
getSelectionWrappers(
|
|
39594
|
+
function clearSelectionWrappers(jodit) {
|
|
39595
|
+
getSelectionWrappers(jodit.editor).forEach(function (span) { return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span); });
|
|
39596
|
+
clearNativeSelection(jodit);
|
|
39595
39597
|
}
|
|
39596
39598
|
/**
|
|
39597
39599
|
* @private
|
|
@@ -39616,7 +39618,6 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
39616
39618
|
range.setEnd(rng.endContainer, rng.endOffset);
|
|
39617
39619
|
return range;
|
|
39618
39620
|
});
|
|
39619
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
39620
39621
|
var searchHighlight = new (Highlight.bind.apply(Highlight, (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spreadArray */ .fX)([void 0], (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__read */ .zs)(ranges), false)))();
|
|
39621
39622
|
// @ts-ignore
|
|
39622
39623
|
CSS.highlights.clear();
|
|
@@ -39627,6 +39628,15 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
39627
39628
|
}
|
|
39628
39629
|
return false;
|
|
39629
39630
|
}
|
|
39631
|
+
function clearNativeSelection(jodit) {
|
|
39632
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
39633
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
39634
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
39635
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
39636
|
+
// @ts-ignore
|
|
39637
|
+
CSS.highlights.clear();
|
|
39638
|
+
}
|
|
39639
|
+
}
|
|
39630
39640
|
function normalizeRanges(rng, restRanges, ci) {
|
|
39631
39641
|
var e_1, _a;
|
|
39632
39642
|
var startText = rng.startContainer.nodeValue;
|
|
@@ -39819,11 +39829,11 @@ var SentenceFinder = /** @class */ (function () {
|
|
|
39819
39829
|
*
|
|
39820
39830
|
* @example
|
|
39821
39831
|
* ```typescript
|
|
39822
|
-
*
|
|
39832
|
+
* const jodit = Jodit.make('#editor', {
|
|
39823
39833
|
* useSearch: false
|
|
39824
39834
|
* });
|
|
39825
39835
|
* // or
|
|
39826
|
-
*
|
|
39836
|
+
* const jodit = Jodit.make('#editor', {
|
|
39827
39837
|
* disablePlugins: 'search'
|
|
39828
39838
|
* });
|
|
39829
39839
|
* ```
|
|
@@ -39940,7 +39950,7 @@ var search = /** @class */ (function (_super) {
|
|
|
39940
39950
|
rng.deleteContents();
|
|
39941
39951
|
textNode = this.j.createInside.text(this.ui.replace);
|
|
39942
39952
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeInsertNode(rng, textNode);
|
|
39943
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
39953
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
39944
39954
|
this.j.s.setCursorAfter(textNode);
|
|
39945
39955
|
this.tryScrollToElement(textNode);
|
|
39946
39956
|
this.cache = {};
|
|
@@ -39979,7 +39989,7 @@ var search = /** @class */ (function (_super) {
|
|
|
39979
39989
|
!(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
39980
39990
|
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
39981
39991
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
39982
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
39992
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
39983
39993
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
39984
39994
|
}
|
|
39985
39995
|
this.previousQuery = query;
|
|
@@ -40131,14 +40141,15 @@ var search = /** @class */ (function (_super) {
|
|
|
40131
40141
|
_this.ui.close();
|
|
40132
40142
|
})
|
|
40133
40143
|
.on(this.ui, 'afterClose', function () {
|
|
40134
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
40144
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
40135
40145
|
_this.ui.currentIndex = 0;
|
|
40136
40146
|
_this.ui.count = 0;
|
|
40137
40147
|
_this.cache = {};
|
|
40148
|
+
editor.focus();
|
|
40138
40149
|
})
|
|
40139
40150
|
.on('click', function () {
|
|
40140
40151
|
_this.ui.currentIndex = 0;
|
|
40141
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
40152
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
40142
40153
|
})
|
|
40143
40154
|
.on('change.search', function () {
|
|
40144
40155
|
_this.cache = {};
|
|
@@ -40149,7 +40160,7 @@ var search = /** @class */ (function (_super) {
|
|
|
40149
40160
|
_this.ui.selInfo = null;
|
|
40150
40161
|
}
|
|
40151
40162
|
if (_this.ui.isOpened) {
|
|
40152
|
-
_this.updateCounters();
|
|
40163
|
+
void _this.updateCounters();
|
|
40153
40164
|
}
|
|
40154
40165
|
}, editor.defaultTimeout))
|
|
40155
40166
|
.on('searchNext.search searchPrevious.search', function () {
|
|
@@ -40294,7 +40305,7 @@ var UISearch = /** @class */ (function (_super) {
|
|
|
40294
40305
|
return false;
|
|
40295
40306
|
})
|
|
40296
40307
|
.on(next, 'pointerdown', function () {
|
|
40297
|
-
jodit.e.fire('searchNext');
|
|
40308
|
+
void jodit.e.fire('searchNext');
|
|
40298
40309
|
return false;
|
|
40299
40310
|
})
|
|
40300
40311
|
.on(prev, 'pointerdown', function () {
|
|
@@ -40304,20 +40315,32 @@ var UISearch = /** @class */ (function (_super) {
|
|
|
40304
40315
|
.on(_this.queryInput, 'input', function () {
|
|
40305
40316
|
_this.setMod('empty-query', !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.trim)(_this.queryInput.value).length);
|
|
40306
40317
|
})
|
|
40307
|
-
.on(_this.queryInput, 'keydown', _this.j.async.debounce(function (e) {
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40314
|
-
|
|
40315
|
-
|
|
40316
|
-
|
|
40317
|
-
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40318
|
+
.on(_this.queryInput, 'keydown', _this.j.async.debounce(function (e) { return (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__awaiter */ .sH)(_this, void 0, void 0, function () {
|
|
40319
|
+
var _a;
|
|
40320
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__generator */ .YH)(this, function (_b) {
|
|
40321
|
+
switch (_b.label) {
|
|
40322
|
+
case 0:
|
|
40323
|
+
_a = e.key;
|
|
40324
|
+
switch (_a) {
|
|
40325
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER: return [3 /*break*/, 1];
|
|
40326
|
+
}
|
|
40327
|
+
return [3 /*break*/, 3];
|
|
40328
|
+
case 1:
|
|
40329
|
+
e.preventDefault();
|
|
40330
|
+
e.stopImmediatePropagation();
|
|
40331
|
+
return [4 /*yield*/, jodit.e.fire('searchNext')];
|
|
40332
|
+
case 2:
|
|
40333
|
+
if (_b.sent()) {
|
|
40334
|
+
this.close();
|
|
40335
|
+
}
|
|
40336
|
+
return [3 /*break*/, 4];
|
|
40337
|
+
case 3:
|
|
40338
|
+
jodit.e.fire(this, 'needUpdateCounters');
|
|
40339
|
+
return [3 /*break*/, 4];
|
|
40340
|
+
case 4: return [2 /*return*/];
|
|
40341
|
+
}
|
|
40342
|
+
});
|
|
40343
|
+
}); }, _this.j.defaultTimeout));
|
|
40321
40344
|
return _this;
|
|
40322
40345
|
}
|
|
40323
40346
|
UISearch.prototype.className = function () {
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.2.
|
|
11
|
+
* Version: v4.2.33
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|