jodit 4.2.34 → 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 +11 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +26 -18
- 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 -18
- 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 -18
- 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 -18
- 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 +26 -18
- 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/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/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;
|
|
@@ -21973,7 +21973,7 @@ var History = /** @class */ (function (_super) {
|
|
|
21973
21973
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
|
|
21974
21974
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
21975
21975
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
21976
|
-
/* harmony import */ var
|
|
21976
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
21977
21977
|
/*!
|
|
21978
21978
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
21979
21979
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -22019,7 +22019,7 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22019
22019
|
for (var j = 0; j < elms.length; j += 1) {
|
|
22020
22020
|
if (previous &&
|
|
22021
22021
|
!this.isIgnoredNode(elms[j]) &&
|
|
22022
|
-
!(
|
|
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]))) {
|
|
22023
22023
|
count += 1;
|
|
22024
22024
|
}
|
|
22025
22025
|
if (elms[j] === elm) {
|
|
@@ -22033,9 +22033,9 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22033
22033
|
* Calc normal offset in joined text nodes
|
|
22034
22034
|
*/
|
|
22035
22035
|
Snapshot.strokeOffset = function (elm, offset) {
|
|
22036
|
-
while (
|
|
22036
|
+
while (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(elm)) {
|
|
22037
22037
|
elm = elm.previousSibling;
|
|
22038
|
-
if (
|
|
22038
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(elm) && elm.nodeValue) {
|
|
22039
22039
|
offset += elm.nodeValue.length;
|
|
22040
22040
|
}
|
|
22041
22041
|
}
|
|
@@ -22046,7 +22046,7 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22046
22046
|
*/
|
|
22047
22047
|
Snapshot.prototype.calcHierarchyLadder = function (elm) {
|
|
22048
22048
|
var counts = [];
|
|
22049
|
-
if (!elm || !elm.parentNode || !
|
|
22049
|
+
if (!elm || !elm.parentNode || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.j.editor, elm)) {
|
|
22050
22050
|
return [];
|
|
22051
22051
|
}
|
|
22052
22052
|
while (elm && elm !== this.j.editor) {
|
|
@@ -22102,10 +22102,12 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22102
22102
|
endOffset: 0
|
|
22103
22103
|
}
|
|
22104
22104
|
};
|
|
22105
|
-
snapshot.html = this.
|
|
22105
|
+
snapshot.html = this.__getCleanedEditorValue(this.j.editor);
|
|
22106
22106
|
var sel = this.j.s.sel;
|
|
22107
22107
|
if (sel && sel.rangeCount) {
|
|
22108
|
-
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);
|
|
22109
22111
|
var startOffset = Snapshot.strokeOffset(range.startContainer, range.startOffset), endOffset = Snapshot.strokeOffset(range.endContainer, range.endOffset);
|
|
22110
22112
|
if (!startContainer.length &&
|
|
22111
22113
|
range.startContainer !== this.j.editor) {
|
|
@@ -22133,8 +22135,8 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22133
22135
|
var _this = this;
|
|
22134
22136
|
this.transaction(function () {
|
|
22135
22137
|
var scroll = _this.storeScrollState();
|
|
22136
|
-
var
|
|
22137
|
-
if (
|
|
22138
|
+
var html = _this.__getCleanedEditorValue(_this.j.editor);
|
|
22139
|
+
if (html !== snapshot.html) {
|
|
22138
22140
|
_this.j.value = snapshot.html;
|
|
22139
22141
|
}
|
|
22140
22142
|
_this.restoreOnlySelection(snapshot);
|
|
@@ -22178,11 +22180,11 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22178
22180
|
_super.prototype.destruct.call(this);
|
|
22179
22181
|
};
|
|
22180
22182
|
Snapshot.isIgnoredNode = function (node) {
|
|
22181
|
-
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);
|
|
22182
22184
|
};
|
|
22183
|
-
Snapshot.prototype.
|
|
22185
|
+
Snapshot.prototype.__getCleanedEditorValue = function (node) {
|
|
22184
22186
|
var clone = node.cloneNode(true);
|
|
22185
|
-
|
|
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);
|
|
22186
22188
|
return clone.innerHTML;
|
|
22187
22189
|
};
|
|
22188
22190
|
return Snapshot;
|
|
@@ -36359,13 +36361,19 @@ var link = /** @class */ (function (_super) {
|
|
|
36359
36361
|
link.prototype.__generateForm = function (current, close) {
|
|
36360
36362
|
var jodit = this.jodit;
|
|
36361
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;
|
|
36362
|
-
var html = formTemplate(jodit)
|
|
36364
|
+
var html = formTemplate(jodit);
|
|
36365
|
+
var form = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(html)
|
|
36363
36366
|
? jodit.c.fromHTML(html, {
|
|
36364
36367
|
target_checkbox_box: openInNewTabCheckbox,
|
|
36365
36368
|
nofollow_checkbox_box: noFollowCheckbox
|
|
36366
36369
|
})
|
|
36367
|
-
: html
|
|
36368
|
-
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);
|
|
36369
36377
|
var content_input = elements.content_input;
|
|
36370
36378
|
var className_input = elements.className_input, className_select = elements.className_select;
|
|
36371
36379
|
if (!content_input) {
|
|
@@ -36438,7 +36446,7 @@ var link = /** @class */ (function (_super) {
|
|
|
36438
36446
|
jodit.history.snapshot.restore(snapshot);
|
|
36439
36447
|
var textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
36440
36448
|
var ci = jodit.createInside;
|
|
36441
|
-
if (!link) {
|
|
36449
|
+
if (!link || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isOrContains(jodit.editor, link)) {
|
|
36442
36450
|
if (!jodit.s.isCollapsed()) {
|
|
36443
36451
|
var node = jodit.s.current();
|
|
36444
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
|
*/
|