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/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.34
|
|
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.34";
|
|
1842
1842
|
// prettier-ignore
|
|
1843
1843
|
var ES = "es5";
|
|
1844
1844
|
var IS_ES_MODERN = false;
|
|
@@ -12418,7 +12418,9 @@ function unwrapList(mode, list, li, jodit, cs) {
|
|
|
12418
12418
|
(0,jodit_core_selection_style_api_extract__WEBPACK_IMPORTED_MODULE_2__/* .extractSelectedPart */ .y)(list, li, jodit);
|
|
12419
12419
|
void 0;
|
|
12420
12420
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(li.parentElement);
|
|
12421
|
-
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(li, jodit.o.enter
|
|
12421
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(li, jodit.o.enter.toLowerCase() !== 'br'
|
|
12422
|
+
? jodit.o.enter
|
|
12423
|
+
: jodit.createInside.fragment(), jodit.createInside);
|
|
12422
12424
|
}
|
|
12423
12425
|
|
|
12424
12426
|
|
|
@@ -39526,6 +39528,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
39526
39528
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
39527
39529
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
39528
39530
|
/* harmony export */ });
|
|
39531
|
+
/* unused harmony export clearNativeSelection */
|
|
39529
39532
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
|
|
39530
39533
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
39531
39534
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
@@ -39590,8 +39593,9 @@ function getSelectionWrappers(root) {
|
|
|
39590
39593
|
/**
|
|
39591
39594
|
* @private
|
|
39592
39595
|
*/
|
|
39593
|
-
function clearSelectionWrappers(
|
|
39594
|
-
getSelectionWrappers(
|
|
39596
|
+
function clearSelectionWrappers(jodit) {
|
|
39597
|
+
getSelectionWrappers(jodit.editor).forEach(function (span) { return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span); });
|
|
39598
|
+
clearNativeSelection(jodit);
|
|
39595
39599
|
}
|
|
39596
39600
|
/**
|
|
39597
39601
|
* @private
|
|
@@ -39616,7 +39620,6 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
39616
39620
|
range.setEnd(rng.endContainer, rng.endOffset);
|
|
39617
39621
|
return range;
|
|
39618
39622
|
});
|
|
39619
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
39620
39623
|
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
39624
|
// @ts-ignore
|
|
39622
39625
|
CSS.highlights.clear();
|
|
@@ -39627,6 +39630,15 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
39627
39630
|
}
|
|
39628
39631
|
return false;
|
|
39629
39632
|
}
|
|
39633
|
+
function clearNativeSelection(jodit) {
|
|
39634
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
39635
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
39636
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
39637
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
39638
|
+
// @ts-ignore
|
|
39639
|
+
CSS.highlights.clear();
|
|
39640
|
+
}
|
|
39641
|
+
}
|
|
39630
39642
|
function normalizeRanges(rng, restRanges, ci) {
|
|
39631
39643
|
var e_1, _a;
|
|
39632
39644
|
var startText = rng.startContainer.nodeValue;
|
|
@@ -39819,11 +39831,11 @@ var SentenceFinder = /** @class */ (function () {
|
|
|
39819
39831
|
*
|
|
39820
39832
|
* @example
|
|
39821
39833
|
* ```typescript
|
|
39822
|
-
*
|
|
39834
|
+
* const jodit = Jodit.make('#editor', {
|
|
39823
39835
|
* useSearch: false
|
|
39824
39836
|
* });
|
|
39825
39837
|
* // or
|
|
39826
|
-
*
|
|
39838
|
+
* const jodit = Jodit.make('#editor', {
|
|
39827
39839
|
* disablePlugins: 'search'
|
|
39828
39840
|
* });
|
|
39829
39841
|
* ```
|
|
@@ -39940,7 +39952,7 @@ var search = /** @class */ (function (_super) {
|
|
|
39940
39952
|
rng.deleteContents();
|
|
39941
39953
|
textNode = this.j.createInside.text(this.ui.replace);
|
|
39942
39954
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeInsertNode(rng, textNode);
|
|
39943
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
39955
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
39944
39956
|
this.j.s.setCursorAfter(textNode);
|
|
39945
39957
|
this.tryScrollToElement(textNode);
|
|
39946
39958
|
this.cache = {};
|
|
@@ -39979,7 +39991,7 @@ var search = /** @class */ (function (_super) {
|
|
|
39979
39991
|
!(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
39980
39992
|
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
39981
39993
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
39982
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
39994
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
39983
39995
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
39984
39996
|
}
|
|
39985
39997
|
this.previousQuery = query;
|
|
@@ -40131,14 +40143,15 @@ var search = /** @class */ (function (_super) {
|
|
|
40131
40143
|
_this.ui.close();
|
|
40132
40144
|
})
|
|
40133
40145
|
.on(this.ui, 'afterClose', function () {
|
|
40134
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
40146
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
40135
40147
|
_this.ui.currentIndex = 0;
|
|
40136
40148
|
_this.ui.count = 0;
|
|
40137
40149
|
_this.cache = {};
|
|
40150
|
+
editor.focus();
|
|
40138
40151
|
})
|
|
40139
40152
|
.on('click', function () {
|
|
40140
40153
|
_this.ui.currentIndex = 0;
|
|
40141
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
40154
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
40142
40155
|
})
|
|
40143
40156
|
.on('change.search', function () {
|
|
40144
40157
|
_this.cache = {};
|
|
@@ -40149,7 +40162,7 @@ var search = /** @class */ (function (_super) {
|
|
|
40149
40162
|
_this.ui.selInfo = null;
|
|
40150
40163
|
}
|
|
40151
40164
|
if (_this.ui.isOpened) {
|
|
40152
|
-
_this.updateCounters();
|
|
40165
|
+
void _this.updateCounters();
|
|
40153
40166
|
}
|
|
40154
40167
|
}, editor.defaultTimeout))
|
|
40155
40168
|
.on('searchNext.search searchPrevious.search', function () {
|
|
@@ -40294,7 +40307,7 @@ var UISearch = /** @class */ (function (_super) {
|
|
|
40294
40307
|
return false;
|
|
40295
40308
|
})
|
|
40296
40309
|
.on(next, 'pointerdown', function () {
|
|
40297
|
-
jodit.e.fire('searchNext');
|
|
40310
|
+
void jodit.e.fire('searchNext');
|
|
40298
40311
|
return false;
|
|
40299
40312
|
})
|
|
40300
40313
|
.on(prev, 'pointerdown', function () {
|
|
@@ -40304,20 +40317,32 @@ var UISearch = /** @class */ (function (_super) {
|
|
|
40304
40317
|
.on(_this.queryInput, 'input', function () {
|
|
40305
40318
|
_this.setMod('empty-query', !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.trim)(_this.queryInput.value).length);
|
|
40306
40319
|
})
|
|
40307
|
-
.on(_this.queryInput, 'keydown', _this.j.async.debounce(function (e) {
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40314
|
-
|
|
40315
|
-
|
|
40316
|
-
|
|
40317
|
-
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40320
|
+
.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 () {
|
|
40321
|
+
var _a;
|
|
40322
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__generator */ .YH)(this, function (_b) {
|
|
40323
|
+
switch (_b.label) {
|
|
40324
|
+
case 0:
|
|
40325
|
+
_a = e.key;
|
|
40326
|
+
switch (_a) {
|
|
40327
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER: return [3 /*break*/, 1];
|
|
40328
|
+
}
|
|
40329
|
+
return [3 /*break*/, 3];
|
|
40330
|
+
case 1:
|
|
40331
|
+
e.preventDefault();
|
|
40332
|
+
e.stopImmediatePropagation();
|
|
40333
|
+
return [4 /*yield*/, jodit.e.fire('searchNext')];
|
|
40334
|
+
case 2:
|
|
40335
|
+
if (_b.sent()) {
|
|
40336
|
+
this.close();
|
|
40337
|
+
}
|
|
40338
|
+
return [3 /*break*/, 4];
|
|
40339
|
+
case 3:
|
|
40340
|
+
jodit.e.fire(this, 'needUpdateCounters');
|
|
40341
|
+
return [3 /*break*/, 4];
|
|
40342
|
+
case 4: return [2 /*return*/];
|
|
40343
|
+
}
|
|
40344
|
+
});
|
|
40345
|
+
}); }, _this.j.defaultTimeout));
|
|
40321
40346
|
return _this;
|
|
40322
40347
|
}
|
|
40323
40348
|
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.34
|
|
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.34
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|