jodit 4.2.12 → 4.2.15
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 +115 -115
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +539 -444
- package/es2015/jodit.min.css +1 -1
- 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 +115 -115
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +539 -444
- package/es2018/jodit.min.css +1 -1
- 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 +115 -115
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +533 -440
- package/es2021/jodit.min.css +1 -1
- 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 +115 -115
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +533 -440
- package/es2021.en/jodit.min.css +1 -1
- 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/jodit.css +129 -129
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +556 -460
- package/es5/jodit.min.css +3 -3
- 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/decorators/autobind/autobind.d.ts +5 -0
- package/esm/core/decorators/autobind/autobind.js +5 -0
- package/esm/core/selection/helpers/index.d.ts +9 -3
- package/esm/core/selection/helpers/index.js +48 -0
- package/esm/core/selection/selection.d.ts +6 -1
- package/esm/core/selection/selection.js +95 -117
- package/esm/index.d.ts +6 -1
- package/esm/index.js +3 -2
- package/esm/modules/table/table.d.ts +3 -1
- package/esm/modules/table/table.js +38 -33
- package/esm/modules/uploader/helpers/send-files.js +33 -29
- package/esm/plugins/backspace/cases/check-remove-char.js +65 -55
- package/esm/plugins/drag-and-drop/drag-and-drop.d.ts +2 -0
- package/esm/plugins/drag-and-drop/drag-and-drop.js +43 -36
- package/esm/plugins/inline-popup/config/items/cells.js +9 -0
- package/esm/plugins/link/link.js +71 -64
- package/esm/plugins/search/helpers/highlight-text-ranges.d.ts +0 -4
- package/esm/plugins/search/helpers/highlight-text-ranges.js +58 -49
- package/esm/plugins/table-keyboard-navigation/table-keyboard-navigation.js +35 -29
- package/package.json +1 -1
- package/types/core/decorators/autobind/autobind.d.ts +5 -0
- package/types/core/selection/helpers/index.d.ts +9 -3
- package/types/core/selection/selection.d.ts +6 -1
- package/types/index.d.ts +6 -1
- package/types/modules/table/table.d.ts +3 -1
- package/types/plugins/drag-and-drop/drag-and-drop.d.ts +2 -0
- package/types/plugins/search/helpers/highlight-text-ranges.d.ts +0 -4
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.15
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1736,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1736
1736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1737
1737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1738
1738
|
*/
|
|
1739
|
-
const APP_VERSION = "4.2.
|
|
1739
|
+
const APP_VERSION = "4.2.15";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2018";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -2129,6 +2129,11 @@ class Create {
|
|
|
2129
2129
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2130
2130
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2131
2131
|
*/
|
|
2132
|
+
/**
|
|
2133
|
+
* [[include:core/decorators/autobind/README.md]]
|
|
2134
|
+
* @packageDocumentation
|
|
2135
|
+
* @module decorators/autobind
|
|
2136
|
+
*/
|
|
2132
2137
|
|
|
2133
2138
|
|
|
2134
2139
|
|
|
@@ -9843,10 +9848,14 @@ class Response {
|
|
|
9843
9848
|
|
|
9844
9849
|
"use strict";
|
|
9845
9850
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9846
|
-
/* harmony export */
|
|
9851
|
+
/* harmony export */ Qe: function() { return /* binding */ cursorInTheEdgeOfString; },
|
|
9852
|
+
/* harmony export */ W8: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__.W; },
|
|
9853
|
+
/* harmony export */ dY: function() { return /* binding */ findCorrectCurrentNode; }
|
|
9847
9854
|
/* harmony export */ });
|
|
9848
|
-
/* harmony import */ var
|
|
9849
|
-
/* harmony import */ var
|
|
9855
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
9856
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
9857
|
+
/* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5298);
|
|
9858
|
+
/* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83541);
|
|
9850
9859
|
/*!
|
|
9851
9860
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9852
9861
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -9859,6 +9868,55 @@ class Response {
|
|
|
9859
9868
|
|
|
9860
9869
|
|
|
9861
9870
|
|
|
9871
|
+
/**
|
|
9872
|
+
* Check if the cursor is at the edge of the string
|
|
9873
|
+
* @private
|
|
9874
|
+
*/
|
|
9875
|
+
function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
9876
|
+
var _a;
|
|
9877
|
+
const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
|
|
9878
|
+
if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
9879
|
+
return true;
|
|
9880
|
+
}
|
|
9881
|
+
const inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
|
|
9882
|
+
return start && ((inv && inv[0].length < offset) || (!inv && offset > 0));
|
|
9883
|
+
}
|
|
9884
|
+
function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild, child) {
|
|
9885
|
+
node = range.startContainer.childNodes[range.startOffset];
|
|
9886
|
+
if (!node) {
|
|
9887
|
+
node = range.startContainer.childNodes[range.startOffset - 1];
|
|
9888
|
+
rightMode = true;
|
|
9889
|
+
}
|
|
9890
|
+
if (node && isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
|
|
9891
|
+
// test Current method - Cursor in the left of some SPAN
|
|
9892
|
+
if (!rightMode && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node.previousSibling)) {
|
|
9893
|
+
node = node.previousSibling;
|
|
9894
|
+
}
|
|
9895
|
+
else if (checkChild) {
|
|
9896
|
+
let current = child(node);
|
|
9897
|
+
while (current) {
|
|
9898
|
+
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current)) {
|
|
9899
|
+
node = current;
|
|
9900
|
+
break;
|
|
9901
|
+
}
|
|
9902
|
+
current = child(current);
|
|
9903
|
+
}
|
|
9904
|
+
}
|
|
9905
|
+
}
|
|
9906
|
+
if (node && !isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
|
|
9907
|
+
let leftChild = node, rightChild = node;
|
|
9908
|
+
do {
|
|
9909
|
+
leftChild = leftChild.firstChild;
|
|
9910
|
+
rightChild = rightChild.lastChild;
|
|
9911
|
+
} while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild));
|
|
9912
|
+
if (leftChild === rightChild && leftChild && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild)) {
|
|
9913
|
+
node = leftChild;
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
return { node, rightMode };
|
|
9917
|
+
}
|
|
9918
|
+
|
|
9919
|
+
|
|
9862
9920
|
/***/ }),
|
|
9863
9921
|
|
|
9864
9922
|
/***/ 5298:
|
|
@@ -9979,7 +10037,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
|
|
|
9979
10037
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9980
10038
|
/* harmony export */ L: function() { return /* binding */ Selection; }
|
|
9981
10039
|
/* harmony export */ });
|
|
9982
|
-
/* harmony import */ var
|
|
10040
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
|
|
9983
10041
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
9984
10042
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22664);
|
|
9985
10043
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
@@ -9989,6 +10047,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
|
|
|
9989
10047
|
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_5__);
|
|
9990
10048
|
/* harmony import */ var jodit_core_selection_helpers_move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(83541);
|
|
9991
10049
|
/* harmony import */ var _style_commit_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8757);
|
|
10050
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46602);
|
|
9992
10051
|
/*!
|
|
9993
10052
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9994
10053
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10005,6 +10064,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
|
|
|
10005
10064
|
|
|
10006
10065
|
|
|
10007
10066
|
|
|
10067
|
+
|
|
10008
10068
|
class Selection {
|
|
10009
10069
|
constructor(jodit) {
|
|
10010
10070
|
this.jodit = jodit;
|
|
@@ -10390,63 +10450,35 @@ class Selection {
|
|
|
10390
10450
|
* Returns the current element under the cursor inside editor
|
|
10391
10451
|
*/
|
|
10392
10452
|
current(checkChild = true) {
|
|
10393
|
-
if (this.j.getRealMode()
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
}
|
|
10416
|
-
else if (checkChild) {
|
|
10417
|
-
let current = child(node);
|
|
10418
|
-
while (current) {
|
|
10419
|
-
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(current)) {
|
|
10420
|
-
node = current;
|
|
10421
|
-
break;
|
|
10422
|
-
}
|
|
10423
|
-
current = child(current);
|
|
10424
|
-
}
|
|
10425
|
-
}
|
|
10426
|
-
}
|
|
10427
|
-
if (node && !sel.isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
|
|
10428
|
-
let leftChild = node, rightChild = node;
|
|
10429
|
-
do {
|
|
10430
|
-
leftChild = leftChild.firstChild;
|
|
10431
|
-
rightChild = rightChild.lastChild;
|
|
10432
|
-
} while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild));
|
|
10433
|
-
if (leftChild === rightChild &&
|
|
10434
|
-
leftChild &&
|
|
10435
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild)) {
|
|
10436
|
-
node = leftChild;
|
|
10437
|
-
}
|
|
10438
|
-
}
|
|
10439
|
-
}
|
|
10440
|
-
// check - cursor inside editor
|
|
10441
|
-
if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
|
|
10442
|
-
return node;
|
|
10443
|
-
}
|
|
10453
|
+
if (this.j.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
|
|
10454
|
+
return null;
|
|
10455
|
+
}
|
|
10456
|
+
const sel = this.sel;
|
|
10457
|
+
if (!sel || sel.rangeCount === 0) {
|
|
10458
|
+
return null;
|
|
10459
|
+
}
|
|
10460
|
+
const range = sel.getRangeAt(0);
|
|
10461
|
+
let node = range.startContainer;
|
|
10462
|
+
let rightMode = false;
|
|
10463
|
+
const child = (nd) => rightMode ? nd.lastChild : nd.firstChild;
|
|
10464
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(node, 'br') && sel.isCollapsed) {
|
|
10465
|
+
return node;
|
|
10466
|
+
}
|
|
10467
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
|
|
10468
|
+
const ret = (0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .findCorrectCurrentNode */ .dY)(node, range, rightMode, sel.isCollapsed, checkChild, child);
|
|
10469
|
+
node = ret.node;
|
|
10470
|
+
rightMode = ret.rightMode;
|
|
10471
|
+
}
|
|
10472
|
+
// check - cursor inside editor
|
|
10473
|
+
if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
|
|
10474
|
+
return node;
|
|
10444
10475
|
}
|
|
10445
10476
|
return null;
|
|
10446
10477
|
}
|
|
10447
10478
|
/**
|
|
10448
10479
|
* Insert element in editor
|
|
10449
10480
|
*
|
|
10481
|
+
* @param node - Node for insert
|
|
10450
10482
|
* @param insertCursorAfter - After insert, cursor will move after element
|
|
10451
10483
|
* @param fireChange - After insert, editor fire change event. You can prevent this behavior
|
|
10452
10484
|
*/
|
|
@@ -10508,6 +10540,7 @@ class Selection {
|
|
|
10508
10540
|
* Inserts in the current cursor position some HTML snippet
|
|
10509
10541
|
*
|
|
10510
10542
|
* @param html - HTML The text to be inserted into the document
|
|
10543
|
+
* @param insertCursorAfter - After insert, cursor will move after element
|
|
10511
10544
|
* @example
|
|
10512
10545
|
* ```javascript
|
|
10513
10546
|
* parent.s.insertHTML('<img src="image.png"/>');
|
|
@@ -10551,6 +10584,7 @@ class Selection {
|
|
|
10551
10584
|
*
|
|
10552
10585
|
* @param url - URL for image, or HTMLImageElement
|
|
10553
10586
|
* @param styles - If specified, it will be applied <code>$(image).css(styles)</code>
|
|
10587
|
+
* @param defaultWidth - If specified, it will be applied <code>css('width', defaultWidth)</code>
|
|
10554
10588
|
*/
|
|
10555
10589
|
insertImage(url, styles = null, defaultWidth = null) {
|
|
10556
10590
|
const image = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .Kg)(url) ? this.j.createInside.element('img') : url;
|
|
@@ -10606,74 +10640,81 @@ class Selection {
|
|
|
10606
10640
|
eachSelection(callback) {
|
|
10607
10641
|
var _a;
|
|
10608
10642
|
const sel = this.sel;
|
|
10609
|
-
if (sel
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10643
|
+
if (!sel || !sel.rangeCount) {
|
|
10644
|
+
return;
|
|
10645
|
+
}
|
|
10646
|
+
const range = sel.getRangeAt(0);
|
|
10647
|
+
let root = range.commonAncestorContainer;
|
|
10648
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(root)) {
|
|
10649
|
+
root = root.parentElement;
|
|
10650
|
+
}
|
|
10651
|
+
const nodes = [];
|
|
10652
|
+
const startOffset = range.startOffset;
|
|
10653
|
+
const length = root.childNodes.length;
|
|
10654
|
+
const elementOffset = startOffset < length ? startOffset : length - 1;
|
|
10655
|
+
let start = range.startContainer === this.area
|
|
10656
|
+
? root.childNodes[elementOffset]
|
|
10657
|
+
: range.startContainer;
|
|
10658
|
+
let end = range.endContainer === this.area
|
|
10659
|
+
? root.childNodes[range.endOffset - 1]
|
|
10660
|
+
: range.endContainer;
|
|
10661
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) &&
|
|
10662
|
+
start === range.startContainer &&
|
|
10663
|
+
range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
10664
|
+
start.nextSibling) {
|
|
10665
|
+
start = start.nextSibling;
|
|
10666
|
+
}
|
|
10667
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) &&
|
|
10668
|
+
end === range.endContainer &&
|
|
10669
|
+
range.endOffset === 0 &&
|
|
10670
|
+
end.previousSibling) {
|
|
10671
|
+
end = end.previousSibling;
|
|
10672
|
+
}
|
|
10673
|
+
const checkElm = (node) => {
|
|
10674
|
+
if (node &&
|
|
10675
|
+
node !== root &&
|
|
10676
|
+
!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node) &&
|
|
10677
|
+
!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isMarker */ .rg)(node)) {
|
|
10678
|
+
nodes.push(node);
|
|
10679
|
+
}
|
|
10680
|
+
};
|
|
10681
|
+
checkElm(start);
|
|
10682
|
+
if (start !== end && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(root, start, true)) {
|
|
10683
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.find(start, node => {
|
|
10684
|
+
checkElm(node);
|
|
10685
|
+
// checks parentElement as well because partial selections are not equal to entire element
|
|
10686
|
+
return (node === end ||
|
|
10687
|
+
(node && node.contains && node.contains(end)));
|
|
10688
|
+
}, root, true, false);
|
|
10689
|
+
}
|
|
10690
|
+
const forEvery = (current) => {
|
|
10691
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.j.editor, current, true)) {
|
|
10692
|
+
return;
|
|
10693
|
+
}
|
|
10694
|
+
if (current.nodeName.match(/^(UL|OL)$/)) {
|
|
10695
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.toArray)(current.childNodes).forEach(forEvery);
|
|
10696
|
+
}
|
|
10697
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(current, 'li')) {
|
|
10698
|
+
if (current.firstChild) {
|
|
10699
|
+
current = current.firstChild;
|
|
10656
10700
|
}
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
else {
|
|
10662
|
-
const currentB = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
|
|
10663
|
-
current.appendChild(currentB);
|
|
10664
|
-
current = currentB;
|
|
10665
|
-
}
|
|
10701
|
+
else {
|
|
10702
|
+
const currentB = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
|
|
10703
|
+
current.appendChild(currentB);
|
|
10704
|
+
current = currentB;
|
|
10666
10705
|
}
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10706
|
+
}
|
|
10707
|
+
callback(current);
|
|
10708
|
+
};
|
|
10709
|
+
if (nodes.length === 0) {
|
|
10710
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(start)) {
|
|
10670
10711
|
nodes.push(start);
|
|
10671
10712
|
}
|
|
10672
|
-
if (
|
|
10713
|
+
if (start.firstChild) {
|
|
10673
10714
|
nodes.push(start.firstChild);
|
|
10674
10715
|
}
|
|
10675
|
-
nodes.forEach(forEvery);
|
|
10676
10716
|
}
|
|
10717
|
+
nodes.forEach(forEvery);
|
|
10677
10718
|
}
|
|
10678
10719
|
/**
|
|
10679
10720
|
* Checks if the cursor is at the end(start) block
|
|
@@ -10685,7 +10726,7 @@ class Selection {
|
|
|
10685
10726
|
* @returns true - the cursor is at the end(start) block, null - cursor somewhere outside
|
|
10686
10727
|
*/
|
|
10687
10728
|
cursorInTheEdge(start, parentBlock, fake = null) {
|
|
10688
|
-
var _a
|
|
10729
|
+
var _a;
|
|
10689
10730
|
const end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
|
|
10690
10731
|
fake !== null && fake !== void 0 ? fake : (fake = this.current(false));
|
|
10691
10732
|
if (!range || !fake || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(parentBlock, fake, true)) {
|
|
@@ -10701,13 +10742,7 @@ class Selection {
|
|
|
10701
10742
|
this.j.e.fire('isInvisibleForCursor', elm) === true));
|
|
10702
10743
|
// check right offset
|
|
10703
10744
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(container)) {
|
|
10704
|
-
|
|
10705
|
-
if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
10706
|
-
return false;
|
|
10707
|
-
}
|
|
10708
|
-
const inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
|
|
10709
|
-
if (start &&
|
|
10710
|
-
((inv && inv[0].length < offset) || (!inv && offset > 0))) {
|
|
10745
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .cursorInTheEdgeOfString */ .Qe)(container, offset, start, end)) {
|
|
10711
10746
|
return false;
|
|
10712
10747
|
}
|
|
10713
10748
|
}
|
|
@@ -10796,6 +10831,7 @@ class Selection {
|
|
|
10796
10831
|
}
|
|
10797
10832
|
/**
|
|
10798
10833
|
* Set cursor in the node
|
|
10834
|
+
* @param node - Node element
|
|
10799
10835
|
* @param inStart - set cursor in start of element
|
|
10800
10836
|
*/
|
|
10801
10837
|
setCursorIn(node, inStart = false) {
|
|
@@ -10856,6 +10892,7 @@ class Selection {
|
|
|
10856
10892
|
}
|
|
10857
10893
|
/**
|
|
10858
10894
|
* Select node
|
|
10895
|
+
* @param node - Node element
|
|
10859
10896
|
* @param inward - select all inside
|
|
10860
10897
|
*/
|
|
10861
10898
|
select(node, inward = false) {
|
|
@@ -11130,19 +11167,19 @@ class Selection {
|
|
|
11130
11167
|
return this;
|
|
11131
11168
|
}
|
|
11132
11169
|
}
|
|
11133
|
-
(0,
|
|
11170
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11134
11171
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11135
11172
|
], Selection.prototype, "createRange", null);
|
|
11136
|
-
(0,
|
|
11173
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11137
11174
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11138
11175
|
], Selection.prototype, "focus", null);
|
|
11139
|
-
(0,
|
|
11176
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11140
11177
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11141
11178
|
], Selection.prototype, "setCursorAfter", null);
|
|
11142
|
-
(0,
|
|
11179
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11143
11180
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11144
11181
|
], Selection.prototype, "setCursorBefore", null);
|
|
11145
|
-
(0,
|
|
11182
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11146
11183
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11147
11184
|
], Selection.prototype, "setCursorIn", null);
|
|
11148
11185
|
|
|
@@ -22357,6 +22394,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22357
22394
|
}
|
|
22358
22395
|
/**
|
|
22359
22396
|
* Generate formal table martix columns*rows
|
|
22397
|
+
* @param table - Working table
|
|
22360
22398
|
* @param callback - if return false cycle break
|
|
22361
22399
|
*/
|
|
22362
22400
|
formalMatrix(table, callback) {
|
|
@@ -22426,7 +22464,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22426
22464
|
* @param line - Insert a new line after/before this
|
|
22427
22465
|
* line contains the selected cell
|
|
22428
22466
|
* @param after - Insert a new line after line contains the selected cell
|
|
22429
|
-
* @param create - Instance of Create class
|
|
22430
22467
|
*/
|
|
22431
22468
|
appendRow(table, line, after) {
|
|
22432
22469
|
return Table.__appendRow(table, line, after, this.j.createInside);
|
|
@@ -22595,13 +22632,36 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22595
22632
|
return Table.__getSelectedBound(table, selectedCells);
|
|
22596
22633
|
}
|
|
22597
22634
|
static __normalizeTable(table) {
|
|
22598
|
-
let i, j, min, not;
|
|
22599
22635
|
const __marked = [], box = Table.__formalMatrix(table);
|
|
22600
|
-
|
|
22601
|
-
|
|
22602
|
-
|
|
22603
|
-
|
|
22604
|
-
for (
|
|
22636
|
+
Table.__removeExtraColspans(box, __marked);
|
|
22637
|
+
Table.__removeExtraRowspans(box, __marked);
|
|
22638
|
+
// remove rowspans and colspans equal 1 and empty class
|
|
22639
|
+
for (let i = 0; i < box.length; i += 1) {
|
|
22640
|
+
for (let j = 0; j < box[i].length; j += 1) {
|
|
22641
|
+
if (box[i][j] === undefined) {
|
|
22642
|
+
continue; // broken table
|
|
22643
|
+
}
|
|
22644
|
+
if (box[i][j].hasAttribute('rowspan') &&
|
|
22645
|
+
box[i][j].rowSpan === 1) {
|
|
22646
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
|
|
22647
|
+
}
|
|
22648
|
+
if (box[i][j].hasAttribute('colspan') &&
|
|
22649
|
+
box[i][j].colSpan === 1) {
|
|
22650
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
|
|
22651
|
+
}
|
|
22652
|
+
if (box[i][j].hasAttribute('class') &&
|
|
22653
|
+
!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
|
|
22654
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
|
|
22655
|
+
}
|
|
22656
|
+
}
|
|
22657
|
+
}
|
|
22658
|
+
Table.__unmark(__marked);
|
|
22659
|
+
}
|
|
22660
|
+
static __removeExtraColspans(box, __marked) {
|
|
22661
|
+
for (let j = 0; j < box[0].length; j += 1) {
|
|
22662
|
+
let min = 1000000;
|
|
22663
|
+
let not = false;
|
|
22664
|
+
for (let i = 0; i < box.length; i += 1) {
|
|
22605
22665
|
if (box[i][j] === undefined) {
|
|
22606
22666
|
continue; // broken table
|
|
22607
22667
|
}
|
|
@@ -22612,7 +22672,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22612
22672
|
min = Math.min(min, box[i][j].colSpan);
|
|
22613
22673
|
}
|
|
22614
22674
|
if (!not) {
|
|
22615
|
-
for (i = 0; i < box.length; i += 1) {
|
|
22675
|
+
for (let i = 0; i < box.length; i += 1) {
|
|
22616
22676
|
if (box[i][j] === undefined) {
|
|
22617
22677
|
continue; // broken table
|
|
22618
22678
|
}
|
|
@@ -22620,10 +22680,13 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22620
22680
|
}
|
|
22621
22681
|
}
|
|
22622
22682
|
}
|
|
22623
|
-
|
|
22683
|
+
}
|
|
22684
|
+
static __removeExtraRowspans(box, marked) {
|
|
22685
|
+
let i = 0;
|
|
22686
|
+
let j = 0;
|
|
22624
22687
|
for (i = 0; i < box.length; i += 1) {
|
|
22625
|
-
min = 1000000;
|
|
22626
|
-
not = false;
|
|
22688
|
+
let min = 1000000;
|
|
22689
|
+
let not = false;
|
|
22627
22690
|
for (j = 0; j < box[i].length; j += 1) {
|
|
22628
22691
|
if (box[i][j] === undefined) {
|
|
22629
22692
|
continue; // broken table
|
|
@@ -22639,31 +22702,10 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22639
22702
|
if (box[i][j] === undefined) {
|
|
22640
22703
|
continue; // broken table
|
|
22641
22704
|
}
|
|
22642
|
-
Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1,
|
|
22705
|
+
Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1, marked);
|
|
22643
22706
|
}
|
|
22644
22707
|
}
|
|
22645
22708
|
}
|
|
22646
|
-
// remove rowspans and colspans equal 1 and empty class
|
|
22647
|
-
for (i = 0; i < box.length; i += 1) {
|
|
22648
|
-
for (j = 0; j < box[i].length; j += 1) {
|
|
22649
|
-
if (box[i][j] === undefined) {
|
|
22650
|
-
continue; // broken table
|
|
22651
|
-
}
|
|
22652
|
-
if (box[i][j].hasAttribute('rowspan') &&
|
|
22653
|
-
box[i][j].rowSpan === 1) {
|
|
22654
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
|
|
22655
|
-
}
|
|
22656
|
-
if (box[i][j].hasAttribute('colspan') &&
|
|
22657
|
-
box[i][j].colSpan === 1) {
|
|
22658
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
|
|
22659
|
-
}
|
|
22660
|
-
if (box[i][j].hasAttribute('class') &&
|
|
22661
|
-
!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
|
|
22662
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
|
|
22663
|
-
}
|
|
22664
|
-
}
|
|
22665
|
-
}
|
|
22666
|
-
Table.__unmark(__marked);
|
|
22667
22709
|
}
|
|
22668
22710
|
/**
|
|
22669
22711
|
* Try recalculate all coluns and rows after change
|
|
@@ -24095,34 +24137,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
|
|
|
24095
24137
|
}
|
|
24096
24138
|
const promises = [];
|
|
24097
24139
|
if (o.insertImageAsBase64URI) {
|
|
24098
|
-
|
|
24099
|
-
for (i = 0; i < fileList.length; i += 1) {
|
|
24100
|
-
file = fileList[i];
|
|
24101
|
-
if (file && file.type) {
|
|
24102
|
-
const mime = file.type.match(/\/([a-z0-9]+)/i);
|
|
24103
|
-
const extension = mime[1] ? mime[1].toLowerCase() : '';
|
|
24104
|
-
if (o.imagesExtensions.includes(extension)) {
|
|
24105
|
-
const reader = new FileReader();
|
|
24106
|
-
promises.push(uploader.j.async.promise((resolve, reject) => {
|
|
24107
|
-
reader.onerror = reject;
|
|
24108
|
-
reader.onloadend = () => {
|
|
24109
|
-
const resp = {
|
|
24110
|
-
baseurl: '',
|
|
24111
|
-
files: [reader.result],
|
|
24112
|
-
isImages: [true]
|
|
24113
|
-
};
|
|
24114
|
-
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
|
|
24115
|
-
? handlerSuccess
|
|
24116
|
-
: o.defaultHandlerSuccess;
|
|
24117
|
-
handler.call(uploader, resp);
|
|
24118
|
-
resolve(resp);
|
|
24119
|
-
};
|
|
24120
|
-
reader.readAsDataURL(file);
|
|
24121
|
-
}));
|
|
24122
|
-
fileList[i] = null;
|
|
24123
|
-
}
|
|
24124
|
-
}
|
|
24125
|
-
}
|
|
24140
|
+
readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
|
|
24126
24141
|
}
|
|
24127
24142
|
fileList = fileList.filter(a => a);
|
|
24128
24143
|
if (fileList.length) {
|
|
@@ -24133,7 +24148,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
|
|
|
24133
24148
|
for (let i = 0; i < fileList.length; i += 1) {
|
|
24134
24149
|
file = fileList[i];
|
|
24135
24150
|
if (file) {
|
|
24136
|
-
const hasRealExtension =
|
|
24151
|
+
const hasRealExtension = /\.\w+$/.test(file.name);
|
|
24137
24152
|
const mime = file.type.match(/\/([a-z0-9]+)/i);
|
|
24138
24153
|
const extension = mime && mime[1] ? mime[1].toLowerCase() : '';
|
|
24139
24154
|
let newName = fileList[i].name ||
|
|
@@ -24182,6 +24197,37 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
|
|
|
24182
24197
|
}
|
|
24183
24198
|
return Promise.all(promises);
|
|
24184
24199
|
}
|
|
24200
|
+
function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
|
|
24201
|
+
let file, i;
|
|
24202
|
+
for (i = 0; i < fileList.length; i += 1) {
|
|
24203
|
+
file = fileList[i];
|
|
24204
|
+
if (file && file.type) {
|
|
24205
|
+
const mime = file.type.match(/\/([a-z0-9]+)/i);
|
|
24206
|
+
const extension = mime[1] ? mime[1].toLowerCase() : '';
|
|
24207
|
+
if (!imagesExtensions.includes(extension)) {
|
|
24208
|
+
continue;
|
|
24209
|
+
}
|
|
24210
|
+
const reader = new FileReader();
|
|
24211
|
+
promises.push(uploader.j.async.promise((resolve, reject) => {
|
|
24212
|
+
reader.onerror = reject;
|
|
24213
|
+
reader.onloadend = () => {
|
|
24214
|
+
const resp = {
|
|
24215
|
+
baseurl: '',
|
|
24216
|
+
files: [reader.result],
|
|
24217
|
+
isImages: [true]
|
|
24218
|
+
};
|
|
24219
|
+
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
|
|
24220
|
+
? handlerSuccess
|
|
24221
|
+
: defaultHandlerSuccess;
|
|
24222
|
+
handler.call(uploader, resp);
|
|
24223
|
+
resolve(resp);
|
|
24224
|
+
};
|
|
24225
|
+
reader.readAsDataURL(file);
|
|
24226
|
+
}));
|
|
24227
|
+
fileList[i] = null;
|
|
24228
|
+
}
|
|
24229
|
+
}
|
|
24230
|
+
}
|
|
24185
24231
|
|
|
24186
24232
|
|
|
24187
24233
|
/***/ }),
|
|
@@ -25801,7 +25847,7 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin
|
|
|
25801
25847
|
if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
|
|
25802
25848
|
return false;
|
|
25803
25849
|
}
|
|
25804
|
-
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .
|
|
25850
|
+
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
|
|
25805
25851
|
if (_cases__WEBPACK_IMPORTED_MODULE_6__/* .cases */ .C.some((func) => {
|
|
25806
25852
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__/* .isFunction */ .T)(func) &&
|
|
25807
25853
|
func(jodit, fakeNode, backspace, mode)) {
|
|
@@ -26060,22 +26106,15 @@ function checkNotCollapsed(jodit) {
|
|
|
26060
26106
|
* @private
|
|
26061
26107
|
*/
|
|
26062
26108
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
26063
|
-
var _a, _b
|
|
26109
|
+
var _a, _b;
|
|
26064
26110
|
const step = backspace ? -1 : 1;
|
|
26065
26111
|
const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
26066
|
-
let sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace)
|
|
26067
|
-
let
|
|
26068
|
-
|
|
26069
|
-
|
|
26070
|
-
if (!nextSibling &&
|
|
26071
|
-
sibling.parentNode &&
|
|
26072
|
-
sibling.parentNode !== jodit.editor) {
|
|
26073
|
-
nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, jodit.editor, true);
|
|
26074
|
-
}
|
|
26075
|
-
return nextSibling;
|
|
26076
|
-
};
|
|
26112
|
+
let sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
|
|
26113
|
+
let removeNeighbor = null;
|
|
26114
|
+
let charRemoved = false;
|
|
26115
|
+
let removed;
|
|
26077
26116
|
if (!sibling) {
|
|
26078
|
-
sibling = getNextInlineSibling(fakeNode);
|
|
26117
|
+
sibling = getNextInlineSibling(fakeNode, backspace, jodit.editor);
|
|
26079
26118
|
}
|
|
26080
26119
|
while (sibling && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(sibling) || jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling))) {
|
|
26081
26120
|
while (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)) {
|
|
@@ -26085,57 +26124,17 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
26085
26124
|
break;
|
|
26086
26125
|
}
|
|
26087
26126
|
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
26088
|
-
|
|
26089
|
-
let value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
|
|
26090
|
-
const length = value.length;
|
|
26091
|
-
let index = backspace ? length - 1 : 0;
|
|
26092
|
-
if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26093
|
-
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26094
|
-
index += step;
|
|
26095
|
-
}
|
|
26096
|
-
}
|
|
26097
|
-
removed = value[index];
|
|
26098
|
-
if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26099
|
-
index += step;
|
|
26100
|
-
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26101
|
-
index += step;
|
|
26102
|
-
}
|
|
26103
|
-
index += backspace ? 1 : -1;
|
|
26104
|
-
}
|
|
26105
|
-
if (backspace && index < 0) {
|
|
26106
|
-
value = [];
|
|
26107
|
-
}
|
|
26108
|
-
else {
|
|
26109
|
-
value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
|
|
26110
|
-
}
|
|
26111
|
-
if (!anotherSibling ||
|
|
26112
|
-
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
|
|
26113
|
-
(!backspace ? / $/ : /^ /).test((_b = anotherSibling.nodeValue) !== null && _b !== void 0 ? _b : '') ||
|
|
26114
|
-
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
|
|
26115
|
-
for (let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
|
|
26116
|
-
if (value[i] === ' ') {
|
|
26117
|
-
value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
26118
|
-
}
|
|
26119
|
-
else {
|
|
26120
|
-
break;
|
|
26121
|
-
}
|
|
26122
|
-
}
|
|
26123
|
-
}
|
|
26124
|
-
sibling.nodeValue = value.join('');
|
|
26127
|
+
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
26125
26128
|
}
|
|
26126
|
-
if (!((
|
|
26129
|
+
if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
26127
26130
|
removeNeighbor = sibling;
|
|
26128
26131
|
}
|
|
26129
26132
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26133
|
+
checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit);
|
|
26130
26134
|
charRemoved = true;
|
|
26131
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after : jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before, sibling, fakeNode);
|
|
26132
|
-
if (mode === 'sentence' ||
|
|
26133
|
-
(mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
|
|
26134
|
-
checkRemoveChar(jodit, fakeNode, backspace, mode);
|
|
26135
|
-
}
|
|
26136
26135
|
break;
|
|
26137
26136
|
}
|
|
26138
|
-
const nextSibling = getNextInlineSibling(sibling);
|
|
26137
|
+
const nextSibling = getNextInlineSibling(sibling, backspace, jodit.editor);
|
|
26139
26138
|
if (removeNeighbor) {
|
|
26140
26139
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(removeNeighbor);
|
|
26141
26140
|
removeNeighbor = null;
|
|
@@ -26157,6 +26156,13 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
26157
26156
|
}
|
|
26158
26157
|
return charRemoved;
|
|
26159
26158
|
}
|
|
26159
|
+
function getNextInlineSibling(sibling, backspace, root) {
|
|
26160
|
+
let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(sibling, backspace);
|
|
26161
|
+
if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
|
|
26162
|
+
nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, root, true);
|
|
26163
|
+
}
|
|
26164
|
+
return nextSibling;
|
|
26165
|
+
}
|
|
26160
26166
|
/**
|
|
26161
26167
|
* Helper removes all empty inline parents
|
|
26162
26168
|
*/
|
|
@@ -26181,6 +26187,57 @@ function addBRInsideEmptyBlock(jodit, node) {
|
|
|
26181
26187
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(node, jodit.createInside.element('br'));
|
|
26182
26188
|
}
|
|
26183
26189
|
}
|
|
26190
|
+
function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
26191
|
+
// For Unicode escapes
|
|
26192
|
+
let value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
|
|
26193
|
+
const length = value.length;
|
|
26194
|
+
let index = backspace ? length - 1 : 0;
|
|
26195
|
+
if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26196
|
+
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26197
|
+
index += step;
|
|
26198
|
+
}
|
|
26199
|
+
}
|
|
26200
|
+
const removed = value[index];
|
|
26201
|
+
if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26202
|
+
index += step;
|
|
26203
|
+
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26204
|
+
index += step;
|
|
26205
|
+
}
|
|
26206
|
+
index += backspace ? 1 : -1;
|
|
26207
|
+
}
|
|
26208
|
+
if (backspace && index < 0) {
|
|
26209
|
+
value = [];
|
|
26210
|
+
}
|
|
26211
|
+
else {
|
|
26212
|
+
value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
|
|
26213
|
+
}
|
|
26214
|
+
replaceSpaceOnNBSP(anotherSibling, backspace, value);
|
|
26215
|
+
sibling.nodeValue = value.join('');
|
|
26216
|
+
return removed;
|
|
26217
|
+
}
|
|
26218
|
+
function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
26219
|
+
var _a;
|
|
26220
|
+
if (!anotherSibling ||
|
|
26221
|
+
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
|
|
26222
|
+
(!backspace ? / $/ : /^ /).test((_a = anotherSibling.nodeValue) !== null && _a !== void 0 ? _a : '') ||
|
|
26223
|
+
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
|
|
26224
|
+
for (let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
|
|
26225
|
+
if (value[i] === ' ') {
|
|
26226
|
+
value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
26227
|
+
}
|
|
26228
|
+
else {
|
|
26229
|
+
break;
|
|
26230
|
+
}
|
|
26231
|
+
}
|
|
26232
|
+
}
|
|
26233
|
+
}
|
|
26234
|
+
function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
|
|
26235
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after : jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before, sibling, fakeNode);
|
|
26236
|
+
if (mode === 'sentence' ||
|
|
26237
|
+
(mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
|
|
26238
|
+
checkRemoveChar(jodit, fakeNode, backspace, mode);
|
|
26239
|
+
}
|
|
26240
|
+
}
|
|
26184
26241
|
|
|
26185
26242
|
|
|
26186
26243
|
/***/ }),
|
|
@@ -26218,7 +26275,7 @@ function checkRemoveContentNotEditable(jodit, fakeNode, backspace) {
|
|
|
26218
26275
|
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isContentEditable(neighbor, jodit.editor)) {
|
|
26219
26276
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before : jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after, neighbor, fakeNode);
|
|
26220
26277
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(neighbor);
|
|
26221
|
-
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .
|
|
26278
|
+
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
|
|
26222
26279
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
|
|
26223
26280
|
return true;
|
|
26224
26281
|
}
|
|
@@ -29080,45 +29137,11 @@ class dragAndDrop extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
|
|
|
29080
29137
|
const sel = this.j.s.sel;
|
|
29081
29138
|
const range = this.bufferRange ||
|
|
29082
29139
|
(sel && sel.rangeCount ? sel.getRangeAt(0) : null);
|
|
29083
|
-
|
|
29084
|
-
if (!this.draggable && range) {
|
|
29085
|
-
fragment = this.isCopyMode
|
|
29086
|
-
? range.cloneContents()
|
|
29087
|
-
: range.extractContents();
|
|
29088
|
-
}
|
|
29089
|
-
else if (this.draggable) {
|
|
29090
|
-
if (this.isCopyMode) {
|
|
29091
|
-
const [tagName, field] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
|
|
29092
|
-
? ['a', 'href']
|
|
29093
|
-
: ['img', 'src'];
|
|
29094
|
-
fragment = this.j.createInside.element(tagName);
|
|
29095
|
-
fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
|
|
29096
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
|
|
29097
|
-
'');
|
|
29098
|
-
if (tagName === 'a') {
|
|
29099
|
-
fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
|
|
29100
|
-
}
|
|
29101
|
-
}
|
|
29102
|
-
else {
|
|
29103
|
-
fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
|
|
29104
|
-
}
|
|
29105
|
-
}
|
|
29106
|
-
else if (this.getText(event)) {
|
|
29107
|
-
fragment = this.j.createInside.fromHTML(this.getText(event));
|
|
29108
|
-
}
|
|
29140
|
+
const fragment = this.__getWorkFragment(range, event);
|
|
29109
29141
|
sel && sel.removeAllRanges();
|
|
29110
29142
|
this.j.s.insertCursorAtPoint(event.clientX, event.clientY);
|
|
29111
29143
|
if (fragment) {
|
|
29112
|
-
this.
|
|
29113
|
-
if (range && fragment.firstChild && fragment.lastChild) {
|
|
29114
|
-
range.setStartBefore(fragment.firstChild);
|
|
29115
|
-
range.setEndAfter(fragment.lastChild);
|
|
29116
|
-
this.j.s.selectRange(range);
|
|
29117
|
-
this.j.e.fire('synchro');
|
|
29118
|
-
}
|
|
29119
|
-
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
|
|
29120
|
-
this.j.e.fire('afterInsertImage', fragment);
|
|
29121
|
-
}
|
|
29144
|
+
this.__insertFragment.call(this, fragment, range);
|
|
29122
29145
|
}
|
|
29123
29146
|
event.preventDefault();
|
|
29124
29147
|
event.stopPropagation();
|
|
@@ -29126,6 +29149,47 @@ class dragAndDrop extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
|
|
|
29126
29149
|
this.isFragmentFromEditor = false;
|
|
29127
29150
|
this.removeDragListeners();
|
|
29128
29151
|
}
|
|
29152
|
+
__getWorkFragment(range, event) {
|
|
29153
|
+
let fragment = null;
|
|
29154
|
+
if (!this.draggable && range) {
|
|
29155
|
+
fragment = this.isCopyMode
|
|
29156
|
+
? range.cloneContents()
|
|
29157
|
+
: range.extractContents();
|
|
29158
|
+
}
|
|
29159
|
+
else if (this.draggable) {
|
|
29160
|
+
if (this.isCopyMode) {
|
|
29161
|
+
const [tagName, field] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
|
|
29162
|
+
? ['a', 'href']
|
|
29163
|
+
: ['img', 'src'];
|
|
29164
|
+
fragment = this.j.createInside.element(tagName);
|
|
29165
|
+
fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
|
|
29166
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
|
|
29167
|
+
'');
|
|
29168
|
+
if (tagName === 'a') {
|
|
29169
|
+
fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
|
|
29170
|
+
}
|
|
29171
|
+
}
|
|
29172
|
+
else {
|
|
29173
|
+
fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
|
|
29174
|
+
}
|
|
29175
|
+
}
|
|
29176
|
+
else if (this.getText(event)) {
|
|
29177
|
+
fragment = this.j.createInside.fromHTML(this.getText(event));
|
|
29178
|
+
}
|
|
29179
|
+
return fragment;
|
|
29180
|
+
}
|
|
29181
|
+
__insertFragment(fragment, range) {
|
|
29182
|
+
this.j.s.insertNode(fragment, false, false);
|
|
29183
|
+
if (range && fragment.firstChild && fragment.lastChild) {
|
|
29184
|
+
range.setStartBefore(fragment.firstChild);
|
|
29185
|
+
range.setEndAfter(fragment.lastChild);
|
|
29186
|
+
this.j.s.selectRange(range);
|
|
29187
|
+
this.j.e.fire('synchro');
|
|
29188
|
+
}
|
|
29189
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
|
|
29190
|
+
this.j.e.fire('afterInsertImage', fragment);
|
|
29191
|
+
}
|
|
29192
|
+
}
|
|
29129
29193
|
/** @override */
|
|
29130
29194
|
beforeDestruct() {
|
|
29131
29195
|
this.onDragEnd();
|
|
@@ -33258,6 +33322,9 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33258
33322
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33259
33323
|
return;
|
|
33260
33324
|
}
|
|
33325
|
+
if (!control.args) {
|
|
33326
|
+
return false;
|
|
33327
|
+
}
|
|
33261
33328
|
const command = cmd(control);
|
|
33262
33329
|
editor.execCommand(command, false, table);
|
|
33263
33330
|
},
|
|
@@ -33273,6 +33340,9 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33273
33340
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33274
33341
|
return;
|
|
33275
33342
|
}
|
|
33343
|
+
if (!control.args) {
|
|
33344
|
+
return false;
|
|
33345
|
+
}
|
|
33276
33346
|
const command = cmd(control);
|
|
33277
33347
|
editor.execCommand(command, false, table);
|
|
33278
33348
|
},
|
|
@@ -33291,6 +33361,9 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33291
33361
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33292
33362
|
return;
|
|
33293
33363
|
}
|
|
33364
|
+
if (!control.args) {
|
|
33365
|
+
return false;
|
|
33366
|
+
}
|
|
33294
33367
|
const command = cmd(control);
|
|
33295
33368
|
editor.execCommand(command, false, table);
|
|
33296
33369
|
editor.e.fire('hidePopup');
|
|
@@ -34839,35 +34912,7 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34839
34912
|
if (link) {
|
|
34840
34913
|
url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href') || '';
|
|
34841
34914
|
if (modeClassName) {
|
|
34842
|
-
|
|
34843
|
-
case 'input':
|
|
34844
|
-
if (className_input) {
|
|
34845
|
-
className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
34846
|
-
}
|
|
34847
|
-
break;
|
|
34848
|
-
case 'select':
|
|
34849
|
-
if (className_select) {
|
|
34850
|
-
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
34851
|
-
const option = className_select.options.item(i);
|
|
34852
|
-
if (option) {
|
|
34853
|
-
option.selected = false;
|
|
34854
|
-
}
|
|
34855
|
-
}
|
|
34856
|
-
const classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
34857
|
-
classNames.split(' ').forEach(className => {
|
|
34858
|
-
if (className) {
|
|
34859
|
-
for (let i = 0; i < className_select.options.length; i++) {
|
|
34860
|
-
const option = className_select.options.item(i);
|
|
34861
|
-
if ((option === null || option === void 0 ? void 0 : option.value) &&
|
|
34862
|
-
option.value === className) {
|
|
34863
|
-
option.selected = true;
|
|
34864
|
-
}
|
|
34865
|
-
}
|
|
34866
|
-
}
|
|
34867
|
-
});
|
|
34868
|
-
}
|
|
34869
|
-
break;
|
|
34870
|
-
}
|
|
34915
|
+
readClassnames(modeClassName, className_input, link, className_select);
|
|
34871
34916
|
}
|
|
34872
34917
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
34873
34918
|
target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'target') === '_blank';
|
|
@@ -34928,44 +34973,10 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34928
34973
|
links = [link];
|
|
34929
34974
|
}
|
|
34930
34975
|
links.forEach(a => {
|
|
34931
|
-
var _a;
|
|
34932
34976
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'href', url_input.value);
|
|
34933
|
-
|
|
34934
|
-
if (modeClassName === 'input') {
|
|
34935
|
-
if (className_input.value === '' &&
|
|
34936
|
-
a.hasAttribute('class')) {
|
|
34937
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
34938
|
-
}
|
|
34939
|
-
if (className_input.value !== '') {
|
|
34940
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
|
|
34941
|
-
}
|
|
34942
|
-
}
|
|
34943
|
-
else if (modeClassName === 'select') {
|
|
34944
|
-
if (a.hasAttribute('class')) {
|
|
34945
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
34946
|
-
}
|
|
34947
|
-
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
34948
|
-
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
34949
|
-
if (className) {
|
|
34950
|
-
a.classList.add(className);
|
|
34951
|
-
}
|
|
34952
|
-
}
|
|
34953
|
-
}
|
|
34954
|
-
}
|
|
34977
|
+
writeClasses(modeClassName, className_input, className_select, a);
|
|
34955
34978
|
if (!isImageContent) {
|
|
34956
|
-
|
|
34957
|
-
if (content_input.value.trim().length) {
|
|
34958
|
-
if (textWasChanged) {
|
|
34959
|
-
newContent = content_input.value;
|
|
34960
|
-
}
|
|
34961
|
-
}
|
|
34962
|
-
else {
|
|
34963
|
-
newContent = url_input.value;
|
|
34964
|
-
}
|
|
34965
|
-
const content = a.textContent;
|
|
34966
|
-
if (newContent !== content) {
|
|
34967
|
-
a.textContent = newContent;
|
|
34968
|
-
}
|
|
34979
|
+
writeImage(a, content_input, textWasChanged, url_input);
|
|
34969
34980
|
}
|
|
34970
34981
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
34971
34982
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
@@ -35010,6 +35021,75 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
35010
35021
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
35011
35022
|
], link.prototype, "__generateForm", null);
|
|
35012
35023
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
|
|
35024
|
+
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
35025
|
+
var _a;
|
|
35026
|
+
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
35027
|
+
if (modeClassName === 'input') {
|
|
35028
|
+
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
35029
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
35030
|
+
}
|
|
35031
|
+
if (className_input.value !== '') {
|
|
35032
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
|
|
35033
|
+
}
|
|
35034
|
+
}
|
|
35035
|
+
else if (modeClassName === 'select') {
|
|
35036
|
+
if (a.hasAttribute('class')) {
|
|
35037
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
35038
|
+
}
|
|
35039
|
+
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
35040
|
+
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
35041
|
+
if (className) {
|
|
35042
|
+
a.classList.add(className);
|
|
35043
|
+
}
|
|
35044
|
+
}
|
|
35045
|
+
}
|
|
35046
|
+
}
|
|
35047
|
+
}
|
|
35048
|
+
function readClassnames(modeClassName, className_input, link, className_select) {
|
|
35049
|
+
switch (modeClassName) {
|
|
35050
|
+
case 'input':
|
|
35051
|
+
if (className_input) {
|
|
35052
|
+
className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
35053
|
+
}
|
|
35054
|
+
break;
|
|
35055
|
+
case 'select':
|
|
35056
|
+
if (className_select) {
|
|
35057
|
+
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
35058
|
+
const option = className_select.options.item(i);
|
|
35059
|
+
if (option) {
|
|
35060
|
+
option.selected = false;
|
|
35061
|
+
}
|
|
35062
|
+
}
|
|
35063
|
+
const classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
35064
|
+
classNames.split(' ').forEach(className => {
|
|
35065
|
+
if (className) {
|
|
35066
|
+
for (let i = 0; i < className_select.options.length; i++) {
|
|
35067
|
+
const option = className_select.options.item(i);
|
|
35068
|
+
if ((option === null || option === void 0 ? void 0 : option.value) && option.value === className) {
|
|
35069
|
+
option.selected = true;
|
|
35070
|
+
}
|
|
35071
|
+
}
|
|
35072
|
+
}
|
|
35073
|
+
});
|
|
35074
|
+
}
|
|
35075
|
+
break;
|
|
35076
|
+
}
|
|
35077
|
+
}
|
|
35078
|
+
function writeImage(a, content_input, textWasChanged, url_input) {
|
|
35079
|
+
let newContent = a.textContent;
|
|
35080
|
+
if (content_input.value.trim().length) {
|
|
35081
|
+
if (textWasChanged) {
|
|
35082
|
+
newContent = content_input.value;
|
|
35083
|
+
}
|
|
35084
|
+
}
|
|
35085
|
+
else {
|
|
35086
|
+
newContent = url_input.value;
|
|
35087
|
+
}
|
|
35088
|
+
const content = a.textContent;
|
|
35089
|
+
if (newContent !== content) {
|
|
35090
|
+
a.textContent = newContent;
|
|
35091
|
+
}
|
|
35092
|
+
}
|
|
35013
35093
|
|
|
35014
35094
|
|
|
35015
35095
|
/***/ }),
|
|
@@ -37849,7 +37929,6 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
37849
37929
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
37850
37930
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
37851
37931
|
/* harmony export */ });
|
|
37852
|
-
/* unused harmony export isSelectionWrapper */
|
|
37853
37932
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
|
|
37854
37933
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58720);
|
|
37855
37934
|
/*!
|
|
@@ -37871,60 +37950,14 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
|
37871
37950
|
rng.endContainer.nodeValue == null) {
|
|
37872
37951
|
return;
|
|
37873
37952
|
}
|
|
37874
|
-
if (jodit
|
|
37875
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37876
|
-
typeof window.Highlight !== 'undefined') {
|
|
37877
|
-
const ranges = [rng, ...restRanges].map(rng => {
|
|
37878
|
-
const range = jodit.selection.createRange();
|
|
37879
|
-
range.setStart(rng.startContainer, rng.startOffset);
|
|
37880
|
-
range.setEnd(rng.endContainer, rng.endOffset);
|
|
37881
|
-
return range;
|
|
37882
|
-
});
|
|
37883
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37884
|
-
const searchHighlight = new Highlight(...ranges);
|
|
37885
|
-
// @ts-ignore
|
|
37886
|
-
CSS.highlights.clear();
|
|
37887
|
-
// @ts-ignore
|
|
37888
|
-
CSS.highlights.set('jodit-search-result', searchHighlight);
|
|
37889
|
-
restRanges.length = 0;
|
|
37953
|
+
if (checkNativeSelectionMethod(jodit, rng, restRanges)) {
|
|
37890
37954
|
return;
|
|
37891
37955
|
}
|
|
37892
37956
|
const span = ci.element('span', {
|
|
37893
37957
|
[TMP_ATTR]: true
|
|
37894
37958
|
});
|
|
37895
37959
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
|
|
37896
|
-
|
|
37897
|
-
let diff = 0;
|
|
37898
|
-
if (rng.startOffset !== 0) {
|
|
37899
|
-
const text = ci.text(startText.substring(0, rng.startOffset));
|
|
37900
|
-
rng.startContainer.nodeValue = startText.substring(rng.startOffset);
|
|
37901
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
|
|
37902
|
-
if (rng.startContainer === rng.endContainer) {
|
|
37903
|
-
diff = rng.startOffset;
|
|
37904
|
-
rng.endOffset -= diff;
|
|
37905
|
-
}
|
|
37906
|
-
rng.startOffset = 0;
|
|
37907
|
-
}
|
|
37908
|
-
const endText = rng.endContainer.nodeValue;
|
|
37909
|
-
if (rng.endOffset !== endText.length) {
|
|
37910
|
-
const text = ci.text(endText.substring(rng.endOffset));
|
|
37911
|
-
rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
|
|
37912
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
|
|
37913
|
-
for (const range of restRanges) {
|
|
37914
|
-
if (range.startContainer === rng.endContainer) {
|
|
37915
|
-
range.startContainer = text;
|
|
37916
|
-
range.startOffset = range.startOffset - rng.endOffset - diff;
|
|
37917
|
-
if (range.endContainer === rng.endContainer) {
|
|
37918
|
-
range.endContainer = text;
|
|
37919
|
-
range.endOffset = range.endOffset - rng.endOffset - diff;
|
|
37920
|
-
}
|
|
37921
|
-
}
|
|
37922
|
-
else {
|
|
37923
|
-
break;
|
|
37924
|
-
}
|
|
37925
|
-
}
|
|
37926
|
-
rng.endOffset = rng.endContainer.nodeValue.length;
|
|
37927
|
-
}
|
|
37960
|
+
normalizeRanges(rng, restRanges, ci);
|
|
37928
37961
|
let next = rng.startContainer;
|
|
37929
37962
|
do {
|
|
37930
37963
|
if (!next) {
|
|
@@ -37970,6 +38003,61 @@ function clearSelectionWrappersFromHTML(root) {
|
|
|
37970
38003
|
function isSelectionWrapper(node) {
|
|
37971
38004
|
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
|
|
37972
38005
|
}
|
|
38006
|
+
function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
38007
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
38008
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38009
|
+
typeof window.Highlight !== 'undefined') {
|
|
38010
|
+
const ranges = [rng, ...restRanges].map(rng => {
|
|
38011
|
+
const range = jodit.selection.createRange();
|
|
38012
|
+
range.setStart(rng.startContainer, rng.startOffset);
|
|
38013
|
+
range.setEnd(rng.endContainer, rng.endOffset);
|
|
38014
|
+
return range;
|
|
38015
|
+
});
|
|
38016
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38017
|
+
const searchHighlight = new Highlight(...ranges);
|
|
38018
|
+
// @ts-ignore
|
|
38019
|
+
CSS.highlights.clear();
|
|
38020
|
+
// @ts-ignore
|
|
38021
|
+
CSS.highlights.set('jodit-search-result', searchHighlight);
|
|
38022
|
+
restRanges.length = 0;
|
|
38023
|
+
return true;
|
|
38024
|
+
}
|
|
38025
|
+
return false;
|
|
38026
|
+
}
|
|
38027
|
+
function normalizeRanges(rng, restRanges, ci) {
|
|
38028
|
+
const startText = rng.startContainer.nodeValue;
|
|
38029
|
+
let diff = 0;
|
|
38030
|
+
if (rng.startOffset !== 0) {
|
|
38031
|
+
const text = ci.text(startText.substring(0, rng.startOffset));
|
|
38032
|
+
rng.startContainer.nodeValue = startText.substring(rng.startOffset);
|
|
38033
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
|
|
38034
|
+
if (rng.startContainer === rng.endContainer) {
|
|
38035
|
+
diff = rng.startOffset;
|
|
38036
|
+
rng.endOffset -= diff;
|
|
38037
|
+
}
|
|
38038
|
+
rng.startOffset = 0;
|
|
38039
|
+
}
|
|
38040
|
+
const endText = rng.endContainer.nodeValue;
|
|
38041
|
+
if (rng.endOffset !== endText.length) {
|
|
38042
|
+
const text = ci.text(endText.substring(rng.endOffset));
|
|
38043
|
+
rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
|
|
38044
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
|
|
38045
|
+
for (const range of restRanges) {
|
|
38046
|
+
if (range.startContainer === rng.endContainer) {
|
|
38047
|
+
range.startContainer = text;
|
|
38048
|
+
range.startOffset = range.startOffset - rng.endOffset - diff;
|
|
38049
|
+
if (range.endContainer === rng.endContainer) {
|
|
38050
|
+
range.endContainer = text;
|
|
38051
|
+
range.endOffset = range.endOffset - rng.endOffset - diff;
|
|
38052
|
+
}
|
|
38053
|
+
}
|
|
38054
|
+
else {
|
|
38055
|
+
break;
|
|
38056
|
+
}
|
|
38057
|
+
}
|
|
38058
|
+
rng.endOffset = rng.endContainer.nodeValue.length;
|
|
38059
|
+
}
|
|
38060
|
+
}
|
|
37973
38061
|
|
|
37974
38062
|
|
|
37975
38063
|
/***/ }),
|
|
@@ -42171,38 +42259,10 @@ function tableKeyboardNavigation(editor) {
|
|
|
42171
42259
|
.off('.tableKeyboardNavigation')
|
|
42172
42260
|
.on('keydown.tableKeyboardNavigation', (event) => {
|
|
42173
42261
|
const { key } = event;
|
|
42174
|
-
|
|
42175
|
-
return;
|
|
42176
|
-
}
|
|
42177
|
-
const current = editor.s.current();
|
|
42178
|
-
if (!current) {
|
|
42179
|
-
return;
|
|
42180
|
-
}
|
|
42181
|
-
const cell = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.up(current, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isCell, editor.editor);
|
|
42262
|
+
const cell = findCell(editor, key);
|
|
42182
42263
|
if (!cell) {
|
|
42183
42264
|
return;
|
|
42184
42265
|
}
|
|
42185
|
-
const { range } = editor.s;
|
|
42186
|
-
if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
|
|
42187
|
-
const isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
|
|
42188
|
-
const hasNext = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(!isNextDirection ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.prev : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.next, current, elm => key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN
|
|
42189
|
-
? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
|
|
42190
|
-
: Boolean(elm), cell);
|
|
42191
|
-
if ((!isNextDirection &&
|
|
42192
|
-
(hasNext ||
|
|
42193
|
-
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
|
|
42194
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42195
|
-
range.startOffset !== 0))) ||
|
|
42196
|
-
(isNextDirection &&
|
|
42197
|
-
(hasNext ||
|
|
42198
|
-
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
|
|
42199
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42200
|
-
current.nodeValue &&
|
|
42201
|
-
range.startOffset !==
|
|
42202
|
-
current.nodeValue.length)))) {
|
|
42203
|
-
return;
|
|
42204
|
-
}
|
|
42205
|
-
}
|
|
42206
42266
|
const tableModule = editor.getInstance(jodit_modules_table_table__WEBPACK_IMPORTED_MODULE_4__/* .Table */ .X, editor.o);
|
|
42207
42267
|
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(cell, 'table', editor.editor);
|
|
42208
42268
|
let next = null;
|
|
@@ -42260,6 +42320,40 @@ function tableKeyboardNavigation(editor) {
|
|
|
42260
42320
|
});
|
|
42261
42321
|
}
|
|
42262
42322
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('tableKeyboardNavigation', tableKeyboardNavigation);
|
|
42323
|
+
function findCell(editor, key) {
|
|
42324
|
+
if (!WORK_KEYS.has(key)) {
|
|
42325
|
+
return;
|
|
42326
|
+
}
|
|
42327
|
+
const current = editor.s.current();
|
|
42328
|
+
if (!current) {
|
|
42329
|
+
return;
|
|
42330
|
+
}
|
|
42331
|
+
const cell = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.up(current, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isCell, editor.editor);
|
|
42332
|
+
if (!cell) {
|
|
42333
|
+
return;
|
|
42334
|
+
}
|
|
42335
|
+
const { range } = editor.s;
|
|
42336
|
+
if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
|
|
42337
|
+
const isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
|
|
42338
|
+
const hasNext = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(!isNextDirection ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.prev : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.next, current, elm => key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN
|
|
42339
|
+
? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
|
|
42340
|
+
: Boolean(elm), cell);
|
|
42341
|
+
if ((!isNextDirection &&
|
|
42342
|
+
(hasNext ||
|
|
42343
|
+
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
|
|
42344
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42345
|
+
range.startOffset !== 0))) ||
|
|
42346
|
+
(isNextDirection &&
|
|
42347
|
+
(hasNext ||
|
|
42348
|
+
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
|
|
42349
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42350
|
+
current.nodeValue &&
|
|
42351
|
+
range.startOffset !== current.nodeValue.length)))) {
|
|
42352
|
+
return;
|
|
42353
|
+
}
|
|
42354
|
+
}
|
|
42355
|
+
return cell;
|
|
42356
|
+
}
|
|
42263
42357
|
|
|
42264
42358
|
|
|
42265
42359
|
/***/ }),
|
|
@@ -44310,16 +44404,16 @@ var __webpack_exports__ = {};
|
|
|
44310
44404
|
__webpack_require__.r(__webpack_exports__);
|
|
44311
44405
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44312
44406
|
/* harmony export */ CommitMode: function() { return /* binding */ CommitMode; },
|
|
44313
|
-
/* harmony export */ Jodit: function() { return /* reexport safe */
|
|
44407
|
+
/* harmony export */ Jodit: function() { return /* reexport safe */ _jodit__WEBPACK_IMPORTED_MODULE_0__.x; }
|
|
44314
44408
|
/* harmony export */ });
|
|
44315
|
-
/* harmony import */ var
|
|
44316
|
-
/* harmony import */ var
|
|
44409
|
+
/* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46173);
|
|
44410
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
44317
44411
|
/* harmony import */ var _core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17352);
|
|
44318
44412
|
/* harmony import */ var _core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22664);
|
|
44319
44413
|
/* harmony import */ var _modules___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(37435);
|
|
44320
44414
|
/* harmony import */ var _styles_icons___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79721);
|
|
44321
|
-
/* harmony import */ var
|
|
44322
|
-
/* harmony import */ var
|
|
44415
|
+
/* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(74470);
|
|
44416
|
+
/* harmony import */ var jodit_plugins_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88222);
|
|
44323
44417
|
/*!
|
|
44324
44418
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44325
44419
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44330,6 +44424,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44330
44424
|
* @packageDocumentation
|
|
44331
44425
|
* @module jodit
|
|
44332
44426
|
*/
|
|
44427
|
+
// eslint-disable-next-line simple-import-sort/imports
|
|
44333
44428
|
|
|
44334
44429
|
|
|
44335
44430
|
|
|
@@ -44342,7 +44437,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44342
44437
|
|
|
44343
44438
|
// copy constants in Jodit
|
|
44344
44439
|
Object.keys(_core_constants__WEBPACK_IMPORTED_MODULE_2__).forEach((key) => {
|
|
44345
|
-
|
|
44440
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
44346
44441
|
});
|
|
44347
44442
|
const esFilter = (key) => key !== '__esModule';
|
|
44348
44443
|
// Icons
|
|
@@ -44358,32 +44453,32 @@ Object.keys(_modules___WEBPACK_IMPORTED_MODULE_4__)
|
|
|
44358
44453
|
var _a;
|
|
44359
44454
|
// @ts-ignore
|
|
44360
44455
|
const module = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
|
|
44361
|
-
const name = (0,
|
|
44456
|
+
const name = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className)
|
|
44362
44457
|
? module.prototype.className()
|
|
44363
44458
|
: key;
|
|
44364
|
-
if (!(0,
|
|
44459
|
+
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
|
|
44365
44460
|
console.warn('Module name must be a string', key);
|
|
44366
44461
|
return;
|
|
44367
44462
|
}
|
|
44368
44463
|
// @ts-ignore
|
|
44369
|
-
|
|
44464
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.modules[name] = module;
|
|
44370
44465
|
});
|
|
44371
44466
|
// Decorators
|
|
44372
44467
|
Object.keys(_core_decorators__WEBPACK_IMPORTED_MODULE_3__)
|
|
44373
44468
|
.filter(esFilter)
|
|
44374
44469
|
.forEach((key) => {
|
|
44375
44470
|
// @ts-ignore
|
|
44376
|
-
|
|
44471
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.decorators[key] = _core_decorators__WEBPACK_IMPORTED_MODULE_3__[key];
|
|
44377
44472
|
});
|
|
44378
44473
|
['Confirm', 'Alert', 'Prompt'].forEach((key) => {
|
|
44379
44474
|
// @ts-ignore
|
|
44380
|
-
|
|
44475
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
|
|
44381
44476
|
});
|
|
44382
44477
|
// Languages
|
|
44383
|
-
Object.keys(
|
|
44478
|
+
Object.keys(_languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)
|
|
44384
44479
|
.filter(esFilter)
|
|
44385
44480
|
.forEach((key) => {
|
|
44386
|
-
|
|
44481
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.lang[key] = _languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A[key];
|
|
44387
44482
|
});
|
|
44388
44483
|
|
|
44389
44484
|
class CommitMode {
|