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/es2015/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 = "es2015";
|
|
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
|
|
|
@@ -9855,10 +9860,14 @@ class Response {
|
|
|
9855
9860
|
|
|
9856
9861
|
"use strict";
|
|
9857
9862
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9858
|
-
/* harmony export */
|
|
9863
|
+
/* harmony export */ Qe: function() { return /* binding */ cursorInTheEdgeOfString; },
|
|
9864
|
+
/* harmony export */ W8: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__.W; },
|
|
9865
|
+
/* harmony export */ dY: function() { return /* binding */ findCorrectCurrentNode; }
|
|
9859
9866
|
/* harmony export */ });
|
|
9860
|
-
/* harmony import */ var
|
|
9861
|
-
/* harmony import */ var
|
|
9867
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
9868
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
9869
|
+
/* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5298);
|
|
9870
|
+
/* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83541);
|
|
9862
9871
|
/*!
|
|
9863
9872
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9864
9873
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -9871,6 +9880,55 @@ class Response {
|
|
|
9871
9880
|
|
|
9872
9881
|
|
|
9873
9882
|
|
|
9883
|
+
/**
|
|
9884
|
+
* Check if the cursor is at the edge of the string
|
|
9885
|
+
* @private
|
|
9886
|
+
*/
|
|
9887
|
+
function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
9888
|
+
var _a;
|
|
9889
|
+
const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
|
|
9890
|
+
if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
9891
|
+
return true;
|
|
9892
|
+
}
|
|
9893
|
+
const inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
|
|
9894
|
+
return start && ((inv && inv[0].length < offset) || (!inv && offset > 0));
|
|
9895
|
+
}
|
|
9896
|
+
function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild, child) {
|
|
9897
|
+
node = range.startContainer.childNodes[range.startOffset];
|
|
9898
|
+
if (!node) {
|
|
9899
|
+
node = range.startContainer.childNodes[range.startOffset - 1];
|
|
9900
|
+
rightMode = true;
|
|
9901
|
+
}
|
|
9902
|
+
if (node && isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
|
|
9903
|
+
// test Current method - Cursor in the left of some SPAN
|
|
9904
|
+
if (!rightMode && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node.previousSibling)) {
|
|
9905
|
+
node = node.previousSibling;
|
|
9906
|
+
}
|
|
9907
|
+
else if (checkChild) {
|
|
9908
|
+
let current = child(node);
|
|
9909
|
+
while (current) {
|
|
9910
|
+
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current)) {
|
|
9911
|
+
node = current;
|
|
9912
|
+
break;
|
|
9913
|
+
}
|
|
9914
|
+
current = child(current);
|
|
9915
|
+
}
|
|
9916
|
+
}
|
|
9917
|
+
}
|
|
9918
|
+
if (node && !isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
|
|
9919
|
+
let leftChild = node, rightChild = node;
|
|
9920
|
+
do {
|
|
9921
|
+
leftChild = leftChild.firstChild;
|
|
9922
|
+
rightChild = rightChild.lastChild;
|
|
9923
|
+
} while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild));
|
|
9924
|
+
if (leftChild === rightChild && leftChild && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild)) {
|
|
9925
|
+
node = leftChild;
|
|
9926
|
+
}
|
|
9927
|
+
}
|
|
9928
|
+
return { node, rightMode };
|
|
9929
|
+
}
|
|
9930
|
+
|
|
9931
|
+
|
|
9874
9932
|
/***/ }),
|
|
9875
9933
|
|
|
9876
9934
|
/***/ 5298:
|
|
@@ -9991,7 +10049,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
|
|
|
9991
10049
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9992
10050
|
/* harmony export */ L: function() { return /* binding */ Selection; }
|
|
9993
10051
|
/* harmony export */ });
|
|
9994
|
-
/* harmony import */ var
|
|
10052
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
|
|
9995
10053
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
9996
10054
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22664);
|
|
9997
10055
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
@@ -10001,6 +10059,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
|
|
|
10001
10059
|
/* 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__);
|
|
10002
10060
|
/* harmony import */ var jodit_core_selection_helpers_move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(83541);
|
|
10003
10061
|
/* harmony import */ var _style_commit_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8757);
|
|
10062
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46602);
|
|
10004
10063
|
/*!
|
|
10005
10064
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10006
10065
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10017,6 +10076,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
|
|
|
10017
10076
|
|
|
10018
10077
|
|
|
10019
10078
|
|
|
10079
|
+
|
|
10020
10080
|
class Selection {
|
|
10021
10081
|
constructor(jodit) {
|
|
10022
10082
|
this.jodit = jodit;
|
|
@@ -10402,63 +10462,35 @@ class Selection {
|
|
|
10402
10462
|
* Returns the current element under the cursor inside editor
|
|
10403
10463
|
*/
|
|
10404
10464
|
current(checkChild = true) {
|
|
10405
|
-
if (this.j.getRealMode()
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
}
|
|
10428
|
-
else if (checkChild) {
|
|
10429
|
-
let current = child(node);
|
|
10430
|
-
while (current) {
|
|
10431
|
-
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(current)) {
|
|
10432
|
-
node = current;
|
|
10433
|
-
break;
|
|
10434
|
-
}
|
|
10435
|
-
current = child(current);
|
|
10436
|
-
}
|
|
10437
|
-
}
|
|
10438
|
-
}
|
|
10439
|
-
if (node && !sel.isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
|
|
10440
|
-
let leftChild = node, rightChild = node;
|
|
10441
|
-
do {
|
|
10442
|
-
leftChild = leftChild.firstChild;
|
|
10443
|
-
rightChild = rightChild.lastChild;
|
|
10444
|
-
} while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild));
|
|
10445
|
-
if (leftChild === rightChild &&
|
|
10446
|
-
leftChild &&
|
|
10447
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild)) {
|
|
10448
|
-
node = leftChild;
|
|
10449
|
-
}
|
|
10450
|
-
}
|
|
10451
|
-
}
|
|
10452
|
-
// check - cursor inside editor
|
|
10453
|
-
if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
|
|
10454
|
-
return node;
|
|
10455
|
-
}
|
|
10465
|
+
if (this.j.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
|
|
10466
|
+
return null;
|
|
10467
|
+
}
|
|
10468
|
+
const sel = this.sel;
|
|
10469
|
+
if (!sel || sel.rangeCount === 0) {
|
|
10470
|
+
return null;
|
|
10471
|
+
}
|
|
10472
|
+
const range = sel.getRangeAt(0);
|
|
10473
|
+
let node = range.startContainer;
|
|
10474
|
+
let rightMode = false;
|
|
10475
|
+
const child = (nd) => rightMode ? nd.lastChild : nd.firstChild;
|
|
10476
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(node, 'br') && sel.isCollapsed) {
|
|
10477
|
+
return node;
|
|
10478
|
+
}
|
|
10479
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
|
|
10480
|
+
const ret = (0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .findCorrectCurrentNode */ .dY)(node, range, rightMode, sel.isCollapsed, checkChild, child);
|
|
10481
|
+
node = ret.node;
|
|
10482
|
+
rightMode = ret.rightMode;
|
|
10483
|
+
}
|
|
10484
|
+
// check - cursor inside editor
|
|
10485
|
+
if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
|
|
10486
|
+
return node;
|
|
10456
10487
|
}
|
|
10457
10488
|
return null;
|
|
10458
10489
|
}
|
|
10459
10490
|
/**
|
|
10460
10491
|
* Insert element in editor
|
|
10461
10492
|
*
|
|
10493
|
+
* @param node - Node for insert
|
|
10462
10494
|
* @param insertCursorAfter - After insert, cursor will move after element
|
|
10463
10495
|
* @param fireChange - After insert, editor fire change event. You can prevent this behavior
|
|
10464
10496
|
*/
|
|
@@ -10520,6 +10552,7 @@ class Selection {
|
|
|
10520
10552
|
* Inserts in the current cursor position some HTML snippet
|
|
10521
10553
|
*
|
|
10522
10554
|
* @param html - HTML The text to be inserted into the document
|
|
10555
|
+
* @param insertCursorAfter - After insert, cursor will move after element
|
|
10523
10556
|
* @example
|
|
10524
10557
|
* ```javascript
|
|
10525
10558
|
* parent.s.insertHTML('<img src="image.png"/>');
|
|
@@ -10563,6 +10596,7 @@ class Selection {
|
|
|
10563
10596
|
*
|
|
10564
10597
|
* @param url - URL for image, or HTMLImageElement
|
|
10565
10598
|
* @param styles - If specified, it will be applied <code>$(image).css(styles)</code>
|
|
10599
|
+
* @param defaultWidth - If specified, it will be applied <code>css('width', defaultWidth)</code>
|
|
10566
10600
|
*/
|
|
10567
10601
|
insertImage(url, styles = null, defaultWidth = null) {
|
|
10568
10602
|
const image = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .Kg)(url) ? this.j.createInside.element('img') : url;
|
|
@@ -10618,74 +10652,81 @@ class Selection {
|
|
|
10618
10652
|
eachSelection(callback) {
|
|
10619
10653
|
var _a;
|
|
10620
10654
|
const sel = this.sel;
|
|
10621
|
-
if (sel
|
|
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
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10655
|
+
if (!sel || !sel.rangeCount) {
|
|
10656
|
+
return;
|
|
10657
|
+
}
|
|
10658
|
+
const range = sel.getRangeAt(0);
|
|
10659
|
+
let root = range.commonAncestorContainer;
|
|
10660
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(root)) {
|
|
10661
|
+
root = root.parentElement;
|
|
10662
|
+
}
|
|
10663
|
+
const nodes = [];
|
|
10664
|
+
const startOffset = range.startOffset;
|
|
10665
|
+
const length = root.childNodes.length;
|
|
10666
|
+
const elementOffset = startOffset < length ? startOffset : length - 1;
|
|
10667
|
+
let start = range.startContainer === this.area
|
|
10668
|
+
? root.childNodes[elementOffset]
|
|
10669
|
+
: range.startContainer;
|
|
10670
|
+
let end = range.endContainer === this.area
|
|
10671
|
+
? root.childNodes[range.endOffset - 1]
|
|
10672
|
+
: range.endContainer;
|
|
10673
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) &&
|
|
10674
|
+
start === range.startContainer &&
|
|
10675
|
+
range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
10676
|
+
start.nextSibling) {
|
|
10677
|
+
start = start.nextSibling;
|
|
10678
|
+
}
|
|
10679
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) &&
|
|
10680
|
+
end === range.endContainer &&
|
|
10681
|
+
range.endOffset === 0 &&
|
|
10682
|
+
end.previousSibling) {
|
|
10683
|
+
end = end.previousSibling;
|
|
10684
|
+
}
|
|
10685
|
+
const checkElm = (node) => {
|
|
10686
|
+
if (node &&
|
|
10687
|
+
node !== root &&
|
|
10688
|
+
!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node) &&
|
|
10689
|
+
!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isMarker */ .rg)(node)) {
|
|
10690
|
+
nodes.push(node);
|
|
10691
|
+
}
|
|
10692
|
+
};
|
|
10693
|
+
checkElm(start);
|
|
10694
|
+
if (start !== end && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(root, start, true)) {
|
|
10695
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.find(start, node => {
|
|
10696
|
+
checkElm(node);
|
|
10697
|
+
// checks parentElement as well because partial selections are not equal to entire element
|
|
10698
|
+
return (node === end ||
|
|
10699
|
+
(node && node.contains && node.contains(end)));
|
|
10700
|
+
}, root, true, false);
|
|
10701
|
+
}
|
|
10702
|
+
const forEvery = (current) => {
|
|
10703
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.j.editor, current, true)) {
|
|
10704
|
+
return;
|
|
10705
|
+
}
|
|
10706
|
+
if (current.nodeName.match(/^(UL|OL)$/)) {
|
|
10707
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.toArray)(current.childNodes).forEach(forEvery);
|
|
10708
|
+
}
|
|
10709
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(current, 'li')) {
|
|
10710
|
+
if (current.firstChild) {
|
|
10711
|
+
current = current.firstChild;
|
|
10668
10712
|
}
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
else {
|
|
10674
|
-
const currentB = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
|
|
10675
|
-
current.appendChild(currentB);
|
|
10676
|
-
current = currentB;
|
|
10677
|
-
}
|
|
10713
|
+
else {
|
|
10714
|
+
const currentB = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
|
|
10715
|
+
current.appendChild(currentB);
|
|
10716
|
+
current = currentB;
|
|
10678
10717
|
}
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10718
|
+
}
|
|
10719
|
+
callback(current);
|
|
10720
|
+
};
|
|
10721
|
+
if (nodes.length === 0) {
|
|
10722
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(start)) {
|
|
10682
10723
|
nodes.push(start);
|
|
10683
10724
|
}
|
|
10684
|
-
if (
|
|
10725
|
+
if (start.firstChild) {
|
|
10685
10726
|
nodes.push(start.firstChild);
|
|
10686
10727
|
}
|
|
10687
|
-
nodes.forEach(forEvery);
|
|
10688
10728
|
}
|
|
10729
|
+
nodes.forEach(forEvery);
|
|
10689
10730
|
}
|
|
10690
10731
|
/**
|
|
10691
10732
|
* Checks if the cursor is at the end(start) block
|
|
@@ -10697,7 +10738,7 @@ class Selection {
|
|
|
10697
10738
|
* @returns true - the cursor is at the end(start) block, null - cursor somewhere outside
|
|
10698
10739
|
*/
|
|
10699
10740
|
cursorInTheEdge(start, parentBlock, fake = null) {
|
|
10700
|
-
var _a
|
|
10741
|
+
var _a;
|
|
10701
10742
|
const end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
|
|
10702
10743
|
fake !== null && fake !== void 0 ? fake : (fake = this.current(false));
|
|
10703
10744
|
if (!range || !fake || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(parentBlock, fake, true)) {
|
|
@@ -10713,13 +10754,7 @@ class Selection {
|
|
|
10713
10754
|
this.j.e.fire('isInvisibleForCursor', elm) === true));
|
|
10714
10755
|
// check right offset
|
|
10715
10756
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(container)) {
|
|
10716
|
-
|
|
10717
|
-
if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
10718
|
-
return false;
|
|
10719
|
-
}
|
|
10720
|
-
const inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
|
|
10721
|
-
if (start &&
|
|
10722
|
-
((inv && inv[0].length < offset) || (!inv && offset > 0))) {
|
|
10757
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .cursorInTheEdgeOfString */ .Qe)(container, offset, start, end)) {
|
|
10723
10758
|
return false;
|
|
10724
10759
|
}
|
|
10725
10760
|
}
|
|
@@ -10808,6 +10843,7 @@ class Selection {
|
|
|
10808
10843
|
}
|
|
10809
10844
|
/**
|
|
10810
10845
|
* Set cursor in the node
|
|
10846
|
+
* @param node - Node element
|
|
10811
10847
|
* @param inStart - set cursor in start of element
|
|
10812
10848
|
*/
|
|
10813
10849
|
setCursorIn(node, inStart = false) {
|
|
@@ -10868,6 +10904,7 @@ class Selection {
|
|
|
10868
10904
|
}
|
|
10869
10905
|
/**
|
|
10870
10906
|
* Select node
|
|
10907
|
+
* @param node - Node element
|
|
10871
10908
|
* @param inward - select all inside
|
|
10872
10909
|
*/
|
|
10873
10910
|
select(node, inward = false) {
|
|
@@ -11142,19 +11179,19 @@ class Selection {
|
|
|
11142
11179
|
return this;
|
|
11143
11180
|
}
|
|
11144
11181
|
}
|
|
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, "createRange", null);
|
|
11148
|
-
(0,
|
|
11185
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11149
11186
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11150
11187
|
], Selection.prototype, "focus", null);
|
|
11151
|
-
(0,
|
|
11188
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11152
11189
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11153
11190
|
], Selection.prototype, "setCursorAfter", null);
|
|
11154
|
-
(0,
|
|
11191
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11155
11192
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11156
11193
|
], Selection.prototype, "setCursorBefore", null);
|
|
11157
|
-
(0,
|
|
11194
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
11158
11195
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
11159
11196
|
], Selection.prototype, "setCursorIn", null);
|
|
11160
11197
|
|
|
@@ -22289,6 +22326,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22289
22326
|
}
|
|
22290
22327
|
/**
|
|
22291
22328
|
* Generate formal table martix columns*rows
|
|
22329
|
+
* @param table - Working table
|
|
22292
22330
|
* @param callback - if return false cycle break
|
|
22293
22331
|
*/
|
|
22294
22332
|
formalMatrix(table, callback) {
|
|
@@ -22358,7 +22396,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22358
22396
|
* @param line - Insert a new line after/before this
|
|
22359
22397
|
* line contains the selected cell
|
|
22360
22398
|
* @param after - Insert a new line after line contains the selected cell
|
|
22361
|
-
* @param create - Instance of Create class
|
|
22362
22399
|
*/
|
|
22363
22400
|
appendRow(table, line, after) {
|
|
22364
22401
|
return Table.__appendRow(table, line, after, this.j.createInside);
|
|
@@ -22527,13 +22564,36 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22527
22564
|
return Table.__getSelectedBound(table, selectedCells);
|
|
22528
22565
|
}
|
|
22529
22566
|
static __normalizeTable(table) {
|
|
22530
|
-
let i, j, min, not;
|
|
22531
22567
|
const __marked = [], box = Table.__formalMatrix(table);
|
|
22532
|
-
|
|
22533
|
-
|
|
22534
|
-
|
|
22535
|
-
|
|
22536
|
-
for (
|
|
22568
|
+
Table.__removeExtraColspans(box, __marked);
|
|
22569
|
+
Table.__removeExtraRowspans(box, __marked);
|
|
22570
|
+
// remove rowspans and colspans equal 1 and empty class
|
|
22571
|
+
for (let i = 0; i < box.length; i += 1) {
|
|
22572
|
+
for (let j = 0; j < box[i].length; j += 1) {
|
|
22573
|
+
if (box[i][j] === undefined) {
|
|
22574
|
+
continue; // broken table
|
|
22575
|
+
}
|
|
22576
|
+
if (box[i][j].hasAttribute('rowspan') &&
|
|
22577
|
+
box[i][j].rowSpan === 1) {
|
|
22578
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
|
|
22579
|
+
}
|
|
22580
|
+
if (box[i][j].hasAttribute('colspan') &&
|
|
22581
|
+
box[i][j].colSpan === 1) {
|
|
22582
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
|
|
22583
|
+
}
|
|
22584
|
+
if (box[i][j].hasAttribute('class') &&
|
|
22585
|
+
!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
|
|
22586
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
|
|
22587
|
+
}
|
|
22588
|
+
}
|
|
22589
|
+
}
|
|
22590
|
+
Table.__unmark(__marked);
|
|
22591
|
+
}
|
|
22592
|
+
static __removeExtraColspans(box, __marked) {
|
|
22593
|
+
for (let j = 0; j < box[0].length; j += 1) {
|
|
22594
|
+
let min = 1000000;
|
|
22595
|
+
let not = false;
|
|
22596
|
+
for (let i = 0; i < box.length; i += 1) {
|
|
22537
22597
|
if (box[i][j] === undefined) {
|
|
22538
22598
|
continue; // broken table
|
|
22539
22599
|
}
|
|
@@ -22544,7 +22604,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22544
22604
|
min = Math.min(min, box[i][j].colSpan);
|
|
22545
22605
|
}
|
|
22546
22606
|
if (!not) {
|
|
22547
|
-
for (i = 0; i < box.length; i += 1) {
|
|
22607
|
+
for (let i = 0; i < box.length; i += 1) {
|
|
22548
22608
|
if (box[i][j] === undefined) {
|
|
22549
22609
|
continue; // broken table
|
|
22550
22610
|
}
|
|
@@ -22552,10 +22612,13 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22552
22612
|
}
|
|
22553
22613
|
}
|
|
22554
22614
|
}
|
|
22555
|
-
|
|
22615
|
+
}
|
|
22616
|
+
static __removeExtraRowspans(box, marked) {
|
|
22617
|
+
let i = 0;
|
|
22618
|
+
let j = 0;
|
|
22556
22619
|
for (i = 0; i < box.length; i += 1) {
|
|
22557
|
-
min = 1000000;
|
|
22558
|
-
not = false;
|
|
22620
|
+
let min = 1000000;
|
|
22621
|
+
let not = false;
|
|
22559
22622
|
for (j = 0; j < box[i].length; j += 1) {
|
|
22560
22623
|
if (box[i][j] === undefined) {
|
|
22561
22624
|
continue; // broken table
|
|
@@ -22571,31 +22634,10 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22571
22634
|
if (box[i][j] === undefined) {
|
|
22572
22635
|
continue; // broken table
|
|
22573
22636
|
}
|
|
22574
|
-
Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1,
|
|
22637
|
+
Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1, marked);
|
|
22575
22638
|
}
|
|
22576
22639
|
}
|
|
22577
22640
|
}
|
|
22578
|
-
// remove rowspans and colspans equal 1 and empty class
|
|
22579
|
-
for (i = 0; i < box.length; i += 1) {
|
|
22580
|
-
for (j = 0; j < box[i].length; j += 1) {
|
|
22581
|
-
if (box[i][j] === undefined) {
|
|
22582
|
-
continue; // broken table
|
|
22583
|
-
}
|
|
22584
|
-
if (box[i][j].hasAttribute('rowspan') &&
|
|
22585
|
-
box[i][j].rowSpan === 1) {
|
|
22586
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
|
|
22587
|
-
}
|
|
22588
|
-
if (box[i][j].hasAttribute('colspan') &&
|
|
22589
|
-
box[i][j].colSpan === 1) {
|
|
22590
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
|
|
22591
|
-
}
|
|
22592
|
-
if (box[i][j].hasAttribute('class') &&
|
|
22593
|
-
!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
|
|
22594
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
|
|
22595
|
-
}
|
|
22596
|
-
}
|
|
22597
|
-
}
|
|
22598
|
-
Table.__unmark(__marked);
|
|
22599
22641
|
}
|
|
22600
22642
|
/**
|
|
22601
22643
|
* Try recalculate all coluns and rows after change
|
|
@@ -24012,34 +24054,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
|
|
|
24012
24054
|
}
|
|
24013
24055
|
const promises = [];
|
|
24014
24056
|
if (o.insertImageAsBase64URI) {
|
|
24015
|
-
|
|
24016
|
-
for (i = 0; i < fileList.length; i += 1) {
|
|
24017
|
-
file = fileList[i];
|
|
24018
|
-
if (file && file.type) {
|
|
24019
|
-
const mime = file.type.match(/\/([a-z0-9]+)/i);
|
|
24020
|
-
const extension = mime[1] ? mime[1].toLowerCase() : '';
|
|
24021
|
-
if (o.imagesExtensions.includes(extension)) {
|
|
24022
|
-
const reader = new FileReader();
|
|
24023
|
-
promises.push(uploader.j.async.promise((resolve, reject) => {
|
|
24024
|
-
reader.onerror = reject;
|
|
24025
|
-
reader.onloadend = () => {
|
|
24026
|
-
const resp = {
|
|
24027
|
-
baseurl: '',
|
|
24028
|
-
files: [reader.result],
|
|
24029
|
-
isImages: [true]
|
|
24030
|
-
};
|
|
24031
|
-
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
|
|
24032
|
-
? handlerSuccess
|
|
24033
|
-
: o.defaultHandlerSuccess;
|
|
24034
|
-
handler.call(uploader, resp);
|
|
24035
|
-
resolve(resp);
|
|
24036
|
-
};
|
|
24037
|
-
reader.readAsDataURL(file);
|
|
24038
|
-
}));
|
|
24039
|
-
fileList[i] = null;
|
|
24040
|
-
}
|
|
24041
|
-
}
|
|
24042
|
-
}
|
|
24057
|
+
readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
|
|
24043
24058
|
}
|
|
24044
24059
|
fileList = fileList.filter(a => a);
|
|
24045
24060
|
if (fileList.length) {
|
|
@@ -24050,7 +24065,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
|
|
|
24050
24065
|
for (let i = 0; i < fileList.length; i += 1) {
|
|
24051
24066
|
file = fileList[i];
|
|
24052
24067
|
if (file) {
|
|
24053
|
-
const hasRealExtension =
|
|
24068
|
+
const hasRealExtension = /\.\w+$/.test(file.name);
|
|
24054
24069
|
const mime = file.type.match(/\/([a-z0-9]+)/i);
|
|
24055
24070
|
const extension = mime && mime[1] ? mime[1].toLowerCase() : '';
|
|
24056
24071
|
let newName = fileList[i].name ||
|
|
@@ -24099,6 +24114,37 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
|
|
|
24099
24114
|
}
|
|
24100
24115
|
return Promise.all(promises);
|
|
24101
24116
|
}
|
|
24117
|
+
function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
|
|
24118
|
+
let file, i;
|
|
24119
|
+
for (i = 0; i < fileList.length; i += 1) {
|
|
24120
|
+
file = fileList[i];
|
|
24121
|
+
if (file && file.type) {
|
|
24122
|
+
const mime = file.type.match(/\/([a-z0-9]+)/i);
|
|
24123
|
+
const extension = mime[1] ? mime[1].toLowerCase() : '';
|
|
24124
|
+
if (!imagesExtensions.includes(extension)) {
|
|
24125
|
+
continue;
|
|
24126
|
+
}
|
|
24127
|
+
const reader = new FileReader();
|
|
24128
|
+
promises.push(uploader.j.async.promise((resolve, reject) => {
|
|
24129
|
+
reader.onerror = reject;
|
|
24130
|
+
reader.onloadend = () => {
|
|
24131
|
+
const resp = {
|
|
24132
|
+
baseurl: '',
|
|
24133
|
+
files: [reader.result],
|
|
24134
|
+
isImages: [true]
|
|
24135
|
+
};
|
|
24136
|
+
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
|
|
24137
|
+
? handlerSuccess
|
|
24138
|
+
: defaultHandlerSuccess;
|
|
24139
|
+
handler.call(uploader, resp);
|
|
24140
|
+
resolve(resp);
|
|
24141
|
+
};
|
|
24142
|
+
reader.readAsDataURL(file);
|
|
24143
|
+
}));
|
|
24144
|
+
fileList[i] = null;
|
|
24145
|
+
}
|
|
24146
|
+
}
|
|
24147
|
+
}
|
|
24102
24148
|
|
|
24103
24149
|
|
|
24104
24150
|
/***/ }),
|
|
@@ -25718,7 +25764,7 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin
|
|
|
25718
25764
|
if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
|
|
25719
25765
|
return false;
|
|
25720
25766
|
}
|
|
25721
|
-
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .
|
|
25767
|
+
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
|
|
25722
25768
|
if (_cases__WEBPACK_IMPORTED_MODULE_6__/* .cases */ .C.some((func) => {
|
|
25723
25769
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__/* .isFunction */ .T)(func) &&
|
|
25724
25770
|
func(jodit, fakeNode, backspace, mode)) {
|
|
@@ -25977,22 +26023,15 @@ function checkNotCollapsed(jodit) {
|
|
|
25977
26023
|
* @private
|
|
25978
26024
|
*/
|
|
25979
26025
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
25980
|
-
var _a, _b
|
|
26026
|
+
var _a, _b;
|
|
25981
26027
|
const step = backspace ? -1 : 1;
|
|
25982
26028
|
const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
25983
|
-
let sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace)
|
|
25984
|
-
let
|
|
25985
|
-
|
|
25986
|
-
|
|
25987
|
-
if (!nextSibling &&
|
|
25988
|
-
sibling.parentNode &&
|
|
25989
|
-
sibling.parentNode !== jodit.editor) {
|
|
25990
|
-
nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, jodit.editor, true);
|
|
25991
|
-
}
|
|
25992
|
-
return nextSibling;
|
|
25993
|
-
};
|
|
26029
|
+
let sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
|
|
26030
|
+
let removeNeighbor = null;
|
|
26031
|
+
let charRemoved = false;
|
|
26032
|
+
let removed;
|
|
25994
26033
|
if (!sibling) {
|
|
25995
|
-
sibling = getNextInlineSibling(fakeNode);
|
|
26034
|
+
sibling = getNextInlineSibling(fakeNode, backspace, jodit.editor);
|
|
25996
26035
|
}
|
|
25997
26036
|
while (sibling && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(sibling) || jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling))) {
|
|
25998
26037
|
while (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)) {
|
|
@@ -26002,57 +26041,17 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
26002
26041
|
break;
|
|
26003
26042
|
}
|
|
26004
26043
|
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
26005
|
-
|
|
26006
|
-
let value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
|
|
26007
|
-
const length = value.length;
|
|
26008
|
-
let index = backspace ? length - 1 : 0;
|
|
26009
|
-
if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26010
|
-
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26011
|
-
index += step;
|
|
26012
|
-
}
|
|
26013
|
-
}
|
|
26014
|
-
removed = value[index];
|
|
26015
|
-
if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26016
|
-
index += step;
|
|
26017
|
-
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26018
|
-
index += step;
|
|
26019
|
-
}
|
|
26020
|
-
index += backspace ? 1 : -1;
|
|
26021
|
-
}
|
|
26022
|
-
if (backspace && index < 0) {
|
|
26023
|
-
value = [];
|
|
26024
|
-
}
|
|
26025
|
-
else {
|
|
26026
|
-
value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
|
|
26027
|
-
}
|
|
26028
|
-
if (!anotherSibling ||
|
|
26029
|
-
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
|
|
26030
|
-
(!backspace ? / $/ : /^ /).test((_b = anotherSibling.nodeValue) !== null && _b !== void 0 ? _b : '') ||
|
|
26031
|
-
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
|
|
26032
|
-
for (let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
|
|
26033
|
-
if (value[i] === ' ') {
|
|
26034
|
-
value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
26035
|
-
}
|
|
26036
|
-
else {
|
|
26037
|
-
break;
|
|
26038
|
-
}
|
|
26039
|
-
}
|
|
26040
|
-
}
|
|
26041
|
-
sibling.nodeValue = value.join('');
|
|
26044
|
+
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
26042
26045
|
}
|
|
26043
|
-
if (!((
|
|
26046
|
+
if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
26044
26047
|
removeNeighbor = sibling;
|
|
26045
26048
|
}
|
|
26046
26049
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26050
|
+
checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit);
|
|
26047
26051
|
charRemoved = true;
|
|
26048
|
-
(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);
|
|
26049
|
-
if (mode === 'sentence' ||
|
|
26050
|
-
(mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
|
|
26051
|
-
checkRemoveChar(jodit, fakeNode, backspace, mode);
|
|
26052
|
-
}
|
|
26053
26052
|
break;
|
|
26054
26053
|
}
|
|
26055
|
-
const nextSibling = getNextInlineSibling(sibling);
|
|
26054
|
+
const nextSibling = getNextInlineSibling(sibling, backspace, jodit.editor);
|
|
26056
26055
|
if (removeNeighbor) {
|
|
26057
26056
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(removeNeighbor);
|
|
26058
26057
|
removeNeighbor = null;
|
|
@@ -26074,6 +26073,13 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
26074
26073
|
}
|
|
26075
26074
|
return charRemoved;
|
|
26076
26075
|
}
|
|
26076
|
+
function getNextInlineSibling(sibling, backspace, root) {
|
|
26077
|
+
let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(sibling, backspace);
|
|
26078
|
+
if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
|
|
26079
|
+
nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, root, true);
|
|
26080
|
+
}
|
|
26081
|
+
return nextSibling;
|
|
26082
|
+
}
|
|
26077
26083
|
/**
|
|
26078
26084
|
* Helper removes all empty inline parents
|
|
26079
26085
|
*/
|
|
@@ -26098,6 +26104,57 @@ function addBRInsideEmptyBlock(jodit, node) {
|
|
|
26098
26104
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(node, jodit.createInside.element('br'));
|
|
26099
26105
|
}
|
|
26100
26106
|
}
|
|
26107
|
+
function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
26108
|
+
// For Unicode escapes
|
|
26109
|
+
let value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
|
|
26110
|
+
const length = value.length;
|
|
26111
|
+
let index = backspace ? length - 1 : 0;
|
|
26112
|
+
if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26113
|
+
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26114
|
+
index += step;
|
|
26115
|
+
}
|
|
26116
|
+
}
|
|
26117
|
+
const removed = value[index];
|
|
26118
|
+
if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26119
|
+
index += step;
|
|
26120
|
+
while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
26121
|
+
index += step;
|
|
26122
|
+
}
|
|
26123
|
+
index += backspace ? 1 : -1;
|
|
26124
|
+
}
|
|
26125
|
+
if (backspace && index < 0) {
|
|
26126
|
+
value = [];
|
|
26127
|
+
}
|
|
26128
|
+
else {
|
|
26129
|
+
value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
|
|
26130
|
+
}
|
|
26131
|
+
replaceSpaceOnNBSP(anotherSibling, backspace, value);
|
|
26132
|
+
sibling.nodeValue = value.join('');
|
|
26133
|
+
return removed;
|
|
26134
|
+
}
|
|
26135
|
+
function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
26136
|
+
var _a;
|
|
26137
|
+
if (!anotherSibling ||
|
|
26138
|
+
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
|
|
26139
|
+
(!backspace ? / $/ : /^ /).test((_a = anotherSibling.nodeValue) !== null && _a !== void 0 ? _a : '') ||
|
|
26140
|
+
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
|
|
26141
|
+
for (let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
|
|
26142
|
+
if (value[i] === ' ') {
|
|
26143
|
+
value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
26144
|
+
}
|
|
26145
|
+
else {
|
|
26146
|
+
break;
|
|
26147
|
+
}
|
|
26148
|
+
}
|
|
26149
|
+
}
|
|
26150
|
+
}
|
|
26151
|
+
function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
|
|
26152
|
+
(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);
|
|
26153
|
+
if (mode === 'sentence' ||
|
|
26154
|
+
(mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
|
|
26155
|
+
checkRemoveChar(jodit, fakeNode, backspace, mode);
|
|
26156
|
+
}
|
|
26157
|
+
}
|
|
26101
26158
|
|
|
26102
26159
|
|
|
26103
26160
|
/***/ }),
|
|
@@ -26135,7 +26192,7 @@ function checkRemoveContentNotEditable(jodit, fakeNode, backspace) {
|
|
|
26135
26192
|
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isContentEditable(neighbor, jodit.editor)) {
|
|
26136
26193
|
(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);
|
|
26137
26194
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(neighbor);
|
|
26138
|
-
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .
|
|
26195
|
+
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
|
|
26139
26196
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
|
|
26140
26197
|
return true;
|
|
26141
26198
|
}
|
|
@@ -28995,45 +29052,11 @@ class dragAndDrop extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
|
|
|
28995
29052
|
const sel = this.j.s.sel;
|
|
28996
29053
|
const range = this.bufferRange ||
|
|
28997
29054
|
(sel && sel.rangeCount ? sel.getRangeAt(0) : null);
|
|
28998
|
-
|
|
28999
|
-
if (!this.draggable && range) {
|
|
29000
|
-
fragment = this.isCopyMode
|
|
29001
|
-
? range.cloneContents()
|
|
29002
|
-
: range.extractContents();
|
|
29003
|
-
}
|
|
29004
|
-
else if (this.draggable) {
|
|
29005
|
-
if (this.isCopyMode) {
|
|
29006
|
-
const [tagName, field] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
|
|
29007
|
-
? ['a', 'href']
|
|
29008
|
-
: ['img', 'src'];
|
|
29009
|
-
fragment = this.j.createInside.element(tagName);
|
|
29010
|
-
fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
|
|
29011
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
|
|
29012
|
-
'');
|
|
29013
|
-
if (tagName === 'a') {
|
|
29014
|
-
fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
|
|
29015
|
-
}
|
|
29016
|
-
}
|
|
29017
|
-
else {
|
|
29018
|
-
fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
|
|
29019
|
-
}
|
|
29020
|
-
}
|
|
29021
|
-
else if (this.getText(event)) {
|
|
29022
|
-
fragment = this.j.createInside.fromHTML(this.getText(event));
|
|
29023
|
-
}
|
|
29055
|
+
const fragment = this.__getWorkFragment(range, event);
|
|
29024
29056
|
sel && sel.removeAllRanges();
|
|
29025
29057
|
this.j.s.insertCursorAtPoint(event.clientX, event.clientY);
|
|
29026
29058
|
if (fragment) {
|
|
29027
|
-
this.
|
|
29028
|
-
if (range && fragment.firstChild && fragment.lastChild) {
|
|
29029
|
-
range.setStartBefore(fragment.firstChild);
|
|
29030
|
-
range.setEndAfter(fragment.lastChild);
|
|
29031
|
-
this.j.s.selectRange(range);
|
|
29032
|
-
this.j.e.fire('synchro');
|
|
29033
|
-
}
|
|
29034
|
-
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
|
|
29035
|
-
this.j.e.fire('afterInsertImage', fragment);
|
|
29036
|
-
}
|
|
29059
|
+
this.__insertFragment.call(this, fragment, range);
|
|
29037
29060
|
}
|
|
29038
29061
|
event.preventDefault();
|
|
29039
29062
|
event.stopPropagation();
|
|
@@ -29041,6 +29064,47 @@ class dragAndDrop extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
|
|
|
29041
29064
|
this.isFragmentFromEditor = false;
|
|
29042
29065
|
this.removeDragListeners();
|
|
29043
29066
|
}
|
|
29067
|
+
__getWorkFragment(range, event) {
|
|
29068
|
+
let fragment = null;
|
|
29069
|
+
if (!this.draggable && range) {
|
|
29070
|
+
fragment = this.isCopyMode
|
|
29071
|
+
? range.cloneContents()
|
|
29072
|
+
: range.extractContents();
|
|
29073
|
+
}
|
|
29074
|
+
else if (this.draggable) {
|
|
29075
|
+
if (this.isCopyMode) {
|
|
29076
|
+
const [tagName, field] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
|
|
29077
|
+
? ['a', 'href']
|
|
29078
|
+
: ['img', 'src'];
|
|
29079
|
+
fragment = this.j.createInside.element(tagName);
|
|
29080
|
+
fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
|
|
29081
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
|
|
29082
|
+
'');
|
|
29083
|
+
if (tagName === 'a') {
|
|
29084
|
+
fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
|
|
29085
|
+
}
|
|
29086
|
+
}
|
|
29087
|
+
else {
|
|
29088
|
+
fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
|
|
29089
|
+
}
|
|
29090
|
+
}
|
|
29091
|
+
else if (this.getText(event)) {
|
|
29092
|
+
fragment = this.j.createInside.fromHTML(this.getText(event));
|
|
29093
|
+
}
|
|
29094
|
+
return fragment;
|
|
29095
|
+
}
|
|
29096
|
+
__insertFragment(fragment, range) {
|
|
29097
|
+
this.j.s.insertNode(fragment, false, false);
|
|
29098
|
+
if (range && fragment.firstChild && fragment.lastChild) {
|
|
29099
|
+
range.setStartBefore(fragment.firstChild);
|
|
29100
|
+
range.setEndAfter(fragment.lastChild);
|
|
29101
|
+
this.j.s.selectRange(range);
|
|
29102
|
+
this.j.e.fire('synchro');
|
|
29103
|
+
}
|
|
29104
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
|
|
29105
|
+
this.j.e.fire('afterInsertImage', fragment);
|
|
29106
|
+
}
|
|
29107
|
+
}
|
|
29044
29108
|
/** @override */
|
|
29045
29109
|
beforeDestruct() {
|
|
29046
29110
|
this.onDragEnd();
|
|
@@ -33183,6 +33247,9 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33183
33247
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33184
33248
|
return;
|
|
33185
33249
|
}
|
|
33250
|
+
if (!control.args) {
|
|
33251
|
+
return false;
|
|
33252
|
+
}
|
|
33186
33253
|
const command = cmd(control);
|
|
33187
33254
|
editor.execCommand(command, false, table);
|
|
33188
33255
|
},
|
|
@@ -33198,6 +33265,9 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33198
33265
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33199
33266
|
return;
|
|
33200
33267
|
}
|
|
33268
|
+
if (!control.args) {
|
|
33269
|
+
return false;
|
|
33270
|
+
}
|
|
33201
33271
|
const command = cmd(control);
|
|
33202
33272
|
editor.execCommand(command, false, table);
|
|
33203
33273
|
},
|
|
@@ -33216,6 +33286,9 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33216
33286
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33217
33287
|
return;
|
|
33218
33288
|
}
|
|
33289
|
+
if (!control.args) {
|
|
33290
|
+
return false;
|
|
33291
|
+
}
|
|
33219
33292
|
const command = cmd(control);
|
|
33220
33293
|
editor.execCommand(command, false, table);
|
|
33221
33294
|
editor.e.fire('hidePopup');
|
|
@@ -34764,35 +34837,7 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34764
34837
|
if (link) {
|
|
34765
34838
|
url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href') || '';
|
|
34766
34839
|
if (modeClassName) {
|
|
34767
|
-
|
|
34768
|
-
case 'input':
|
|
34769
|
-
if (className_input) {
|
|
34770
|
-
className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
34771
|
-
}
|
|
34772
|
-
break;
|
|
34773
|
-
case 'select':
|
|
34774
|
-
if (className_select) {
|
|
34775
|
-
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
34776
|
-
const option = className_select.options.item(i);
|
|
34777
|
-
if (option) {
|
|
34778
|
-
option.selected = false;
|
|
34779
|
-
}
|
|
34780
|
-
}
|
|
34781
|
-
const classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
34782
|
-
classNames.split(' ').forEach(className => {
|
|
34783
|
-
if (className) {
|
|
34784
|
-
for (let i = 0; i < className_select.options.length; i++) {
|
|
34785
|
-
const option = className_select.options.item(i);
|
|
34786
|
-
if ((option === null || option === void 0 ? void 0 : option.value) &&
|
|
34787
|
-
option.value === className) {
|
|
34788
|
-
option.selected = true;
|
|
34789
|
-
}
|
|
34790
|
-
}
|
|
34791
|
-
}
|
|
34792
|
-
});
|
|
34793
|
-
}
|
|
34794
|
-
break;
|
|
34795
|
-
}
|
|
34840
|
+
readClassnames(modeClassName, className_input, link, className_select);
|
|
34796
34841
|
}
|
|
34797
34842
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
34798
34843
|
target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'target') === '_blank';
|
|
@@ -34853,44 +34898,10 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34853
34898
|
links = [link];
|
|
34854
34899
|
}
|
|
34855
34900
|
links.forEach(a => {
|
|
34856
|
-
var _a;
|
|
34857
34901
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'href', url_input.value);
|
|
34858
|
-
|
|
34859
|
-
if (modeClassName === 'input') {
|
|
34860
|
-
if (className_input.value === '' &&
|
|
34861
|
-
a.hasAttribute('class')) {
|
|
34862
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
34863
|
-
}
|
|
34864
|
-
if (className_input.value !== '') {
|
|
34865
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
|
|
34866
|
-
}
|
|
34867
|
-
}
|
|
34868
|
-
else if (modeClassName === 'select') {
|
|
34869
|
-
if (a.hasAttribute('class')) {
|
|
34870
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
34871
|
-
}
|
|
34872
|
-
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
34873
|
-
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
34874
|
-
if (className) {
|
|
34875
|
-
a.classList.add(className);
|
|
34876
|
-
}
|
|
34877
|
-
}
|
|
34878
|
-
}
|
|
34879
|
-
}
|
|
34902
|
+
writeClasses(modeClassName, className_input, className_select, a);
|
|
34880
34903
|
if (!isImageContent) {
|
|
34881
|
-
|
|
34882
|
-
if (content_input.value.trim().length) {
|
|
34883
|
-
if (textWasChanged) {
|
|
34884
|
-
newContent = content_input.value;
|
|
34885
|
-
}
|
|
34886
|
-
}
|
|
34887
|
-
else {
|
|
34888
|
-
newContent = url_input.value;
|
|
34889
|
-
}
|
|
34890
|
-
const content = a.textContent;
|
|
34891
|
-
if (newContent !== content) {
|
|
34892
|
-
a.textContent = newContent;
|
|
34893
|
-
}
|
|
34904
|
+
writeImage(a, content_input, textWasChanged, url_input);
|
|
34894
34905
|
}
|
|
34895
34906
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
34896
34907
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
@@ -34935,6 +34946,75 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34935
34946
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
34936
34947
|
], link.prototype, "__generateForm", null);
|
|
34937
34948
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
|
|
34949
|
+
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
34950
|
+
var _a;
|
|
34951
|
+
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
34952
|
+
if (modeClassName === 'input') {
|
|
34953
|
+
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
34954
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
34955
|
+
}
|
|
34956
|
+
if (className_input.value !== '') {
|
|
34957
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
|
|
34958
|
+
}
|
|
34959
|
+
}
|
|
34960
|
+
else if (modeClassName === 'select') {
|
|
34961
|
+
if (a.hasAttribute('class')) {
|
|
34962
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
34963
|
+
}
|
|
34964
|
+
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
34965
|
+
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
34966
|
+
if (className) {
|
|
34967
|
+
a.classList.add(className);
|
|
34968
|
+
}
|
|
34969
|
+
}
|
|
34970
|
+
}
|
|
34971
|
+
}
|
|
34972
|
+
}
|
|
34973
|
+
function readClassnames(modeClassName, className_input, link, className_select) {
|
|
34974
|
+
switch (modeClassName) {
|
|
34975
|
+
case 'input':
|
|
34976
|
+
if (className_input) {
|
|
34977
|
+
className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
34978
|
+
}
|
|
34979
|
+
break;
|
|
34980
|
+
case 'select':
|
|
34981
|
+
if (className_select) {
|
|
34982
|
+
for (let i = 0; i < className_select.selectedOptions.length; i++) {
|
|
34983
|
+
const option = className_select.options.item(i);
|
|
34984
|
+
if (option) {
|
|
34985
|
+
option.selected = false;
|
|
34986
|
+
}
|
|
34987
|
+
}
|
|
34988
|
+
const classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
|
|
34989
|
+
classNames.split(' ').forEach(className => {
|
|
34990
|
+
if (className) {
|
|
34991
|
+
for (let i = 0; i < className_select.options.length; i++) {
|
|
34992
|
+
const option = className_select.options.item(i);
|
|
34993
|
+
if ((option === null || option === void 0 ? void 0 : option.value) && option.value === className) {
|
|
34994
|
+
option.selected = true;
|
|
34995
|
+
}
|
|
34996
|
+
}
|
|
34997
|
+
}
|
|
34998
|
+
});
|
|
34999
|
+
}
|
|
35000
|
+
break;
|
|
35001
|
+
}
|
|
35002
|
+
}
|
|
35003
|
+
function writeImage(a, content_input, textWasChanged, url_input) {
|
|
35004
|
+
let newContent = a.textContent;
|
|
35005
|
+
if (content_input.value.trim().length) {
|
|
35006
|
+
if (textWasChanged) {
|
|
35007
|
+
newContent = content_input.value;
|
|
35008
|
+
}
|
|
35009
|
+
}
|
|
35010
|
+
else {
|
|
35011
|
+
newContent = url_input.value;
|
|
35012
|
+
}
|
|
35013
|
+
const content = a.textContent;
|
|
35014
|
+
if (newContent !== content) {
|
|
35015
|
+
a.textContent = newContent;
|
|
35016
|
+
}
|
|
35017
|
+
}
|
|
34938
35018
|
|
|
34939
35019
|
|
|
34940
35020
|
/***/ }),
|
|
@@ -37778,7 +37858,6 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
|
|
|
37778
37858
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
37779
37859
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
37780
37860
|
/* harmony export */ });
|
|
37781
|
-
/* unused harmony export isSelectionWrapper */
|
|
37782
37861
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
|
|
37783
37862
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58720);
|
|
37784
37863
|
/*!
|
|
@@ -37800,60 +37879,14 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
|
37800
37879
|
rng.endContainer.nodeValue == null) {
|
|
37801
37880
|
return;
|
|
37802
37881
|
}
|
|
37803
|
-
if (jodit
|
|
37804
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37805
|
-
typeof window.Highlight !== 'undefined') {
|
|
37806
|
-
const ranges = [rng, ...restRanges].map(rng => {
|
|
37807
|
-
const range = jodit.selection.createRange();
|
|
37808
|
-
range.setStart(rng.startContainer, rng.startOffset);
|
|
37809
|
-
range.setEnd(rng.endContainer, rng.endOffset);
|
|
37810
|
-
return range;
|
|
37811
|
-
});
|
|
37812
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37813
|
-
const searchHighlight = new Highlight(...ranges);
|
|
37814
|
-
// @ts-ignore
|
|
37815
|
-
CSS.highlights.clear();
|
|
37816
|
-
// @ts-ignore
|
|
37817
|
-
CSS.highlights.set('jodit-search-result', searchHighlight);
|
|
37818
|
-
restRanges.length = 0;
|
|
37882
|
+
if (checkNativeSelectionMethod(jodit, rng, restRanges)) {
|
|
37819
37883
|
return;
|
|
37820
37884
|
}
|
|
37821
37885
|
const span = ci.element('span', {
|
|
37822
37886
|
[TMP_ATTR]: true
|
|
37823
37887
|
});
|
|
37824
37888
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
|
|
37825
|
-
|
|
37826
|
-
let diff = 0;
|
|
37827
|
-
if (rng.startOffset !== 0) {
|
|
37828
|
-
const text = ci.text(startText.substring(0, rng.startOffset));
|
|
37829
|
-
rng.startContainer.nodeValue = startText.substring(rng.startOffset);
|
|
37830
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
|
|
37831
|
-
if (rng.startContainer === rng.endContainer) {
|
|
37832
|
-
diff = rng.startOffset;
|
|
37833
|
-
rng.endOffset -= diff;
|
|
37834
|
-
}
|
|
37835
|
-
rng.startOffset = 0;
|
|
37836
|
-
}
|
|
37837
|
-
const endText = rng.endContainer.nodeValue;
|
|
37838
|
-
if (rng.endOffset !== endText.length) {
|
|
37839
|
-
const text = ci.text(endText.substring(rng.endOffset));
|
|
37840
|
-
rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
|
|
37841
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
|
|
37842
|
-
for (const range of restRanges) {
|
|
37843
|
-
if (range.startContainer === rng.endContainer) {
|
|
37844
|
-
range.startContainer = text;
|
|
37845
|
-
range.startOffset = range.startOffset - rng.endOffset - diff;
|
|
37846
|
-
if (range.endContainer === rng.endContainer) {
|
|
37847
|
-
range.endContainer = text;
|
|
37848
|
-
range.endOffset = range.endOffset - rng.endOffset - diff;
|
|
37849
|
-
}
|
|
37850
|
-
}
|
|
37851
|
-
else {
|
|
37852
|
-
break;
|
|
37853
|
-
}
|
|
37854
|
-
}
|
|
37855
|
-
rng.endOffset = rng.endContainer.nodeValue.length;
|
|
37856
|
-
}
|
|
37889
|
+
normalizeRanges(rng, restRanges, ci);
|
|
37857
37890
|
let next = rng.startContainer;
|
|
37858
37891
|
do {
|
|
37859
37892
|
if (!next) {
|
|
@@ -37899,6 +37932,61 @@ function clearSelectionWrappersFromHTML(root) {
|
|
|
37899
37932
|
function isSelectionWrapper(node) {
|
|
37900
37933
|
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
|
|
37901
37934
|
}
|
|
37935
|
+
function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
37936
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
37937
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37938
|
+
typeof window.Highlight !== 'undefined') {
|
|
37939
|
+
const ranges = [rng, ...restRanges].map(rng => {
|
|
37940
|
+
const range = jodit.selection.createRange();
|
|
37941
|
+
range.setStart(rng.startContainer, rng.startOffset);
|
|
37942
|
+
range.setEnd(rng.endContainer, rng.endOffset);
|
|
37943
|
+
return range;
|
|
37944
|
+
});
|
|
37945
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
37946
|
+
const searchHighlight = new Highlight(...ranges);
|
|
37947
|
+
// @ts-ignore
|
|
37948
|
+
CSS.highlights.clear();
|
|
37949
|
+
// @ts-ignore
|
|
37950
|
+
CSS.highlights.set('jodit-search-result', searchHighlight);
|
|
37951
|
+
restRanges.length = 0;
|
|
37952
|
+
return true;
|
|
37953
|
+
}
|
|
37954
|
+
return false;
|
|
37955
|
+
}
|
|
37956
|
+
function normalizeRanges(rng, restRanges, ci) {
|
|
37957
|
+
const startText = rng.startContainer.nodeValue;
|
|
37958
|
+
let diff = 0;
|
|
37959
|
+
if (rng.startOffset !== 0) {
|
|
37960
|
+
const text = ci.text(startText.substring(0, rng.startOffset));
|
|
37961
|
+
rng.startContainer.nodeValue = startText.substring(rng.startOffset);
|
|
37962
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
|
|
37963
|
+
if (rng.startContainer === rng.endContainer) {
|
|
37964
|
+
diff = rng.startOffset;
|
|
37965
|
+
rng.endOffset -= diff;
|
|
37966
|
+
}
|
|
37967
|
+
rng.startOffset = 0;
|
|
37968
|
+
}
|
|
37969
|
+
const endText = rng.endContainer.nodeValue;
|
|
37970
|
+
if (rng.endOffset !== endText.length) {
|
|
37971
|
+
const text = ci.text(endText.substring(rng.endOffset));
|
|
37972
|
+
rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
|
|
37973
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
|
|
37974
|
+
for (const range of restRanges) {
|
|
37975
|
+
if (range.startContainer === rng.endContainer) {
|
|
37976
|
+
range.startContainer = text;
|
|
37977
|
+
range.startOffset = range.startOffset - rng.endOffset - diff;
|
|
37978
|
+
if (range.endContainer === rng.endContainer) {
|
|
37979
|
+
range.endContainer = text;
|
|
37980
|
+
range.endOffset = range.endOffset - rng.endOffset - diff;
|
|
37981
|
+
}
|
|
37982
|
+
}
|
|
37983
|
+
else {
|
|
37984
|
+
break;
|
|
37985
|
+
}
|
|
37986
|
+
}
|
|
37987
|
+
rng.endOffset = rng.endContainer.nodeValue.length;
|
|
37988
|
+
}
|
|
37989
|
+
}
|
|
37902
37990
|
|
|
37903
37991
|
|
|
37904
37992
|
/***/ }),
|
|
@@ -42114,38 +42202,10 @@ function tableKeyboardNavigation(editor) {
|
|
|
42114
42202
|
.off('.tableKeyboardNavigation')
|
|
42115
42203
|
.on('keydown.tableKeyboardNavigation', (event) => {
|
|
42116
42204
|
const { key } = event;
|
|
42117
|
-
|
|
42118
|
-
return;
|
|
42119
|
-
}
|
|
42120
|
-
const current = editor.s.current();
|
|
42121
|
-
if (!current) {
|
|
42122
|
-
return;
|
|
42123
|
-
}
|
|
42124
|
-
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);
|
|
42205
|
+
const cell = findCell(editor, key);
|
|
42125
42206
|
if (!cell) {
|
|
42126
42207
|
return;
|
|
42127
42208
|
}
|
|
42128
|
-
const { range } = editor.s;
|
|
42129
|
-
if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
|
|
42130
|
-
const isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
|
|
42131
|
-
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
|
|
42132
|
-
? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
|
|
42133
|
-
: Boolean(elm), cell);
|
|
42134
|
-
if ((!isNextDirection &&
|
|
42135
|
-
(hasNext ||
|
|
42136
|
-
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
|
|
42137
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42138
|
-
range.startOffset !== 0))) ||
|
|
42139
|
-
(isNextDirection &&
|
|
42140
|
-
(hasNext ||
|
|
42141
|
-
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
|
|
42142
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42143
|
-
current.nodeValue &&
|
|
42144
|
-
range.startOffset !==
|
|
42145
|
-
current.nodeValue.length)))) {
|
|
42146
|
-
return;
|
|
42147
|
-
}
|
|
42148
|
-
}
|
|
42149
42209
|
const tableModule = editor.getInstance(jodit_modules_table_table__WEBPACK_IMPORTED_MODULE_4__/* .Table */ .X, editor.o);
|
|
42150
42210
|
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(cell, 'table', editor.editor);
|
|
42151
42211
|
let next = null;
|
|
@@ -42203,6 +42263,40 @@ function tableKeyboardNavigation(editor) {
|
|
|
42203
42263
|
});
|
|
42204
42264
|
}
|
|
42205
42265
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('tableKeyboardNavigation', tableKeyboardNavigation);
|
|
42266
|
+
function findCell(editor, key) {
|
|
42267
|
+
if (!WORK_KEYS.has(key)) {
|
|
42268
|
+
return;
|
|
42269
|
+
}
|
|
42270
|
+
const current = editor.s.current();
|
|
42271
|
+
if (!current) {
|
|
42272
|
+
return;
|
|
42273
|
+
}
|
|
42274
|
+
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);
|
|
42275
|
+
if (!cell) {
|
|
42276
|
+
return;
|
|
42277
|
+
}
|
|
42278
|
+
const { range } = editor.s;
|
|
42279
|
+
if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
|
|
42280
|
+
const isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
|
|
42281
|
+
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
|
|
42282
|
+
? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
|
|
42283
|
+
: Boolean(elm), cell);
|
|
42284
|
+
if ((!isNextDirection &&
|
|
42285
|
+
(hasNext ||
|
|
42286
|
+
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
|
|
42287
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42288
|
+
range.startOffset !== 0))) ||
|
|
42289
|
+
(isNextDirection &&
|
|
42290
|
+
(hasNext ||
|
|
42291
|
+
(key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
|
|
42292
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
|
|
42293
|
+
current.nodeValue &&
|
|
42294
|
+
range.startOffset !== current.nodeValue.length)))) {
|
|
42295
|
+
return;
|
|
42296
|
+
}
|
|
42297
|
+
}
|
|
42298
|
+
return cell;
|
|
42299
|
+
}
|
|
42206
42300
|
|
|
42207
42301
|
|
|
42208
42302
|
/***/ }),
|
|
@@ -44251,16 +44345,16 @@ var __webpack_exports__ = {};
|
|
|
44251
44345
|
__webpack_require__.r(__webpack_exports__);
|
|
44252
44346
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44253
44347
|
/* harmony export */ CommitMode: function() { return /* binding */ CommitMode; },
|
|
44254
|
-
/* harmony export */ Jodit: function() { return /* reexport safe */
|
|
44348
|
+
/* harmony export */ Jodit: function() { return /* reexport safe */ _jodit__WEBPACK_IMPORTED_MODULE_0__.x; }
|
|
44255
44349
|
/* harmony export */ });
|
|
44256
|
-
/* harmony import */ var
|
|
44257
|
-
/* harmony import */ var
|
|
44350
|
+
/* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46173);
|
|
44351
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
44258
44352
|
/* harmony import */ var _core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17352);
|
|
44259
44353
|
/* harmony import */ var _core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22664);
|
|
44260
44354
|
/* harmony import */ var _modules___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(37435);
|
|
44261
44355
|
/* harmony import */ var _styles_icons___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79721);
|
|
44262
|
-
/* harmony import */ var
|
|
44263
|
-
/* harmony import */ var
|
|
44356
|
+
/* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(74470);
|
|
44357
|
+
/* harmony import */ var jodit_plugins_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88222);
|
|
44264
44358
|
/*!
|
|
44265
44359
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44266
44360
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44271,6 +44365,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44271
44365
|
* @packageDocumentation
|
|
44272
44366
|
* @module jodit
|
|
44273
44367
|
*/
|
|
44368
|
+
// eslint-disable-next-line simple-import-sort/imports
|
|
44274
44369
|
|
|
44275
44370
|
|
|
44276
44371
|
|
|
@@ -44283,7 +44378,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44283
44378
|
|
|
44284
44379
|
// copy constants in Jodit
|
|
44285
44380
|
Object.keys(_core_constants__WEBPACK_IMPORTED_MODULE_2__).forEach((key) => {
|
|
44286
|
-
|
|
44381
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
44287
44382
|
});
|
|
44288
44383
|
const esFilter = (key) => key !== '__esModule';
|
|
44289
44384
|
// Icons
|
|
@@ -44299,32 +44394,32 @@ Object.keys(_modules___WEBPACK_IMPORTED_MODULE_4__)
|
|
|
44299
44394
|
var _a;
|
|
44300
44395
|
// @ts-ignore
|
|
44301
44396
|
const module = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
|
|
44302
|
-
const name = (0,
|
|
44397
|
+
const name = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className)
|
|
44303
44398
|
? module.prototype.className()
|
|
44304
44399
|
: key;
|
|
44305
|
-
if (!(0,
|
|
44400
|
+
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
|
|
44306
44401
|
console.warn('Module name must be a string', key);
|
|
44307
44402
|
return;
|
|
44308
44403
|
}
|
|
44309
44404
|
// @ts-ignore
|
|
44310
|
-
|
|
44405
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.modules[name] = module;
|
|
44311
44406
|
});
|
|
44312
44407
|
// Decorators
|
|
44313
44408
|
Object.keys(_core_decorators__WEBPACK_IMPORTED_MODULE_3__)
|
|
44314
44409
|
.filter(esFilter)
|
|
44315
44410
|
.forEach((key) => {
|
|
44316
44411
|
// @ts-ignore
|
|
44317
|
-
|
|
44412
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.decorators[key] = _core_decorators__WEBPACK_IMPORTED_MODULE_3__[key];
|
|
44318
44413
|
});
|
|
44319
44414
|
['Confirm', 'Alert', 'Prompt'].forEach((key) => {
|
|
44320
44415
|
// @ts-ignore
|
|
44321
|
-
|
|
44416
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
|
|
44322
44417
|
});
|
|
44323
44418
|
// Languages
|
|
44324
|
-
Object.keys(
|
|
44419
|
+
Object.keys(_languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)
|
|
44325
44420
|
.filter(esFilter)
|
|
44326
44421
|
.forEach((key) => {
|
|
44327
|
-
|
|
44422
|
+
_jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.lang[key] = _languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A[key];
|
|
44328
44423
|
});
|
|
44329
44424
|
|
|
44330
44425
|
class CommitMode {
|