jodit 4.2.33 → 4.2.35
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 +29 -19
- 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 -19
- 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 -19
- 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 -19
- 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 +29 -19
- 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/modules/history/snapshot.d.ts +1 -1
- package/esm/modules/history/snapshot.js +10 -8
- package/esm/plugins/link/link.js +10 -4
- package/package.json +1 -1
- package/types/core/selection/style/api/list/wrap-list.d.ts +1 -1
- package/types/modules/history/snapshot.d.ts +1 -1
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.35
|
|
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.35";
|
|
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
|
|
|
@@ -21971,7 +21973,7 @@ var History = /** @class */ (function (_super) {
|
|
|
21971
21973
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
|
|
21972
21974
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
21973
21975
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
21974
|
-
/* harmony import */ var
|
|
21976
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
21975
21977
|
/*!
|
|
21976
21978
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
21977
21979
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -22017,7 +22019,7 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22017
22019
|
for (var j = 0; j < elms.length; j += 1) {
|
|
22018
22020
|
if (previous &&
|
|
22019
22021
|
!this.isIgnoredNode(elms[j]) &&
|
|
22020
|
-
!(
|
|
22022
|
+
!(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(previous) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(elms[j]))) {
|
|
22021
22023
|
count += 1;
|
|
22022
22024
|
}
|
|
22023
22025
|
if (elms[j] === elm) {
|
|
@@ -22031,9 +22033,9 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22031
22033
|
* Calc normal offset in joined text nodes
|
|
22032
22034
|
*/
|
|
22033
22035
|
Snapshot.strokeOffset = function (elm, offset) {
|
|
22034
|
-
while (
|
|
22036
|
+
while (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(elm)) {
|
|
22035
22037
|
elm = elm.previousSibling;
|
|
22036
|
-
if (
|
|
22038
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(elm) && elm.nodeValue) {
|
|
22037
22039
|
offset += elm.nodeValue.length;
|
|
22038
22040
|
}
|
|
22039
22041
|
}
|
|
@@ -22044,7 +22046,7 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22044
22046
|
*/
|
|
22045
22047
|
Snapshot.prototype.calcHierarchyLadder = function (elm) {
|
|
22046
22048
|
var counts = [];
|
|
22047
|
-
if (!elm || !elm.parentNode || !
|
|
22049
|
+
if (!elm || !elm.parentNode || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.j.editor, elm)) {
|
|
22048
22050
|
return [];
|
|
22049
22051
|
}
|
|
22050
22052
|
while (elm && elm !== this.j.editor) {
|
|
@@ -22100,10 +22102,12 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22100
22102
|
endOffset: 0
|
|
22101
22103
|
}
|
|
22102
22104
|
};
|
|
22103
|
-
snapshot.html = this.
|
|
22105
|
+
snapshot.html = this.__getCleanedEditorValue(this.j.editor);
|
|
22104
22106
|
var sel = this.j.s.sel;
|
|
22105
22107
|
if (sel && sel.rangeCount) {
|
|
22106
|
-
var range = sel.getRangeAt(0)
|
|
22108
|
+
var range = sel.getRangeAt(0);
|
|
22109
|
+
var startContainer = this.calcHierarchyLadder(range.startContainer);
|
|
22110
|
+
var endContainer = this.calcHierarchyLadder(range.endContainer);
|
|
22107
22111
|
var startOffset = Snapshot.strokeOffset(range.startContainer, range.startOffset), endOffset = Snapshot.strokeOffset(range.endContainer, range.endOffset);
|
|
22108
22112
|
if (!startContainer.length &&
|
|
22109
22113
|
range.startContainer !== this.j.editor) {
|
|
@@ -22131,8 +22135,8 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22131
22135
|
var _this = this;
|
|
22132
22136
|
this.transaction(function () {
|
|
22133
22137
|
var scroll = _this.storeScrollState();
|
|
22134
|
-
var
|
|
22135
|
-
if (
|
|
22138
|
+
var html = _this.__getCleanedEditorValue(_this.j.editor);
|
|
22139
|
+
if (html !== snapshot.html) {
|
|
22136
22140
|
_this.j.value = snapshot.html;
|
|
22137
22141
|
}
|
|
22138
22142
|
_this.restoreOnlySelection(snapshot);
|
|
@@ -22176,11 +22180,11 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22176
22180
|
_super.prototype.destruct.call(this);
|
|
22177
22181
|
};
|
|
22178
22182
|
Snapshot.isIgnoredNode = function (node) {
|
|
22179
|
-
return (
|
|
22183
|
+
return (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node) && !node.nodeValue) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTemporary(node);
|
|
22180
22184
|
};
|
|
22181
|
-
Snapshot.prototype.
|
|
22185
|
+
Snapshot.prototype.__getCleanedEditorValue = function (node) {
|
|
22182
22186
|
var clone = node.cloneNode(true);
|
|
22183
|
-
|
|
22187
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.temporaryList(clone).forEach(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.unwrap);
|
|
22184
22188
|
return clone.innerHTML;
|
|
22185
22189
|
};
|
|
22186
22190
|
return Snapshot;
|
|
@@ -36357,13 +36361,19 @@ var link = /** @class */ (function (_super) {
|
|
|
36357
36361
|
link.prototype.__generateForm = function (current, close) {
|
|
36358
36362
|
var jodit = this.jodit;
|
|
36359
36363
|
var i18n = jodit.i18n.bind(jodit), _a = jodit.o.link, openInNewTabCheckbox = _a.openInNewTabCheckbox, noFollowCheckbox = _a.noFollowCheckbox, formTemplate = _a.formTemplate, formClassName = _a.formClassName, modeClassName = _a.modeClassName;
|
|
36360
|
-
var html = formTemplate(jodit)
|
|
36364
|
+
var html = formTemplate(jodit);
|
|
36365
|
+
var form = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(html)
|
|
36361
36366
|
? jodit.c.fromHTML(html, {
|
|
36362
36367
|
target_checkbox_box: openInNewTabCheckbox,
|
|
36363
36368
|
nofollow_checkbox_box: noFollowCheckbox
|
|
36364
36369
|
})
|
|
36365
|
-
: html
|
|
36366
|
-
var
|
|
36370
|
+
: html;
|
|
36371
|
+
var htmlForm = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(form) ? form : form.container;
|
|
36372
|
+
var elements = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.refs)(htmlForm);
|
|
36373
|
+
var insert = elements.insert, unlink = elements.unlink, content_input_box = elements.content_input_box;
|
|
36374
|
+
var _b = elements, target_checkbox = _b.target_checkbox, nofollow_checkbox = _b.nofollow_checkbox, url_input = _b.url_input;
|
|
36375
|
+
var currentElement = current;
|
|
36376
|
+
var isImageContent = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isImage(currentElement);
|
|
36367
36377
|
var content_input = elements.content_input;
|
|
36368
36378
|
var className_input = elements.className_input, className_select = elements.className_select;
|
|
36369
36379
|
if (!content_input) {
|
|
@@ -36436,7 +36446,7 @@ var link = /** @class */ (function (_super) {
|
|
|
36436
36446
|
jodit.history.snapshot.restore(snapshot);
|
|
36437
36447
|
var textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
36438
36448
|
var ci = jodit.createInside;
|
|
36439
|
-
if (!link) {
|
|
36449
|
+
if (!link || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isOrContains(jodit.editor, link)) {
|
|
36440
36450
|
if (!jodit.s.isCollapsed()) {
|
|
36441
36451
|
var node = jodit.s.current();
|
|
36442
36452
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(node, 'img')) {
|
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.35
|
|
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.35
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|