jodit 4.19.10 → 4.19.12
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 +150 -131
- package/es2015/jodit.css +33 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +10 -10
- package/es2015/jodit.js +781 -195
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +10 -10
- package/es2015/plugins/debug/debug.css +1 -1
- 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.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +10 -10
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +10 -10
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +33 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +15 -15
- package/es2021/jodit.js +780 -193
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +15 -15
- package/es2021/plugins/debug/debug.css +1 -1
- 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 +33 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +22 -22
- package/es2021.en/jodit.js +780 -193
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +22 -22
- package/es2021.en/plugins/debug/debug.css +1 -1
- 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 +34 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +827 -200
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- 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/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/dom/dom.js +2 -2
- package/esm/core/helpers/checker/is-html-from-word.d.ts +4 -3
- package/esm/core/helpers/checker/is-html-from-word.js +94 -14
- package/esm/core/helpers/checker/is-html.d.ts +4 -0
- package/esm/core/helpers/checker/is-html.js +54 -2
- package/esm/core/helpers/html/apply-styles.js +20 -11
- package/esm/core/helpers/html/clean-from-word.js +2 -3
- package/esm/core/helpers/html/index.d.ts +1 -0
- package/esm/core/helpers/html/index.js +1 -0
- package/esm/core/helpers/html/tag-scan.d.ts +36 -0
- package/esm/core/helpers/html/tag-scan.js +257 -0
- package/esm/core/helpers/string/trim.d.ts +4 -0
- package/esm/core/helpers/string/trim.js +29 -10
- package/esm/core/selection/helpers/index.js +3 -2
- package/esm/core/ui/button/tooltip/tooltip.d.ts +6 -0
- package/esm/core/ui/button/tooltip/tooltip.js +14 -3
- package/esm/core/view/view-with-toolbar.js +6 -1
- package/esm/jodit.js +2 -1
- package/esm/plugins/add-new-line/add-new-line.d.ts +5 -0
- package/esm/plugins/add-new-line/add-new-line.js +20 -3
- package/esm/plugins/delete/delete.d.ts +7 -0
- package/esm/plugins/delete/delete.js +38 -2
- package/esm/plugins/hr/hr.js +5 -0
- package/esm/plugins/iframe/iframe.js +59 -12
- package/esm/plugins/media/media.js +10 -9
- package/esm/plugins/paste/helpers.js +4 -2
- package/esm/plugins/resizer/resizer.js +6 -5
- package/esm/plugins/select-cells/select-cells.d.ts +1 -0
- package/esm/plugins/select-cells/select-cells.js +12 -18
- package/package.json +1 -1
- package/types/core/helpers/checker/is-html-from-word.d.ts +4 -3
- package/types/core/helpers/checker/is-html.d.ts +4 -0
- package/types/core/helpers/html/index.d.ts +1 -0
- package/types/core/helpers/html/tag-scan.d.ts +36 -0
- package/types/core/helpers/string/trim.d.ts +4 -0
- package/types/core/ui/button/tooltip/tooltip.d.ts +6 -0
- package/types/plugins/add-new-line/add-new-line.d.ts +5 -0
- package/types/plugins/delete/delete.d.ts +7 -0
- package/types/plugins/select-cells/select-cells.d.ts +1 -0
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.19.
|
|
4
|
+
* Version: v4.19.12
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2155,7 +2155,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2155
2155
|
* @packageDocumentation
|
|
2156
2156
|
* @module constants
|
|
2157
2157
|
*/
|
|
2158
|
-
var APP_VERSION = "4.19.
|
|
2158
|
+
var APP_VERSION = "4.19.12";
|
|
2159
2159
|
// prettier-ignore
|
|
2160
2160
|
var ES = "es5";
|
|
2161
2161
|
var IS_ES_MODERN = false;
|
|
@@ -3476,14 +3476,15 @@ function wait(condition) {
|
|
|
3476
3476
|
/* harmony import */ var jodit_core_helpers_checker_is_set__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(3213);
|
|
3477
3477
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(85932);
|
|
3478
3478
|
/* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(18303);
|
|
3479
|
-
/* harmony import */ var
|
|
3480
|
-
/* harmony import */ var
|
|
3481
|
-
/* harmony import */ var
|
|
3482
|
-
/* harmony import */ var
|
|
3483
|
-
/* harmony import */ var
|
|
3484
|
-
/* harmony import */ var
|
|
3485
|
-
/* harmony import */ var
|
|
3486
|
-
/* harmony import */ var
|
|
3479
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(81910);
|
|
3480
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(4040);
|
|
3481
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(28712);
|
|
3482
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_16__);
|
|
3483
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(7909);
|
|
3484
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(80991);
|
|
3485
|
+
/* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(36400);
|
|
3486
|
+
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(33201);
|
|
3487
|
+
/* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(71125);
|
|
3487
3488
|
/*!
|
|
3488
3489
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3489
3490
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -3514,7 +3515,7 @@ function wait(condition) {
|
|
|
3514
3515
|
|
|
3515
3516
|
|
|
3516
3517
|
|
|
3517
|
-
|
|
3518
|
+
|
|
3518
3519
|
/**
|
|
3519
3520
|
* Module for working with DOM
|
|
3520
3521
|
*/ var Dom = /*#__PURE__*/ function() {
|
|
@@ -3612,7 +3613,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
3612
3613
|
var wrapper = (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_12__.isString)(tag) ? create.element(tag) : tag;
|
|
3613
3614
|
if (Dom.isNode(current)) {
|
|
3614
3615
|
if (!current.parentNode) {
|
|
3615
|
-
throw (0,
|
|
3616
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_20__.error)('Element should be in DOM');
|
|
3616
3617
|
}
|
|
3617
3618
|
current.parentNode.insertBefore(wrapper, current);
|
|
3618
3619
|
wrapper.appendChild(current);
|
|
@@ -3672,12 +3673,12 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
3672
3673
|
value: function replace(elm, newTagName, create) {
|
|
3673
3674
|
var withAttributes = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, notMoveContent = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
3674
3675
|
if ((0,jodit_core_helpers_checker_is_html__WEBPACK_IMPORTED_MODULE_10__.isHTML)(newTagName)) {
|
|
3675
|
-
(0,
|
|
3676
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_16__.assert)(create, 'Need create instance for new tag');
|
|
3676
3677
|
newTagName = create.fromHTML(newTagName);
|
|
3677
3678
|
}
|
|
3678
3679
|
var tag;
|
|
3679
3680
|
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_12__.isString)(newTagName)) {
|
|
3680
|
-
(0,
|
|
3681
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_16__.assert)(create, 'Need create instance for new tag');
|
|
3681
3682
|
tag = create.element(newTagName);
|
|
3682
3683
|
} else {
|
|
3683
3684
|
tag = newTagName;
|
|
@@ -3746,7 +3747,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
3746
3747
|
cond = condNoEmptyElement;
|
|
3747
3748
|
}
|
|
3748
3749
|
var emptyText = function emptyText(node) {
|
|
3749
|
-
return node.nodeValue == null || (0,
|
|
3750
|
+
return node.nodeValue == null || (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_15__.trim)(node.nodeValue).length === 0;
|
|
3750
3751
|
};
|
|
3751
3752
|
if (Dom.isText(node)) {
|
|
3752
3753
|
return emptyText(node);
|
|
@@ -3874,7 +3875,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
3874
3875
|
return Dom.isElement(node) && !/^(BR|HR)$/i.test(node.tagName) && [
|
|
3875
3876
|
'inline',
|
|
3876
3877
|
'inline-block'
|
|
3877
|
-
].indexOf((0,
|
|
3878
|
+
].indexOf((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_18__.css)(node, 'display').toString()) !== -1;
|
|
3878
3879
|
}
|
|
3879
3880
|
},
|
|
3880
3881
|
{
|
|
@@ -4164,7 +4165,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4164
4165
|
*/ function findNotEmptySibling(node, left) {
|
|
4165
4166
|
return Dom.findSibling(node, left, function(n) {
|
|
4166
4167
|
var _n_nodeValue;
|
|
4167
|
-
return !Dom.isEmptyTextNode(n) && Boolean(!Dom.isText(n) || ((_n_nodeValue = n.nodeValue) === null || _n_nodeValue === void 0 ? void 0 : _n_nodeValue.length) && (0,
|
|
4168
|
+
return !Dom.isEmptyTextNode(n) && Boolean(!Dom.isText(n) || ((_n_nodeValue = n.nodeValue) === null || _n_nodeValue === void 0 ? void 0 : _n_nodeValue.length) && (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_15__.trim)(n.nodeValue));
|
|
4168
4169
|
});
|
|
4169
4170
|
}
|
|
4170
4171
|
},
|
|
@@ -4173,8 +4174,8 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4173
4174
|
value: /**
|
|
4174
4175
|
* Returns the nearest non-empty neighbor
|
|
4175
4176
|
*/ function findNotEmptyNeighbor(node, left, root) {
|
|
4176
|
-
return (0,
|
|
4177
|
-
return Boolean(n && (!(Dom.isText(n) || Dom.isComment(n)) || (0,
|
|
4177
|
+
return (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_21__.call)(left ? Dom.prev : Dom.next, node, function(n) {
|
|
4178
|
+
return Boolean(n && (!(Dom.isText(n) || Dom.isComment(n)) || (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_15__.trim)((n === null || n === void 0 ? void 0 : n.nodeValue) || '').length));
|
|
4178
4179
|
}, root);
|
|
4179
4180
|
}
|
|
4180
4181
|
},
|
|
@@ -4385,7 +4386,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4385
4386
|
if (!node) {
|
|
4386
4387
|
return;
|
|
4387
4388
|
}
|
|
4388
|
-
;(0,
|
|
4389
|
+
;(0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_19__.dataBind)(node, '__old_display', node.style.getPropertyValue('display'));
|
|
4389
4390
|
node.style.setProperty('display', 'none');
|
|
4390
4391
|
}
|
|
4391
4392
|
},
|
|
@@ -4397,7 +4398,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4397
4398
|
if (!node) {
|
|
4398
4399
|
return;
|
|
4399
4400
|
}
|
|
4400
|
-
var display = (0,
|
|
4401
|
+
var display = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_19__.dataBind)(node, '__old_display');
|
|
4401
4402
|
if (node.style.getPropertyValue('display') === 'none') {
|
|
4402
4403
|
node.style.setProperty('display', display || null);
|
|
4403
4404
|
}
|
|
@@ -4424,8 +4425,8 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4424
4425
|
value: /**
|
|
4425
4426
|
* Marks an item as temporary
|
|
4426
4427
|
*/ function markTemporary(element, attributes) {
|
|
4427
|
-
attributes && (0,
|
|
4428
|
-
(0,
|
|
4428
|
+
attributes && (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_17__.attr)(element, attributes);
|
|
4429
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_17__.attr)(element, jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.TEMP_ATTR, true);
|
|
4429
4430
|
return element;
|
|
4430
4431
|
}
|
|
4431
4432
|
},
|
|
@@ -4437,7 +4438,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4437
4438
|
if (!Dom.isElement(element)) {
|
|
4438
4439
|
return false;
|
|
4439
4440
|
}
|
|
4440
|
-
return Dom.isMarker(element) || (0,
|
|
4441
|
+
return Dom.isMarker(element) || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_17__.attr)(element, jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.TEMP_ATTR) === 'true';
|
|
4441
4442
|
}
|
|
4442
4443
|
},
|
|
4443
4444
|
{
|
|
@@ -4453,7 +4454,7 @@ var TEMP_ELEMENT_REG_EXP = new RegExp("<([a-z]+)[^>]+".concat(jodit_core_constan
|
|
|
4453
4454
|
value: /**
|
|
4454
4455
|
* Unwrap temporary elements inside a HTML string (keeps their content)
|
|
4455
4456
|
*/ function replaceTemporaryFromString(value) {
|
|
4456
|
-
return
|
|
4457
|
+
return (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_14__.unwrapMarkedTags)(value, null, jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.TEMP_ATTR);
|
|
4457
4458
|
}
|
|
4458
4459
|
},
|
|
4459
4460
|
{
|
|
@@ -6258,16 +6259,96 @@ function isFastEqual(a, b) {
|
|
|
6258
6259
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6259
6260
|
*/ /**
|
|
6260
6261
|
* @module helpers/checker
|
|
6261
|
-
*/
|
|
6262
|
+
*/ var SPACE = /\s/;
|
|
6263
|
+
var DIGIT = /\d/;
|
|
6264
|
+
var WORD_CHAR = /\w/;
|
|
6265
|
+
// `content="Microsoft Word 15"` — the name followed by a space and a version digit
|
|
6266
|
+
function hasGenerator(tag, name) {
|
|
6267
|
+
var index = tag.indexOf(name);
|
|
6268
|
+
while(index !== -1){
|
|
6269
|
+
var after = index + name.length;
|
|
6270
|
+
if (SPACE.test(tag.charAt(after)) && DIGIT.test(tag.charAt(after + 1))) {
|
|
6271
|
+
return true;
|
|
6272
|
+
}
|
|
6273
|
+
index = tag.indexOf(name, after);
|
|
6274
|
+
}
|
|
6275
|
+
return false;
|
|
6276
|
+
}
|
|
6277
|
+
// `<meta name=ProgId content=Word.Document>`, `<meta name=Generator content="LibreOffice 7.6">`
|
|
6278
|
+
function isOfficeMeta(tag) {
|
|
6279
|
+
if (hasGenerator(tag, 'Microsoft Word') || hasGenerator(tag, 'Microsoft Excel')) {
|
|
6280
|
+
return true;
|
|
6281
|
+
}
|
|
6282
|
+
var lower = tag.toLowerCase();
|
|
6283
|
+
var progId = lower.indexOf('progid');
|
|
6284
|
+
if (progId !== -1 && (lower.indexOf('word.', progId) !== -1 || lower.indexOf('excel.', progId) !== -1)) {
|
|
6285
|
+
return true;
|
|
6286
|
+
}
|
|
6287
|
+
return lower.includes('libreoffice') || lower.includes('openoffice');
|
|
6288
|
+
}
|
|
6289
|
+
// ` class=MsoNormal`, ` class="MsoListParagraph"` inside one tag
|
|
6290
|
+
function hasMsoClass(tag) {
|
|
6291
|
+
var index = tag.indexOf('class=');
|
|
6292
|
+
while(index !== -1){
|
|
6293
|
+
if (index > 0 && SPACE.test(tag.charAt(index - 1))) {
|
|
6294
|
+
var value = index + 'class='.length;
|
|
6295
|
+
var quote = tag.charAt(value);
|
|
6296
|
+
if (quote === '"' || quote === "'") {
|
|
6297
|
+
value += 1;
|
|
6298
|
+
}
|
|
6299
|
+
if (tag.startsWith('Mso', value)) {
|
|
6300
|
+
return true;
|
|
6301
|
+
}
|
|
6302
|
+
}
|
|
6303
|
+
index = tag.indexOf('class=', index + 'class='.length);
|
|
6304
|
+
}
|
|
6305
|
+
return false;
|
|
6306
|
+
}
|
|
6307
|
+
// `style='mso-list:l0 level1 lfo1'` — an `mso-` property inside a style attribute with the given quote
|
|
6308
|
+
function hasMsoStyle(data, quote) {
|
|
6309
|
+
var open = 'style=' + quote;
|
|
6310
|
+
var index = data.indexOf(open);
|
|
6311
|
+
while(index !== -1){
|
|
6312
|
+
var start = index + open.length;
|
|
6313
|
+
var end = data.indexOf(quote, start);
|
|
6314
|
+
if (end === -1) {
|
|
6315
|
+
end = data.length;
|
|
6316
|
+
}
|
|
6317
|
+
if (data.slice(start, end).includes('mso-')) {
|
|
6318
|
+
return true;
|
|
6319
|
+
}
|
|
6320
|
+
index = data.indexOf(open, end);
|
|
6321
|
+
}
|
|
6322
|
+
return false;
|
|
6323
|
+
}
|
|
6324
|
+
/**
|
|
6262
6325
|
* Detect if string is HTML from MS Word, Excel or LibreOffice/OpenOffice
|
|
6326
|
+
*
|
|
6327
|
+
* The clipboard text is attacker controlled, so every check walks the string
|
|
6328
|
+
* once with `indexOf`: a regex with an unbounded group before a required
|
|
6329
|
+
* literal was quadratic on a long run of `<meta` and froze the tab.
|
|
6263
6330
|
*/ function isHtmlFromWord(data) {
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6331
|
+
if (data.includes('urn:schemas-microsoft-com:office:word') || data.includes('urn:schemas-microsoft-com:office:excel')) {
|
|
6332
|
+
return true;
|
|
6333
|
+
}
|
|
6334
|
+
// Each tag is taken once, from its `<` to the next `>`, so the scan stays linear
|
|
6335
|
+
var index = data.indexOf('<');
|
|
6336
|
+
while(index !== -1){
|
|
6337
|
+
if (!WORD_CHAR.test(data.charAt(index + 1))) {
|
|
6338
|
+
index = data.indexOf('<', index + 1);
|
|
6339
|
+
continue;
|
|
6340
|
+
}
|
|
6341
|
+
var end = data.indexOf('>', index);
|
|
6342
|
+
if (end === -1) {
|
|
6343
|
+
end = data.length;
|
|
6344
|
+
}
|
|
6345
|
+
var tag = data.slice(index, end);
|
|
6346
|
+
if (tag.slice(0, 5).toLowerCase() === '<meta' && isOfficeMeta(tag) || hasMsoClass(tag)) {
|
|
6347
|
+
return true;
|
|
6348
|
+
}
|
|
6349
|
+
index = data.indexOf('<', end);
|
|
6350
|
+
}
|
|
6351
|
+
return hasMsoStyle(data, "'") || hasMsoStyle(data, '"') && data.includes('<font');
|
|
6271
6352
|
}
|
|
6272
6353
|
|
|
6273
6354
|
|
|
@@ -6288,10 +6369,63 @@ function isFastEqual(a, b) {
|
|
|
6288
6369
|
*/ /**
|
|
6289
6370
|
* @module helpers/checker
|
|
6290
6371
|
*/
|
|
6372
|
+
var NAME_START = /[A-Za-z]/;
|
|
6373
|
+
var NAME_CHAR = /[A-Za-z0-9]/;
|
|
6374
|
+
var WORD_CHAR = /\w/;
|
|
6375
|
+
// The tag name at `from`, or '' when there is none
|
|
6376
|
+
function readTagName(str, from) {
|
|
6377
|
+
if (!NAME_START.test(str.charAt(from))) {
|
|
6378
|
+
return '';
|
|
6379
|
+
}
|
|
6380
|
+
var end = from + 1;
|
|
6381
|
+
while(NAME_CHAR.test(str.charAt(end))){
|
|
6382
|
+
end += 1;
|
|
6383
|
+
}
|
|
6384
|
+
return str.slice(from, end);
|
|
6385
|
+
}
|
|
6386
|
+
// Is there an element `<name ...>` closed later by `</name>`? One pass for the closing tags, one for the opening ones
|
|
6387
|
+
function hasElement(str) {
|
|
6388
|
+
var lastClose = new Map();
|
|
6389
|
+
var index = str.indexOf('</');
|
|
6390
|
+
while(index !== -1){
|
|
6391
|
+
var name = readTagName(str, index + 2);
|
|
6392
|
+
if (name !== '' && str.charAt(index + 2 + name.length) === '>') {
|
|
6393
|
+
lastClose.set(name, index);
|
|
6394
|
+
}
|
|
6395
|
+
index = str.indexOf('</', index + 2);
|
|
6396
|
+
}
|
|
6397
|
+
if (lastClose.size === 0) {
|
|
6398
|
+
return false;
|
|
6399
|
+
}
|
|
6400
|
+
var gt = -1;
|
|
6401
|
+
index = str.indexOf('<');
|
|
6402
|
+
while(index !== -1){
|
|
6403
|
+
var name1 = readTagName(str, index + 1);
|
|
6404
|
+
var after = index + 1 + name1.length;
|
|
6405
|
+
if (name1 !== '' && !WORD_CHAR.test(str.charAt(after))) {
|
|
6406
|
+
if (gt < after) {
|
|
6407
|
+
gt = str.indexOf('>', after);
|
|
6408
|
+
}
|
|
6409
|
+
if (gt === -1) {
|
|
6410
|
+
return false;
|
|
6411
|
+
}
|
|
6412
|
+
var close = lastClose.get(name1);
|
|
6413
|
+
if (close !== undefined && close > gt) {
|
|
6414
|
+
return true;
|
|
6415
|
+
}
|
|
6416
|
+
}
|
|
6417
|
+
index = str.indexOf('<', index + 1);
|
|
6418
|
+
}
|
|
6419
|
+
return false;
|
|
6420
|
+
}
|
|
6291
6421
|
/**
|
|
6292
6422
|
* Check if a string is html or not
|
|
6423
|
+
*
|
|
6424
|
+
* The pasted text is attacker controlled, so the check walks the string with
|
|
6425
|
+
* `indexOf`: the former regex `<(\w+)[^>]*>(.*?)<\/\1>` was quadratic on a
|
|
6426
|
+
* long run of `<a>` and froze the tab.
|
|
6293
6427
|
*/ var isHTML = function isHTML(str) {
|
|
6294
|
-
return (0,_is_string__WEBPACK_IMPORTED_MODULE_0__.isString)(str) &&
|
|
6428
|
+
return (0,_is_string__WEBPACK_IMPORTED_MODULE_0__.isString)(str) && hasElement(str);
|
|
6295
6429
|
};
|
|
6296
6430
|
|
|
6297
6431
|
|
|
@@ -6815,11 +6949,12 @@ var isLicense = function isLicense(license) {
|
|
|
6815
6949
|
/* harmony export */ });
|
|
6816
6950
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
6817
6951
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
6818
|
-
/* harmony import */ var
|
|
6819
|
-
/* harmony import */ var
|
|
6820
|
-
/* harmony import */ var
|
|
6821
|
-
/* harmony import */ var
|
|
6822
|
-
/* harmony import */ var
|
|
6952
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81910);
|
|
6953
|
+
/* harmony import */ var jodit_core_helpers_html_word_lists__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75480);
|
|
6954
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4040);
|
|
6955
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7909);
|
|
6956
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80991);
|
|
6957
|
+
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28723);
|
|
6823
6958
|
/*!
|
|
6824
6959
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6825
6960
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -6833,8 +6968,19 @@ var isLicense = function isLicense(license) {
|
|
|
6833
6968
|
|
|
6834
6969
|
|
|
6835
6970
|
|
|
6971
|
+
|
|
6972
|
+
// Drop the `mso-*` and `border*` declarations and turn pt/cm into px; one declaration at a time, so a long value cannot make the regexes backtrack
|
|
6836
6973
|
function normalizeCSS(s) {
|
|
6837
|
-
|
|
6974
|
+
var declarations = s.split(';');
|
|
6975
|
+
var last = declarations.length - 1;
|
|
6976
|
+
return declarations.filter(function(declaration, index) {
|
|
6977
|
+
var match = /^\s*([a-z-]{1,64})\s*:/i.exec(declaration);
|
|
6978
|
+
if (!match) {
|
|
6979
|
+
return true;
|
|
6980
|
+
}
|
|
6981
|
+
var property = match[1].toLowerCase();
|
|
6982
|
+
return !(property.startsWith('mso-') || property.startsWith('border') && index !== last);
|
|
6983
|
+
}).join(';').replace(/([0-9.]{1,32})(pt|cm)/gi, function(match, units, metrics) {
|
|
6838
6984
|
switch(metrics.toLowerCase()){
|
|
6839
6985
|
case 'pt':
|
|
6840
6986
|
return (parseFloat(units) * 1.328).toFixed(0) + 'px';
|
|
@@ -6856,17 +7002,17 @@ function normalizeCSS(s) {
|
|
|
6856
7002
|
// cell backgrounds/borders, e.g. `.xl31 { background:#FCE4D6 }`) were never
|
|
6857
7003
|
// inlined and all styling was lost once the `<style>` block got stripped.
|
|
6858
7004
|
// See https://github.com/xdan/jodit/issues/1362
|
|
6859
|
-
var
|
|
6860
|
-
if (
|
|
7005
|
+
var open = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_2__.indexOfOpenTag)(html, 'html');
|
|
7006
|
+
if (open === -1) {
|
|
6861
7007
|
return html;
|
|
6862
7008
|
}
|
|
6863
|
-
html = html.substring(
|
|
7009
|
+
html = html.substring(open);
|
|
6864
7010
|
var closeIndex = html.toLowerCase().lastIndexOf('</html>');
|
|
6865
7011
|
if (closeIndex !== -1) {
|
|
6866
7012
|
html = html.substring(0, closeIndex + '</html>'.length);
|
|
6867
7013
|
}
|
|
6868
7014
|
var iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
6869
|
-
(0,
|
|
7015
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(iframe, 'display', 'none');
|
|
6870
7016
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body, iframe);
|
|
6871
7017
|
var convertedString = '', collection;
|
|
6872
7018
|
try {
|
|
@@ -6875,14 +7021,14 @@ function normalizeCSS(s) {
|
|
|
6875
7021
|
iframeDoc.open();
|
|
6876
7022
|
iframeDoc.write(html);
|
|
6877
7023
|
iframeDoc.close();
|
|
6878
|
-
var listItems = (0,
|
|
7024
|
+
var listItems = (0,jodit_core_helpers_html_word_lists__WEBPACK_IMPORTED_MODULE_3__.readWordListItems)(iframeDoc.body);
|
|
6879
7025
|
// Word marks its auto-generated list markers (the literal
|
|
6880
7026
|
// bullet/number, e.g. `1.` or `·`) with `mso-list:Ignore`.
|
|
6881
7027
|
// They are display-only and must not be imported, otherwise
|
|
6882
7028
|
// the marker text leaks into the content. Drop them before any
|
|
6883
7029
|
// style normalization strips the `mso-list` hint. See #948
|
|
6884
7030
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, function(node) {
|
|
6885
|
-
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,
|
|
7031
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style') || '')) {
|
|
6886
7032
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
|
|
6887
7033
|
}
|
|
6888
7034
|
});
|
|
@@ -6892,7 +7038,7 @@ function normalizeCSS(s) {
|
|
|
6892
7038
|
if (rules[idx].selectorText === '') {
|
|
6893
7039
|
return "continue";
|
|
6894
7040
|
}
|
|
6895
|
-
collection = (0,
|
|
7041
|
+
collection = (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_7__.$$)(rules[idx].selectorText, iframeDoc.body);
|
|
6896
7042
|
// `style.cssText` on purpose: the CSSOM parses the text,
|
|
6897
7043
|
// drops invalid declarations and re-serializes it. The raw
|
|
6898
7044
|
// `style` attribute would keep Word-only junk verbatim
|
|
@@ -6909,19 +7055,19 @@ function normalizeCSS(s) {
|
|
|
6909
7055
|
throw e;
|
|
6910
7056
|
}
|
|
6911
7057
|
}
|
|
6912
|
-
;(0,
|
|
7058
|
+
;(0,jodit_core_helpers_html_word_lists__WEBPACK_IMPORTED_MODULE_3__.wrapWordListItems)(listItems);
|
|
6913
7059
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, function(node) {
|
|
6914
7060
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node)) {
|
|
6915
|
-
var cssText = (0,
|
|
7061
|
+
var cssText = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style');
|
|
6916
7062
|
if (cssText) {
|
|
6917
7063
|
node.style.cssText = normalizeCSS(cssText);
|
|
6918
7064
|
}
|
|
6919
|
-
if (!(0,
|
|
6920
|
-
(0,
|
|
7065
|
+
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style')) {
|
|
7066
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style', null);
|
|
6921
7067
|
}
|
|
6922
7068
|
}
|
|
6923
7069
|
});
|
|
6924
|
-
convertedString = iframeDoc.firstChild ? (0,
|
|
7070
|
+
convertedString = iframeDoc.firstChild ? (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_4__.trim)(iframeDoc.body.innerHTML) : '';
|
|
6925
7071
|
}
|
|
6926
7072
|
} catch (unused) {} finally{
|
|
6927
7073
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
|
|
@@ -6929,7 +7075,7 @@ function normalizeCSS(s) {
|
|
|
6929
7075
|
if (convertedString) {
|
|
6930
7076
|
html = convertedString;
|
|
6931
7077
|
}
|
|
6932
|
-
return (0,
|
|
7078
|
+
return (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_4__.trim)((0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_2__.removeWordWrappers)(html));
|
|
6933
7079
|
}
|
|
6934
7080
|
|
|
6935
7081
|
|
|
@@ -6945,9 +7091,10 @@ function normalizeCSS(s) {
|
|
|
6945
7091
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
6946
7092
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
6947
7093
|
/* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88475);
|
|
6948
|
-
/* harmony import */ var
|
|
6949
|
-
/* harmony import */ var
|
|
6950
|
-
/* harmony import */ var
|
|
7094
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81910);
|
|
7095
|
+
/* harmony import */ var jodit_core_helpers_html_word_lists__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75480);
|
|
7096
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4040);
|
|
7097
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7909);
|
|
6951
7098
|
/*!
|
|
6952
7099
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6953
7100
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -6960,6 +7107,7 @@ function normalizeCSS(s) {
|
|
|
6960
7107
|
|
|
6961
7108
|
|
|
6962
7109
|
|
|
7110
|
+
|
|
6963
7111
|
/**
|
|
6964
7112
|
* The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
|
|
6965
7113
|
* content that matches the look and feel of the site.
|
|
@@ -6973,7 +7121,7 @@ function normalizeCSS(s) {
|
|
|
6973
7121
|
var div = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
6974
7122
|
div.innerHTML = html;
|
|
6975
7123
|
var marks = [];
|
|
6976
|
-
var listItems = (0,
|
|
7124
|
+
var listItems = (0,jodit_core_helpers_html_word_lists__WEBPACK_IMPORTED_MODULE_4__.readWordListItems)(div);
|
|
6977
7125
|
if (div.firstChild) {
|
|
6978
7126
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.each(div, function(node) {
|
|
6979
7127
|
if (!node) {
|
|
@@ -6998,7 +7146,7 @@ function normalizeCSS(s) {
|
|
|
6998
7146
|
// with `mso-list:Ignore`. They are display-only
|
|
6999
7147
|
// and must not be imported, otherwise the marker
|
|
7000
7148
|
// text leaks into the content. See #948
|
|
7001
|
-
if (/mso-list:\s*ignore/i.test((0,
|
|
7149
|
+
if (/mso-list:\s*ignore/i.test((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_6__.attr)(node, 'style') || '')) {
|
|
7002
7150
|
marks.push(node);
|
|
7003
7151
|
break;
|
|
7004
7152
|
}
|
|
@@ -7012,7 +7160,7 @@ function normalizeCSS(s) {
|
|
|
7012
7160
|
// `attrRaw`: SVG keeps camelCase names
|
|
7013
7161
|
// (`viewBox`), `attr()` would kebab-case
|
|
7014
7162
|
// them and silently skip the removal
|
|
7015
|
-
(0,
|
|
7163
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_6__.attrRaw)(node, attribute.name, null);
|
|
7016
7164
|
}
|
|
7017
7165
|
});
|
|
7018
7166
|
}
|
|
@@ -7025,14 +7173,14 @@ function normalizeCSS(s) {
|
|
|
7025
7173
|
});
|
|
7026
7174
|
}
|
|
7027
7175
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove.apply(null, marks);
|
|
7028
|
-
(0,
|
|
7176
|
+
(0,jodit_core_helpers_html_word_lists__WEBPACK_IMPORTED_MODULE_4__.wrapWordListItems)(listItems);
|
|
7029
7177
|
convertedString = div.innerHTML;
|
|
7030
7178
|
} catch (e) {}
|
|
7031
7179
|
if (convertedString) {
|
|
7032
7180
|
html = convertedString;
|
|
7033
7181
|
}
|
|
7034
|
-
html = html.split(/(\n)/).filter(
|
|
7035
|
-
return
|
|
7182
|
+
html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__.trim).join('\n');
|
|
7183
|
+
return (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_3__.removeWordWrappers)(html);
|
|
7036
7184
|
}
|
|
7037
7185
|
|
|
7038
7186
|
|
|
@@ -7072,10 +7220,17 @@ function normalizeCSS(s) {
|
|
|
7072
7220
|
/* harmony export */ applyStyles: function() { return /* reexport safe */ _apply_styles__WEBPACK_IMPORTED_MODULE_0__.applyStyles; },
|
|
7073
7221
|
/* harmony export */ cleanFromWord: function() { return /* reexport safe */ _clean_from_word__WEBPACK_IMPORTED_MODULE_1__.cleanFromWord; },
|
|
7074
7222
|
/* harmony export */ htmlspecialchars: function() { return /* reexport safe */ _htmlspecialchars__WEBPACK_IMPORTED_MODULE_2__.htmlspecialchars; },
|
|
7223
|
+
/* harmony export */ indexOfClosingTag: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.indexOfClosingTag; },
|
|
7224
|
+
/* harmony export */ indexOfOpenTag: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.indexOfOpenTag; },
|
|
7075
7225
|
/* harmony export */ nl2br: function() { return /* reexport safe */ _nl2br__WEBPACK_IMPORTED_MODULE_3__.nl2br; },
|
|
7226
|
+
/* harmony export */ removeBetween: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.removeBetween; },
|
|
7227
|
+
/* harmony export */ removeEmptyMarkedTags: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.removeEmptyMarkedTags; },
|
|
7228
|
+
/* harmony export */ removeTagsByPrefix: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.removeTagsByPrefix; },
|
|
7229
|
+
/* harmony export */ removeWordWrappers: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.removeWordWrappers; },
|
|
7076
7230
|
/* harmony export */ safeHTML: function() { return /* reexport safe */ _safe_html__WEBPACK_IMPORTED_MODULE_4__.safeHTML; },
|
|
7077
7231
|
/* harmony export */ sanitizeHTMLElement: function() { return /* reexport safe */ _safe_html__WEBPACK_IMPORTED_MODULE_4__.sanitizeHTMLElement; },
|
|
7078
|
-
/* harmony export */ stripTags: function() { return /* reexport safe */ _strip_tags__WEBPACK_IMPORTED_MODULE_5__.stripTags; }
|
|
7232
|
+
/* harmony export */ stripTags: function() { return /* reexport safe */ _strip_tags__WEBPACK_IMPORTED_MODULE_5__.stripTags; },
|
|
7233
|
+
/* harmony export */ unwrapMarkedTags: function() { return /* reexport safe */ _tag_scan__WEBPACK_IMPORTED_MODULE_6__.unwrapMarkedTags; }
|
|
7079
7234
|
/* harmony export */ });
|
|
7080
7235
|
/* harmony import */ var _apply_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30893);
|
|
7081
7236
|
/* harmony import */ var _clean_from_word__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1277);
|
|
@@ -7083,6 +7238,7 @@ function normalizeCSS(s) {
|
|
|
7083
7238
|
/* harmony import */ var _nl2br__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48838);
|
|
7084
7239
|
/* harmony import */ var _safe_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48155);
|
|
7085
7240
|
/* harmony import */ var _strip_tags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22852);
|
|
7241
|
+
/* harmony import */ var _tag_scan__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81910);
|
|
7086
7242
|
/*!
|
|
7087
7243
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7088
7244
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7097,6 +7253,7 @@ function normalizeCSS(s) {
|
|
|
7097
7253
|
|
|
7098
7254
|
|
|
7099
7255
|
|
|
7256
|
+
|
|
7100
7257
|
/***/ }),
|
|
7101
7258
|
|
|
7102
7259
|
/***/ 48838:
|
|
@@ -7531,6 +7688,304 @@ function restoreTags(content) {
|
|
|
7531
7688
|
}
|
|
7532
7689
|
|
|
7533
7690
|
|
|
7691
|
+
/***/ }),
|
|
7692
|
+
|
|
7693
|
+
/***/ 81910:
|
|
7694
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7695
|
+
|
|
7696
|
+
"use strict";
|
|
7697
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7698
|
+
/* harmony export */ indexOfClosingTag: function() { return /* binding */ indexOfClosingTag; },
|
|
7699
|
+
/* harmony export */ indexOfOpenTag: function() { return /* binding */ indexOfOpenTag; },
|
|
7700
|
+
/* harmony export */ removeBetween: function() { return /* binding */ removeBetween; },
|
|
7701
|
+
/* harmony export */ removeEmptyMarkedTags: function() { return /* binding */ removeEmptyMarkedTags; },
|
|
7702
|
+
/* harmony export */ removeTagsByPrefix: function() { return /* binding */ removeTagsByPrefix; },
|
|
7703
|
+
/* harmony export */ removeWordWrappers: function() { return /* binding */ removeWordWrappers; },
|
|
7704
|
+
/* harmony export */ unwrapMarkedTags: function() { return /* binding */ unwrapMarkedTags; }
|
|
7705
|
+
/* harmony export */ });
|
|
7706
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50684);
|
|
7707
|
+
|
|
7708
|
+
/*!
|
|
7709
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7710
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7711
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
7712
|
+
*/ /**
|
|
7713
|
+
* @module helpers/html
|
|
7714
|
+
*/ // Single passes over HTML that comes from the clipboard or the editor value.
|
|
7715
|
+
// A regex with `[^>]*` or `.*?` before a required literal backtracks
|
|
7716
|
+
// quadratically on a long run of tag openers, so these walk with `indexOf`.
|
|
7717
|
+
var TAG_NAME = /[a-z0-9:-]/i;
|
|
7718
|
+
// The tags the Word clean-up strips: `<html>`, `<colgroup>`, `<col>`, `<o:p>` and their closers
|
|
7719
|
+
var WORD_WRAPPER_TAGS = [
|
|
7720
|
+
'<html',
|
|
7721
|
+
'</html',
|
|
7722
|
+
'<col',
|
|
7723
|
+
'</col',
|
|
7724
|
+
'<o:p',
|
|
7725
|
+
'</o:p'
|
|
7726
|
+
];
|
|
7727
|
+
function startsWithIgnoreCase(html, index, prefix) {
|
|
7728
|
+
return html.substr(index, prefix.length).toLowerCase() === prefix;
|
|
7729
|
+
}
|
|
7730
|
+
// The first `<` at or after `from` that opens one of the prefixes (`<meta`, `</html`, `<!--`)
|
|
7731
|
+
function indexOfPrefix(html, prefixes, from) {
|
|
7732
|
+
var index = html.indexOf('<', from);
|
|
7733
|
+
while(index !== -1){
|
|
7734
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7735
|
+
try {
|
|
7736
|
+
for(var _iterator = prefixes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7737
|
+
var prefix = _step.value;
|
|
7738
|
+
if (startsWithIgnoreCase(html, index, prefix)) {
|
|
7739
|
+
return [
|
|
7740
|
+
index,
|
|
7741
|
+
prefix
|
|
7742
|
+
];
|
|
7743
|
+
}
|
|
7744
|
+
}
|
|
7745
|
+
} catch (err) {
|
|
7746
|
+
_didIteratorError = true;
|
|
7747
|
+
_iteratorError = err;
|
|
7748
|
+
} finally{
|
|
7749
|
+
try {
|
|
7750
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7751
|
+
_iterator.return();
|
|
7752
|
+
}
|
|
7753
|
+
} finally{
|
|
7754
|
+
if (_didIteratorError) {
|
|
7755
|
+
throw _iteratorError;
|
|
7756
|
+
}
|
|
7757
|
+
}
|
|
7758
|
+
}
|
|
7759
|
+
index = html.indexOf('<', index + 1);
|
|
7760
|
+
}
|
|
7761
|
+
return [
|
|
7762
|
+
-1,
|
|
7763
|
+
''
|
|
7764
|
+
];
|
|
7765
|
+
}
|
|
7766
|
+
/**
|
|
7767
|
+
* The first `</name>` at or after `from`, case-insensitive, or -1
|
|
7768
|
+
*/ function indexOfClosingTag(html, name, from) {
|
|
7769
|
+
var closing = '</' + name + '>';
|
|
7770
|
+
var index = html.indexOf('</', from);
|
|
7771
|
+
while(index !== -1){
|
|
7772
|
+
if (startsWithIgnoreCase(html, index, closing)) {
|
|
7773
|
+
return index;
|
|
7774
|
+
}
|
|
7775
|
+
index = html.indexOf('</', index + 2);
|
|
7776
|
+
}
|
|
7777
|
+
return -1;
|
|
7778
|
+
}
|
|
7779
|
+
/**
|
|
7780
|
+
* Remove every tag that starts with one of the prefixes, up to its `>`:
|
|
7781
|
+
* `removeTagsByPrefix(html, ['<meta', '<!--'])`
|
|
7782
|
+
*/ function removeTagsByPrefix(html, prefixes) {
|
|
7783
|
+
var lower = prefixes.map(function(prefix) {
|
|
7784
|
+
return prefix.toLowerCase();
|
|
7785
|
+
});
|
|
7786
|
+
var result = '';
|
|
7787
|
+
var cursor = 0;
|
|
7788
|
+
for(;;){
|
|
7789
|
+
var _indexOfPrefix = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(indexOfPrefix(html, lower, cursor), 1), start = _indexOfPrefix[0];
|
|
7790
|
+
if (start === -1) {
|
|
7791
|
+
break;
|
|
7792
|
+
}
|
|
7793
|
+
var end = html.indexOf('>', start);
|
|
7794
|
+
if (end === -1) {
|
|
7795
|
+
break;
|
|
7796
|
+
}
|
|
7797
|
+
result += html.slice(cursor, start);
|
|
7798
|
+
cursor = end + 1;
|
|
7799
|
+
}
|
|
7800
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
7801
|
+
}
|
|
7802
|
+
/**
|
|
7803
|
+
* Strip the Word wrapper tags and then the comments, as the clean-up always did
|
|
7804
|
+
*/ function removeWordWrappers(html) {
|
|
7805
|
+
return removeTagsByPrefix(removeTagsByPrefix(html, WORD_WRAPPER_TAGS), [
|
|
7806
|
+
'<!--'
|
|
7807
|
+
]);
|
|
7808
|
+
}
|
|
7809
|
+
// Every `</name>` position by name, so the closer of an element is found by a binary search
|
|
7810
|
+
function closingTagPositions(html) {
|
|
7811
|
+
var positions = new Map();
|
|
7812
|
+
var index = html.indexOf('</');
|
|
7813
|
+
while(index !== -1){
|
|
7814
|
+
var name = readTagName(html, index + 2).toLowerCase();
|
|
7815
|
+
if (name !== '' && html.charAt(index + 2 + name.length) === '>') {
|
|
7816
|
+
var list = positions.get(name);
|
|
7817
|
+
if (list) {
|
|
7818
|
+
list.push(index);
|
|
7819
|
+
} else {
|
|
7820
|
+
positions.set(name, [
|
|
7821
|
+
index
|
|
7822
|
+
]);
|
|
7823
|
+
}
|
|
7824
|
+
}
|
|
7825
|
+
index = html.indexOf('</', index + 2);
|
|
7826
|
+
}
|
|
7827
|
+
return positions;
|
|
7828
|
+
}
|
|
7829
|
+
// The first position in the sorted list that is >= from, or -1
|
|
7830
|
+
function firstAfter(list, from) {
|
|
7831
|
+
if (!list) {
|
|
7832
|
+
return -1;
|
|
7833
|
+
}
|
|
7834
|
+
var low = 0;
|
|
7835
|
+
var high = list.length;
|
|
7836
|
+
while(low < high){
|
|
7837
|
+
var middle = low + high >> 1;
|
|
7838
|
+
if (list[middle] < from) {
|
|
7839
|
+
low = middle + 1;
|
|
7840
|
+
} else {
|
|
7841
|
+
high = middle;
|
|
7842
|
+
}
|
|
7843
|
+
}
|
|
7844
|
+
return low < list.length ? list[low] : -1;
|
|
7845
|
+
}
|
|
7846
|
+
/**
|
|
7847
|
+
* The index of the first `<name>` or `<name …>` tag, or -1
|
|
7848
|
+
*/ function indexOfOpenTag(html, name) {
|
|
7849
|
+
var prefix = '<' + name.toLowerCase();
|
|
7850
|
+
var cursor = 0;
|
|
7851
|
+
for(;;){
|
|
7852
|
+
var _indexOfPrefix = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(indexOfPrefix(html, [
|
|
7853
|
+
prefix
|
|
7854
|
+
], cursor), 1), start = _indexOfPrefix[0];
|
|
7855
|
+
if (start === -1) {
|
|
7856
|
+
return -1;
|
|
7857
|
+
}
|
|
7858
|
+
var next = html.charAt(start + prefix.length);
|
|
7859
|
+
if (next === '>') {
|
|
7860
|
+
return start;
|
|
7861
|
+
}
|
|
7862
|
+
if (/\s/.test(next)) {
|
|
7863
|
+
if (html.indexOf('>', start) === -1) {
|
|
7864
|
+
return -1;
|
|
7865
|
+
}
|
|
7866
|
+
return start;
|
|
7867
|
+
}
|
|
7868
|
+
cursor = start + 1;
|
|
7869
|
+
}
|
|
7870
|
+
}
|
|
7871
|
+
function readTagName(html, from) {
|
|
7872
|
+
var end = from;
|
|
7873
|
+
while(TAG_NAME.test(html.charAt(end))){
|
|
7874
|
+
end += 1;
|
|
7875
|
+
}
|
|
7876
|
+
return html.slice(from, end);
|
|
7877
|
+
}
|
|
7878
|
+
/**
|
|
7879
|
+
* Replace every `<name … marker …>inner</name>` with `inner`.
|
|
7880
|
+
* `name` null takes any tag; `keep` can refuse an element by its inner HTML.
|
|
7881
|
+
*/ function unwrapMarkedTags(html, name, marker, keep) {
|
|
7882
|
+
var lowerMarker = marker.toLowerCase();
|
|
7883
|
+
var prefixes = [
|
|
7884
|
+
name == null ? '<' : '<' + name.toLowerCase()
|
|
7885
|
+
];
|
|
7886
|
+
var closings = closingTagPositions(html);
|
|
7887
|
+
var result = '';
|
|
7888
|
+
var cursor = 0;
|
|
7889
|
+
for(;;){
|
|
7890
|
+
var _indexOfPrefix = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(indexOfPrefix(html, prefixes, cursor), 1), start = _indexOfPrefix[0];
|
|
7891
|
+
if (start === -1) {
|
|
7892
|
+
break;
|
|
7893
|
+
}
|
|
7894
|
+
var tagName = (name !== null && name !== void 0 ? name : readTagName(html, start + 1)).toLowerCase();
|
|
7895
|
+
var gt = html.indexOf('>', start);
|
|
7896
|
+
if (gt === -1) {
|
|
7897
|
+
break;
|
|
7898
|
+
}
|
|
7899
|
+
var close = tagName !== '' && html.slice(start, gt).toLowerCase().includes(lowerMarker) ? firstAfter(closings.get(tagName), gt + 1) : -1;
|
|
7900
|
+
// Not a marked element: the `<` is text, the next one may still open an element
|
|
7901
|
+
if (close === -1) {
|
|
7902
|
+
result += html.slice(cursor, start + 1);
|
|
7903
|
+
cursor = start + 1;
|
|
7904
|
+
continue;
|
|
7905
|
+
}
|
|
7906
|
+
var inner = html.slice(gt + 1, close);
|
|
7907
|
+
var after = close + tagName.length + 3;
|
|
7908
|
+
result += html.slice(cursor, start);
|
|
7909
|
+
result += inner !== '' && (!keep || keep(inner)) ? inner : html.slice(start, after);
|
|
7910
|
+
cursor = after;
|
|
7911
|
+
}
|
|
7912
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
7913
|
+
}
|
|
7914
|
+
// The first `literal` at or after `from`, case-insensitive, or -1
|
|
7915
|
+
function indexOfLiteral(html, literal, from) {
|
|
7916
|
+
var head = literal.charAt(0);
|
|
7917
|
+
var index = html.indexOf(head, from);
|
|
7918
|
+
while(index !== -1){
|
|
7919
|
+
if (startsWithIgnoreCase(html, index, literal)) {
|
|
7920
|
+
return index;
|
|
7921
|
+
}
|
|
7922
|
+
index = html.indexOf(head, index + 1);
|
|
7923
|
+
}
|
|
7924
|
+
return -1;
|
|
7925
|
+
}
|
|
7926
|
+
/**
|
|
7927
|
+
* Remove every `open … openEnd … close` block whose opener holds `marker` (any opener when it is ''):
|
|
7928
|
+
* `removeBetween(html, '<style', '>', '</style>', 'jodit-box')`
|
|
7929
|
+
*/ function removeBetween(html, open, openEnd, close) {
|
|
7930
|
+
var marker = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : '';
|
|
7931
|
+
var lowerOpen = open.toLowerCase();
|
|
7932
|
+
var lowerMarker = marker.toLowerCase();
|
|
7933
|
+
var result = '';
|
|
7934
|
+
var cursor = 0;
|
|
7935
|
+
for(;;){
|
|
7936
|
+
var start = indexOfLiteral(html, lowerOpen, cursor);
|
|
7937
|
+
if (start === -1) {
|
|
7938
|
+
break;
|
|
7939
|
+
}
|
|
7940
|
+
var end = indexOfLiteral(html, openEnd, start + open.length);
|
|
7941
|
+
if (end === -1) {
|
|
7942
|
+
break;
|
|
7943
|
+
}
|
|
7944
|
+
if (lowerMarker !== '' && !html.slice(start, end).toLowerCase().includes(lowerMarker)) {
|
|
7945
|
+
result += html.slice(cursor, end + openEnd.length);
|
|
7946
|
+
cursor = end + openEnd.length;
|
|
7947
|
+
continue;
|
|
7948
|
+
}
|
|
7949
|
+
var closeIndex = indexOfLiteral(html, close, end + openEnd.length);
|
|
7950
|
+
if (closeIndex === -1) {
|
|
7951
|
+
break;
|
|
7952
|
+
}
|
|
7953
|
+
result += html.slice(cursor, start);
|
|
7954
|
+
cursor = closeIndex + close.length;
|
|
7955
|
+
}
|
|
7956
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
7957
|
+
}
|
|
7958
|
+
/**
|
|
7959
|
+
* Remove every empty `<name … marker …></name>` element
|
|
7960
|
+
*/ function removeEmptyMarkedTags(html, name, marker) {
|
|
7961
|
+
var lowerName = name.toLowerCase();
|
|
7962
|
+
var lowerMarker = marker.toLowerCase();
|
|
7963
|
+
var closing = '</' + lowerName + '>';
|
|
7964
|
+
var result = '';
|
|
7965
|
+
var cursor = 0;
|
|
7966
|
+
for(;;){
|
|
7967
|
+
var _indexOfPrefix = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(indexOfPrefix(html, [
|
|
7968
|
+
'<' + lowerName
|
|
7969
|
+
], cursor), 1), start = _indexOfPrefix[0];
|
|
7970
|
+
if (start === -1) {
|
|
7971
|
+
break;
|
|
7972
|
+
}
|
|
7973
|
+
var gt = html.indexOf('>', start);
|
|
7974
|
+
if (gt === -1) {
|
|
7975
|
+
break;
|
|
7976
|
+
}
|
|
7977
|
+
if (html.slice(start, gt).toLowerCase().includes(lowerMarker) && startsWithIgnoreCase(html, gt + 1, closing)) {
|
|
7978
|
+
result += html.slice(cursor, start);
|
|
7979
|
+
cursor = gt + 1 + closing.length;
|
|
7980
|
+
continue;
|
|
7981
|
+
}
|
|
7982
|
+
result += html.slice(cursor, gt + 1);
|
|
7983
|
+
cursor = gt + 1;
|
|
7984
|
+
}
|
|
7985
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
7986
|
+
}
|
|
7987
|
+
|
|
7988
|
+
|
|
7534
7989
|
/***/ }),
|
|
7535
7990
|
|
|
7536
7991
|
/***/ 75480:
|
|
@@ -7737,6 +8192,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7737
8192
|
/* harmony export */ hasContainer: function() { return /* reexport safe */ _checker__WEBPACK_IMPORTED_MODULE_2__.hasContainer; },
|
|
7738
8193
|
/* harmony export */ htmlspecialchars: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars; },
|
|
7739
8194
|
/* harmony export */ i18n: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.i18n; },
|
|
8195
|
+
/* harmony export */ indexOfClosingTag: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.indexOfClosingTag; },
|
|
8196
|
+
/* harmony export */ indexOfOpenTag: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.indexOfOpenTag; },
|
|
7740
8197
|
/* harmony export */ innerWidth: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.innerWidth; },
|
|
7741
8198
|
/* harmony export */ isAbortError: function() { return /* reexport safe */ _checker__WEBPACK_IMPORTED_MODULE_2__.isAbortError; },
|
|
7742
8199
|
/* harmony export */ isArray: function() { return /* reexport safe */ _checker__WEBPACK_IMPORTED_MODULE_2__.isArray; },
|
|
@@ -7778,6 +8235,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7778
8235
|
/* harmony export */ normalizeUrl: function() { return /* reexport safe */ _normalize__WEBPACK_IMPORTED_MODULE_5__.normalizeUrl; },
|
|
7779
8236
|
/* harmony export */ offset: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.offset; },
|
|
7780
8237
|
/* harmony export */ position: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.position; },
|
|
8238
|
+
/* harmony export */ removeBetween: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.removeBetween; },
|
|
8239
|
+
/* harmony export */ removeEmptyMarkedTags: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.removeEmptyMarkedTags; },
|
|
8240
|
+
/* harmony export */ removeTagsByPrefix: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.removeTagsByPrefix; },
|
|
8241
|
+
/* harmony export */ removeWordWrappers: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.removeWordWrappers; },
|
|
7781
8242
|
/* harmony export */ safeHTML: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.safeHTML; },
|
|
7782
8243
|
/* harmony export */ sanitizeHTMLElement: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.sanitizeHTMLElement; },
|
|
7783
8244
|
/* harmony export */ setTimeout: function() { return /* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_1__.setTimeout; },
|
|
@@ -7790,7 +8251,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7790
8251
|
/* harmony export */ trim: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.trim; },
|
|
7791
8252
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
|
|
7792
8253
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
|
|
7793
|
-
/* harmony export */
|
|
8254
|
+
/* harmony export */ trimInvEnd: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.trimInvEnd; },
|
|
8255
|
+
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
|
|
8256
|
+
/* harmony export */ unwrapMarkedTags: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.unwrapMarkedTags; }
|
|
7794
8257
|
/* harmony export */ });
|
|
7795
8258
|
/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45664);
|
|
7796
8259
|
/* harmony import */ var _async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61077);
|
|
@@ -7802,7 +8265,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7802
8265
|
/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97642);
|
|
7803
8266
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(93640);
|
|
7804
8267
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
7805
|
-
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getFixedPositionOffset","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _utils__WEBPACK_IMPORTED_MODULE_8__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
8268
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","indexOfClosingTag","indexOfOpenTag","nl2br","removeBetween","removeEmptyMarkedTags","removeTagsByPrefix","removeWordWrappers","safeHTML","sanitizeHTMLElement","stripTags","unwrapMarkedTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getFixedPositionOffset","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","trimInvEnd","ucfirst"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _utils__WEBPACK_IMPORTED_MODULE_8__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
7806
8269
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
7807
8270
|
/*!
|
|
7808
8271
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
@@ -8710,6 +9173,7 @@ function size(subject) {
|
|
|
8710
9173
|
/* harmony export */ trim: function() { return /* reexport safe */ _trim__WEBPACK_IMPORTED_MODULE_5__.trim; },
|
|
8711
9174
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _trim__WEBPACK_IMPORTED_MODULE_5__.trimChars; },
|
|
8712
9175
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _trim__WEBPACK_IMPORTED_MODULE_5__.trimInv; },
|
|
9176
|
+
/* harmony export */ trimInvEnd: function() { return /* reexport safe */ _trim__WEBPACK_IMPORTED_MODULE_5__.trimInvEnd; },
|
|
8713
9177
|
/* harmony export */ ucfirst: function() { return /* reexport safe */ _ucfirst__WEBPACK_IMPORTED_MODULE_6__.ucfirst; }
|
|
8714
9178
|
/* harmony export */ });
|
|
8715
9179
|
/* harmony import */ var _camel_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57821);
|
|
@@ -8809,29 +9273,51 @@ var CamelCaseToKebabCase = function CamelCaseToKebabCase(key) {
|
|
|
8809
9273
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8810
9274
|
/* harmony export */ trim: function() { return /* binding */ trim; },
|
|
8811
9275
|
/* harmony export */ trimChars: function() { return /* binding */ trimChars; },
|
|
8812
|
-
/* harmony export */ trimInv: function() { return /* binding */ trimInv; }
|
|
9276
|
+
/* harmony export */ trimInv: function() { return /* binding */ trimInv; },
|
|
9277
|
+
/* harmony export */ trimInvEnd: function() { return /* binding */ trimInvEnd; }
|
|
8813
9278
|
/* harmony export */ });
|
|
8814
|
-
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
8815
9279
|
/*!
|
|
8816
9280
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8817
9281
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8818
9282
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
8819
9283
|
*/ /**
|
|
8820
9284
|
* @module helpers/string
|
|
8821
|
-
*/
|
|
9285
|
+
*/ var SPACE = /[\s\u200b]/;
|
|
9286
|
+
var INVISIBLE = /\uFEFF/;
|
|
9287
|
+
// Cut the chars matching `char` from both ends; `[…]+$` backtracks on a long run that is not at the end
|
|
9288
|
+
function trimBy(value, char) {
|
|
9289
|
+
var start = 0;
|
|
9290
|
+
var end = value.length;
|
|
9291
|
+
while(start < end && char.test(value.charAt(start))){
|
|
9292
|
+
start += 1;
|
|
9293
|
+
}
|
|
9294
|
+
while(end > start && char.test(value.charAt(end - 1))){
|
|
9295
|
+
end -= 1;
|
|
9296
|
+
}
|
|
9297
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
9298
|
+
}
|
|
8822
9299
|
/**
|
|
8823
9300
|
* It clears the line of all auxiliary invisible characters , from the spaces and line breaks , tabs
|
|
8824
9301
|
* from the beginning and end of the line
|
|
8825
9302
|
*/ function trim(value) {
|
|
8826
|
-
return value
|
|
9303
|
+
return trimBy(value, SPACE);
|
|
8827
9304
|
}
|
|
8828
9305
|
function trimChars(value, chars) {
|
|
8829
|
-
return value
|
|
9306
|
+
return trimBy(value, RegExp("[".concat(chars, "]")));
|
|
8830
9307
|
}
|
|
8831
9308
|
/**
|
|
8832
9309
|
* Trim only invisible chars
|
|
8833
9310
|
*/ function trimInv(value) {
|
|
8834
|
-
return value
|
|
9311
|
+
return trimBy(value, INVISIBLE);
|
|
9312
|
+
}
|
|
9313
|
+
/**
|
|
9314
|
+
* Without the invisible chars at the end
|
|
9315
|
+
*/ function trimInvEnd(value) {
|
|
9316
|
+
var end = value.length;
|
|
9317
|
+
while(end > 0 && INVISIBLE.test(value.charAt(end - 1))){
|
|
9318
|
+
end -= 1;
|
|
9319
|
+
}
|
|
9320
|
+
return end === value.length ? value : value.slice(0, end);
|
|
8835
9321
|
}
|
|
8836
9322
|
|
|
8837
9323
|
|
|
@@ -12674,18 +13160,19 @@ function usable(ranges, shadowRoot) {
|
|
|
12674
13160
|
|
|
12675
13161
|
"use strict";
|
|
12676
13162
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12677
|
-
/* harmony export */ composedRanges: function() { return /* reexport safe */
|
|
13163
|
+
/* harmony export */ composedRanges: function() { return /* reexport safe */ _composed_ranges__WEBPACK_IMPORTED_MODULE_3__.composedRanges; },
|
|
12678
13164
|
/* harmony export */ cursorInTheEdgeOfString: function() { return /* binding */ cursorInTheEdgeOfString; },
|
|
12679
13165
|
/* harmony export */ findCorrectCurrentNode: function() { return /* binding */ findCorrectCurrentNode; },
|
|
12680
|
-
/* harmony export */ isMoved: function() { return /* reexport safe */
|
|
12681
|
-
/* harmony export */ moveNodeInsideStart: function() { return /* reexport safe */
|
|
13166
|
+
/* harmony export */ isMoved: function() { return /* reexport safe */ _is_moved__WEBPACK_IMPORTED_MODULE_4__.isMoved; },
|
|
13167
|
+
/* harmony export */ moveNodeInsideStart: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_5__.moveNodeInsideStart; }
|
|
12682
13168
|
/* harmony export */ });
|
|
12683
13169
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
12684
13170
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
12685
|
-
/* harmony import */ var
|
|
12686
|
-
/* harmony import */ var
|
|
12687
|
-
/* harmony import */ var
|
|
12688
|
-
/* harmony import */ var
|
|
13171
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4040);
|
|
13172
|
+
/* harmony import */ var _composed_ranges__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43134);
|
|
13173
|
+
/* harmony import */ var _is_moved__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90657);
|
|
13174
|
+
/* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89817);
|
|
13175
|
+
/* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7470);
|
|
12689
13176
|
/*!
|
|
12690
13177
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
12691
13178
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -12698,6 +13185,7 @@ function usable(ranges, shadowRoot) {
|
|
|
12698
13185
|
|
|
12699
13186
|
|
|
12700
13187
|
|
|
13188
|
+
|
|
12701
13189
|
/**
|
|
12702
13190
|
* Despite the name, returns `true` when the cursor is NOT at the checked edge
|
|
12703
13191
|
* of the text node: there is significant (non invisible-space) text between
|
|
@@ -12706,7 +13194,7 @@ function usable(ranges, shadowRoot) {
|
|
|
12706
13194
|
*/ function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
12707
13195
|
var _container_nodeValue;
|
|
12708
13196
|
var text = ((_container_nodeValue = container.nodeValue) === null || _container_nodeValue === void 0 ? void 0 : _container_nodeValue.length) ? container.nodeValue : '';
|
|
12709
|
-
if (end &&
|
|
13197
|
+
if (end && (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__.trimInvEnd)(text).length > offset) {
|
|
12710
13198
|
return true;
|
|
12711
13199
|
}
|
|
12712
13200
|
var inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
|
|
@@ -18569,7 +19057,7 @@ var UITooltip = /*#__PURE__*/ function(UIElement) {
|
|
|
18569
19057
|
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UITooltip, [
|
|
18570
19058
|
view
|
|
18571
19059
|
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__isOpened", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__attachedContainers", new Set()), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__listenClose", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__currentTarget", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__delayShowTimeout", 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__hideTimeout", 0);
|
|
18572
|
-
if (
|
|
19060
|
+
if (_this.__isEnabled) {
|
|
18573
19061
|
_this.j.e.on('getContainer', function(box) {
|
|
18574
19062
|
_this.__onAttach(box);
|
|
18575
19063
|
});
|
|
@@ -18592,6 +19080,24 @@ var UITooltip = /*#__PURE__*/ function(UIElement) {
|
|
|
18592
19080
|
return '<div><div class="&__content"></div></div>';
|
|
18593
19081
|
}
|
|
18594
19082
|
},
|
|
19083
|
+
{
|
|
19084
|
+
key: "__isEnabled",
|
|
19085
|
+
get: function get() {
|
|
19086
|
+
var o = this.j.o;
|
|
19087
|
+
return !o.textIcons && Boolean(o.showTooltip) && !o.useNativeTooltip;
|
|
19088
|
+
}
|
|
19089
|
+
},
|
|
19090
|
+
{
|
|
19091
|
+
/**
|
|
19092
|
+
* Show tooltips for the buttons in an element outside the editor's
|
|
19093
|
+
* container, such as a toolbar placed by the `toolbar` option
|
|
19094
|
+
*/ key: "attach",
|
|
19095
|
+
value: function attach(container) {
|
|
19096
|
+
if (this.__isEnabled) {
|
|
19097
|
+
this.__onAttach(container);
|
|
19098
|
+
}
|
|
19099
|
+
}
|
|
19100
|
+
},
|
|
18595
19101
|
{
|
|
18596
19102
|
key: "__onAttach",
|
|
18597
19103
|
value: function __onAttach(container) {
|
|
@@ -21854,7 +22360,12 @@ var ViewWithToolbar = /*#__PURE__*/ function(View) {
|
|
|
21854
22360
|
return;
|
|
21855
22361
|
}
|
|
21856
22362
|
var buttons = this.o.buttons ? (0,jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_13__.splitArray)(this.o.buttons) : [];
|
|
21857
|
-
|
|
22363
|
+
var container = this.toolbarContainer;
|
|
22364
|
+
(_this_toolbar = this.toolbar) === null || _this_toolbar === void 0 ? void 0 : _this_toolbar.setRemoveButtons(this.o.removeButtons).build(buttons.concat(this.o.extraButtons || [])).appendTo(container);
|
|
22365
|
+
// The toolbar's own element, as editors can share the one it is placed in
|
|
22366
|
+
if (this.toolbar && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_12__.Dom.isOrContains(this.container, container)) {
|
|
22367
|
+
this.__tooltip.attach(this.toolbar.container);
|
|
22368
|
+
}
|
|
21858
22369
|
}
|
|
21859
22370
|
},
|
|
21860
22371
|
{
|
|
@@ -22409,11 +22920,12 @@ View.defaultOptions = {
|
|
|
22409
22920
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(84839);
|
|
22410
22921
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28077);
|
|
22411
22922
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(65946);
|
|
22412
|
-
/* harmony import */ var
|
|
22413
|
-
/* harmony import */ var
|
|
22414
|
-
/* harmony import */ var
|
|
22415
|
-
/* harmony import */ var
|
|
22416
|
-
/* harmony import */ var
|
|
22923
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(81910);
|
|
22924
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(80991);
|
|
22925
|
+
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(73714);
|
|
22926
|
+
/* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(80512);
|
|
22927
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(5266);
|
|
22928
|
+
/* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(60936);
|
|
22417
22929
|
/*!
|
|
22418
22930
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
22419
22931
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -22442,6 +22954,7 @@ View.defaultOptions = {
|
|
|
22442
22954
|
|
|
22443
22955
|
|
|
22444
22956
|
|
|
22957
|
+
|
|
22445
22958
|
|
|
22446
22959
|
|
|
22447
22960
|
var FOCUS_EVENTS = new Set([
|
|
@@ -22474,7 +22987,7 @@ var NOEDIT = {
|
|
|
22474
22987
|
* `alignClasses.img` when that isn't set
|
|
22475
22988
|
*/ function makeOptions(options) {
|
|
22476
22989
|
var _opt_alignClasses;
|
|
22477
|
-
var opt = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)(options || {},
|
|
22990
|
+
var opt = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions);
|
|
22478
22991
|
if (opt.imageAlignClasses && !((_opt_alignClasses = opt.alignClasses) === null || _opt_alignClasses === void 0 ? void 0 : _opt_alignClasses.img)) {
|
|
22479
22992
|
opt.alignClasses = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)({
|
|
22480
22993
|
img: opt.imageAlignClasses
|
|
@@ -22518,7 +23031,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22518
23031
|
_this.destruct();
|
|
22519
23032
|
throw e;
|
|
22520
23033
|
}
|
|
22521
|
-
_this.setStatus(
|
|
23034
|
+
_this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.STATUSES.beforeInit);
|
|
22522
23035
|
_this.id = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.resolveElement)(element, _this.o.shadowRoot || _this.od), 'id') || new Date().getTime().toString();
|
|
22523
23036
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.instances[_this.id] = _this;
|
|
22524
23037
|
_this.attachEvents(options);
|
|
@@ -22528,7 +23041,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22528
23041
|
}
|
|
22529
23042
|
});
|
|
22530
23043
|
_this.e.on('prepareWYSIWYGEditor', _this.__prepareWYSIWYGEditor);
|
|
22531
|
-
_this.selection = new
|
|
23044
|
+
_this.selection = new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Selection(_this);
|
|
22532
23045
|
var beforeInitHookResult = _this.beforeInitHook();
|
|
22533
23046
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.callPromise)(beforeInitHookResult, function() {
|
|
22534
23047
|
if (_this.isInDestruct) {
|
|
@@ -22552,7 +23065,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22552
23065
|
_this.e.fire('afterInit', _this);
|
|
22553
23066
|
}
|
|
22554
23067
|
;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.callPromise)(_this.afterInitHook());
|
|
22555
|
-
_this.setStatus(
|
|
23068
|
+
_this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.STATUSES.ready);
|
|
22556
23069
|
_this.e.fire('afterConstructor', _this);
|
|
22557
23070
|
};
|
|
22558
23071
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.callPromise)(addPlaceResult, init);
|
|
@@ -22609,14 +23122,14 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22609
23122
|
* Return a default timeout period in milliseconds for some debounce or throttle functions.
|
|
22610
23123
|
* By default, `{history.timeout}` options
|
|
22611
23124
|
*/ function get() {
|
|
22612
|
-
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.isNumber)(this.o.defaultTimeout) ? this.o.defaultTimeout :
|
|
23125
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.isNumber)(this.o.defaultTimeout) ? this.o.defaultTimeout : jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions.defaultTimeout;
|
|
22613
23126
|
}
|
|
22614
23127
|
},
|
|
22615
23128
|
{
|
|
22616
23129
|
key: "createInside",
|
|
22617
23130
|
get: function get() {
|
|
22618
23131
|
var _this = this;
|
|
22619
|
-
return new
|
|
23132
|
+
return new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Create(function() {
|
|
22620
23133
|
return _this.ed;
|
|
22621
23134
|
}, this.o.createAttributes);
|
|
22622
23135
|
}
|
|
@@ -22891,7 +23404,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22891
23404
|
}
|
|
22892
23405
|
value = this.getNativeEditorValue().replace(jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
22893
23406
|
if (removeSelectionMarkers) {
|
|
22894
|
-
value =
|
|
23407
|
+
value = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_16__.removeEmptyMarkedTags)(value, 'span', 'id="jodit-selection_marker_');
|
|
22895
23408
|
}
|
|
22896
23409
|
if (value === '<br>') {
|
|
22897
23410
|
value = '';
|
|
@@ -23281,7 +23794,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23281
23794
|
return this.getMode();
|
|
23282
23795
|
}
|
|
23283
23796
|
var active = this.od.activeElement;
|
|
23284
|
-
if (active && (active === this.iframe ||
|
|
23797
|
+
if (active && (active === this.iframe || jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.isOrContains(this.editor, active) || jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.isOrContains(this.toolbar.container, active))) {
|
|
23285
23798
|
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.MODE_WYSIWYG;
|
|
23286
23799
|
}
|
|
23287
23800
|
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.MODE_SOURCE;
|
|
@@ -23475,7 +23988,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23475
23988
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.toArray)(element.attributes).forEach(function(attr) {
|
|
23476
23989
|
var name = attr.name;
|
|
23477
23990
|
var value = attr.value;
|
|
23478
|
-
if (
|
|
23991
|
+
if (jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions[name] !== undefined && (!options || options[name] === undefined)) {
|
|
23479
23992
|
if ([
|
|
23480
23993
|
'readonly',
|
|
23481
23994
|
'disabled'
|
|
@@ -23512,7 +24025,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23512
24025
|
container = element;
|
|
23513
24026
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)(element, __defaultClassesKey, element.className.toString());
|
|
23514
24027
|
buffer = container.innerHTML;
|
|
23515
|
-
|
|
24028
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.detach(container);
|
|
23516
24029
|
}
|
|
23517
24030
|
container.classList.add('jodit_inline');
|
|
23518
24031
|
container.classList.add('jodit-container');
|
|
@@ -23520,7 +24033,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23520
24033
|
// actual for inline mode
|
|
23521
24034
|
if (element !== container) {
|
|
23522
24035
|
// hide source element
|
|
23523
|
-
var display = (0,
|
|
24036
|
+
var display = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_17__.cssInline)(element, 'display');
|
|
23524
24037
|
if (display) {
|
|
23525
24038
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)(element, __defaultStyleDisplayKey, display);
|
|
23526
24039
|
}
|
|
@@ -23532,21 +24045,21 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23532
24045
|
// the toolbar box below it when (re)attaching the toolbar container.
|
|
23533
24046
|
var aboveSlot = this.c.div(this.getFullElName(SLOT, 'above'), NOEDIT);
|
|
23534
24047
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)(aboveSlot, 'data-jodit-above-toolbar', '');
|
|
23535
|
-
|
|
24048
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.appendChildFirst(container, aboveSlot);
|
|
23536
24049
|
var topSlot = this.c.div(this.getFullElName(SLOT, 'top'), NOEDIT);
|
|
23537
|
-
|
|
24050
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(container, topSlot);
|
|
23538
24051
|
var centerSlot = this.c.div(this.getFullElName(SLOT, 'center'), NOEDIT);
|
|
23539
24052
|
var workplace = this.c.div('jodit-workplace', NOEDIT);
|
|
23540
24053
|
var leftSlot = this.c.div(this.getFullElName(SLOT, 'left'), NOEDIT);
|
|
23541
24054
|
var rightSlot = this.c.div(this.getFullElName(SLOT, 'right'), NOEDIT);
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
24055
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(centerSlot, leftSlot);
|
|
24056
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(centerSlot, workplace);
|
|
24057
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(centerSlot, rightSlot);
|
|
24058
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(container, centerSlot);
|
|
23546
24059
|
var bottomPanel = this.c.div(this.getFullElName(SLOT, 'bottom'), NOEDIT);
|
|
23547
|
-
|
|
24060
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(container, bottomPanel);
|
|
23548
24061
|
if (element.parentNode && element !== container) {
|
|
23549
|
-
|
|
24062
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.before(element, container);
|
|
23550
24063
|
}
|
|
23551
24064
|
Object.defineProperty(element, 'component', {
|
|
23552
24065
|
enumerable: false,
|
|
@@ -23558,7 +24071,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23558
24071
|
'aria-disabled': false,
|
|
23559
24072
|
tabindex: this.o.tabIndex
|
|
23560
24073
|
});
|
|
23561
|
-
|
|
24074
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(workplace, editor);
|
|
23562
24075
|
var currentPlace = {
|
|
23563
24076
|
editor: editor,
|
|
23564
24077
|
element: element,
|
|
@@ -23572,9 +24085,9 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23572
24085
|
left: leftSlot,
|
|
23573
24086
|
right: rightSlot
|
|
23574
24087
|
},
|
|
23575
|
-
statusbar: new
|
|
24088
|
+
statusbar: new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.StatusBar(this, container),
|
|
23576
24089
|
options: this.isReady ? makeOptions(options) : this.options,
|
|
23577
|
-
history: new
|
|
24090
|
+
history: new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.History(this),
|
|
23578
24091
|
editorWindow: this.ow
|
|
23579
24092
|
};
|
|
23580
24093
|
this.__elementToPlace.set(editor, currentPlace);
|
|
@@ -23610,7 +24123,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23610
24123
|
{
|
|
23611
24124
|
key: "addDisclaimer",
|
|
23612
24125
|
value: function addDisclaimer(elm) {
|
|
23613
|
-
|
|
24126
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(this.workplace, elm);
|
|
23614
24127
|
}
|
|
23615
24128
|
},
|
|
23616
24129
|
{
|
|
@@ -23684,7 +24197,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23684
24197
|
return;
|
|
23685
24198
|
}
|
|
23686
24199
|
if (stayDefault === false || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.isPromise)(stayDefault)) {
|
|
23687
|
-
|
|
24200
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(defaultEditorArea);
|
|
23688
24201
|
}
|
|
23689
24202
|
addClassNames(_this.o.editorClassName, _this.editor);
|
|
23690
24203
|
if (_this.o.style) {
|
|
@@ -23739,7 +24252,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23739
24252
|
// and such an element stays in the editor
|
|
23740
24253
|
if (FOCUS_EVENTS.has(type)) {
|
|
23741
24254
|
var inner = type === 'focusin' || type === 'focusout';
|
|
23742
|
-
if (inner === (event.target === editor) ||
|
|
24255
|
+
if (inner === (event.target === editor) || jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.isOrContains(editor, event.relatedTarget)) {
|
|
23743
24256
|
return;
|
|
23744
24257
|
}
|
|
23745
24258
|
if (inner) {
|
|
@@ -23780,7 +24293,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23780
24293
|
key: "fetch",
|
|
23781
24294
|
value: function fetch(url, options) {
|
|
23782
24295
|
var _this = this;
|
|
23783
|
-
var ajax = new
|
|
24296
|
+
var ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_18__.Ajax((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_8__._)({
|
|
23784
24297
|
url: url
|
|
23785
24298
|
}, options), this.o.defaultAjaxOptions);
|
|
23786
24299
|
var destroy = function destroy1() {
|
|
@@ -23807,7 +24320,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23807
24320
|
if (this.isInDestruct) {
|
|
23808
24321
|
return;
|
|
23809
24322
|
}
|
|
23810
|
-
this.setStatus(
|
|
24323
|
+
this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.STATUSES.beforeDestruct);
|
|
23811
24324
|
this.__elementToPlace.clear();
|
|
23812
24325
|
(_cached = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.cached)(this, 'storage')) === null || _cached === void 0 ? void 0 : _cached.clear();
|
|
23813
24326
|
(_cached1 = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.cached)(this, 'buffer')) === null || _cached1 === void 0 ? void 0 : _cached1.clear();
|
|
@@ -23846,17 +24359,17 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23846
24359
|
_this.e.off(container);
|
|
23847
24360
|
_this.e.off(element);
|
|
23848
24361
|
_this.e.off(editor);
|
|
23849
|
-
|
|
23850
|
-
|
|
24362
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(workplace);
|
|
24363
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(editor);
|
|
23851
24364
|
if (container !== element) {
|
|
23852
|
-
|
|
24365
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(container);
|
|
23853
24366
|
}
|
|
23854
24367
|
Object.defineProperty(element, 'component', {
|
|
23855
24368
|
enumerable: false,
|
|
23856
24369
|
configurable: true,
|
|
23857
24370
|
value: null
|
|
23858
24371
|
});
|
|
23859
|
-
|
|
24372
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(iframe);
|
|
23860
24373
|
// inline mode
|
|
23861
24374
|
if (container === element) {
|
|
23862
24375
|
element.innerHTML = tmpValue;
|
|
@@ -23919,7 +24432,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23919
24432
|
get: /**
|
|
23920
24433
|
* Default settings
|
|
23921
24434
|
*/ function get() {
|
|
23922
|
-
return
|
|
24435
|
+
return jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions;
|
|
23923
24436
|
}
|
|
23924
24437
|
},
|
|
23925
24438
|
{
|
|
@@ -23972,7 +24485,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23972
24485
|
}
|
|
23973
24486
|
]);
|
|
23974
24487
|
return Jodit;
|
|
23975
|
-
}(
|
|
24488
|
+
}(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.ViewWithToolbar);
|
|
23976
24489
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "fatMode", jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.FAT_MODE);
|
|
23977
24490
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "plugins", jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.pluginSystem);
|
|
23978
24491
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "modules", jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.modules);
|
|
@@ -23982,7 +24495,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23982
24495
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "instances", jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.instances);
|
|
23983
24496
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "lang", jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.lang);
|
|
23984
24497
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "core", {
|
|
23985
|
-
Plugin:
|
|
24498
|
+
Plugin: jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Plugin
|
|
23986
24499
|
});
|
|
23987
24500
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__._)([
|
|
23988
24501
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.cache
|
|
@@ -24009,7 +24522,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
24009
24522
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.autobind
|
|
24010
24523
|
], Jodit.prototype, "__prepareWYSIWYGEditor", null);
|
|
24011
24524
|
Jodit = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__._)([
|
|
24012
|
-
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.derive)(
|
|
24525
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_19__.Dlgs)
|
|
24013
24526
|
], Jodit);
|
|
24014
24527
|
function addClassNames(className, elm) {
|
|
24015
24528
|
if (className) {
|
|
@@ -33758,7 +34271,7 @@ var ns = 'addnewline';
|
|
|
33758
34271
|
return elm != null && jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.isBlock(elm) && !/^(img|table|iframe|hr)$/i.test(elm.nodeName);
|
|
33759
34272
|
}), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__onClickLine", function(e) {
|
|
33760
34273
|
var editor = _this.j;
|
|
33761
|
-
var p =
|
|
34274
|
+
var p = _this.__newLine();
|
|
33762
34275
|
if (_this.__isBeforeContent && _this.__current && _this.__current.parentNode) {
|
|
33763
34276
|
if (_this.__current === editor.editor) {
|
|
33764
34277
|
jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.prepend(editor.editor, p);
|
|
@@ -33841,6 +34354,20 @@ var ns = 'addnewline';
|
|
|
33841
34354
|
], 'scroll' + '.' + ns, this.__hideForce).on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce).on(editor.editor, 'click' + '.' + ns, this.__hide).on(editor.container, 'mouseleave' + '.' + ns, this.__hide).on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
|
|
33842
34355
|
}
|
|
33843
34356
|
},
|
|
34357
|
+
{
|
|
34358
|
+
key: "__newLine",
|
|
34359
|
+
value: /**
|
|
34360
|
+
* An empty line with a `<br>`, as Enter makes, so it keeps its height
|
|
34361
|
+
* without clean-html's fillEmptyParagraph (#1807)
|
|
34362
|
+
*/ function __newLine() {
|
|
34363
|
+
var j = this.j;
|
|
34364
|
+
var line = j.createInside.element(j.o.enter);
|
|
34365
|
+
if (!jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.isTag(line, 'br')) {
|
|
34366
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.append(line, j.createInside.element('br'));
|
|
34367
|
+
}
|
|
34368
|
+
return line;
|
|
34369
|
+
}
|
|
34370
|
+
},
|
|
33844
34371
|
{
|
|
33845
34372
|
key: "onArrowKey",
|
|
33846
34373
|
value: /**
|
|
@@ -33849,12 +34376,18 @@ var ns = 'addnewline';
|
|
|
33849
34376
|
* starts it. When an arrow key leaves the caret where it was and there is
|
|
33850
34377
|
* content beyond it, a new line goes there, as when the line is clicked.
|
|
33851
34378
|
*/ function onArrowKey(e) {
|
|
34379
|
+
var _this = this;
|
|
33852
34380
|
var editor = this.j;
|
|
33853
34381
|
var forward = e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_DOWN || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_RIGHT;
|
|
33854
34382
|
if (!editor.o.addNewLine || editor.o.readonly || editor.isLocked || e.shiftKey || !(forward || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_UP || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_LEFT) || !editor.s.isCollapsed()) {
|
|
33855
34383
|
return;
|
|
33856
34384
|
}
|
|
33857
34385
|
var _editor_s_range = editor.s.range, startContainer = _editor_s_range.startContainer, startOffset = _editor_s_range.startOffset;
|
|
34386
|
+
// A caret in the editor itself, as beside a horizontal line, is in no
|
|
34387
|
+
// paragraph, and the browsers can leave it there with text beyond (#1803)
|
|
34388
|
+
if (startContainer === editor.editor) {
|
|
34389
|
+
return;
|
|
34390
|
+
}
|
|
33858
34391
|
// Once the browser has moved the caret, if it could. With a 0 timeout
|
|
33859
34392
|
// Jodit would run this at once, before the browser moves it
|
|
33860
34393
|
editor.async.setTimeout(function() {
|
|
@@ -33863,7 +34396,7 @@ var ns = 'addnewline';
|
|
|
33863
34396
|
if (e.defaultPrevented || !editor.s.isInsideArea || !range.collapsed || range.startContainer !== startContainer || range.startOffset !== startOffset || !block || !jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.findNotEmptyNeighbor(block, !forward, editor.editor)) {
|
|
33864
34397
|
return;
|
|
33865
34398
|
}
|
|
33866
|
-
var p =
|
|
34399
|
+
var p = _this.__newLine();
|
|
33867
34400
|
forward ? jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.append(editor.editor, p) : jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.prepend(editor.editor, p);
|
|
33868
34401
|
editor.s.setCursorIn(p);
|
|
33869
34402
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
|
|
@@ -33878,7 +34411,7 @@ var ns = 'addnewline';
|
|
|
33878
34411
|
if (!editor.o.readonly && editor.o.addNewLineOnDBLClick && e.target === editor.editor && editor.s.isCollapsed()) {
|
|
33879
34412
|
var editorBound = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.offset)(editor.editor, editor, editor.ed);
|
|
33880
34413
|
var top = e.pageY - editor.ew.scrollX;
|
|
33881
|
-
var p =
|
|
34414
|
+
var p = this.__newLine();
|
|
33882
34415
|
if (Math.abs(top - editorBound.top) < Math.abs(top - (editorBound.height + editorBound.top)) && editor.editor.firstChild) {
|
|
33883
34416
|
jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.prepend(editor.editor, p);
|
|
33884
34417
|
} else {
|
|
@@ -39087,7 +39620,18 @@ var KEEPS_SPACES = new Set([
|
|
|
39087
39620
|
/**
|
|
39088
39621
|
* A plain space beside this neighbor isn't shown: there is none, or it's a
|
|
39089
39622
|
* line break, a block or text starting (or ending) with a plain space
|
|
39090
|
-
*/
|
|
39623
|
+
*/ // The run of spaces at the end (or the start) of the text becomes nbsp; counted, as `/ +$/` backtracks on a long run
|
|
39624
|
+
function replaceEdgeSpaces(text, atEnd) {
|
|
39625
|
+
var count = 0;
|
|
39626
|
+
while(count < text.length && text.charAt(atEnd ? text.length - 1 - count : count) === ' '){
|
|
39627
|
+
count += 1;
|
|
39628
|
+
}
|
|
39629
|
+
if (count === 0) {
|
|
39630
|
+
return text;
|
|
39631
|
+
}
|
|
39632
|
+
return atEnd ? text.slice(0, text.length - count) + jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.NBSP_SPACE.repeat(count) : jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.NBSP_SPACE.repeat(count) + text.slice(count);
|
|
39633
|
+
}
|
|
39634
|
+
function hidesSpace(neighbor, edge) {
|
|
39091
39635
|
var _neighbor_nodeValue;
|
|
39092
39636
|
return !neighbor || jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(neighbor, 'br') || jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isBlock(neighbor) || jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isText(neighbor) && edge.test((_neighbor_nodeValue = neighbor.nodeValue) !== null && _neighbor_nodeValue !== void 0 ? _neighbor_nodeValue : '');
|
|
39093
39637
|
}
|
|
@@ -39149,6 +39693,7 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
39149
39693
|
}
|
|
39150
39694
|
jodit.s.expandSelection();
|
|
39151
39695
|
var range = jodit.s.range;
|
|
39696
|
+
this.__moveEdgesIntoCells(range);
|
|
39152
39697
|
var caret = this.__clearSelectedCells(range);
|
|
39153
39698
|
if (caret && range.collapsed) {
|
|
39154
39699
|
jodit.s.selectRange(caret);
|
|
@@ -39171,6 +39716,25 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
39171
39716
|
return false;
|
|
39172
39717
|
}
|
|
39173
39718
|
},
|
|
39719
|
+
{
|
|
39720
|
+
key: "__moveEdgesIntoCells",
|
|
39721
|
+
value: /**
|
|
39722
|
+
* Firefox selects cells whole from their row, as after a drag into or out
|
|
39723
|
+
* of a table nested in a cell, and `deleteContents` would remove them. The
|
|
39724
|
+
* edges move into the cells, so their content is cleared instead, as in
|
|
39725
|
+
* Firefox's own delete
|
|
39726
|
+
*/ function __moveEdgesIntoCells(range) {
|
|
39727
|
+
var startContainer = range.startContainer, startOffset = range.startOffset, endContainer = range.endContainer, endOffset = range.endOffset;
|
|
39728
|
+
var first = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(startContainer, 'tr') ? startContainer.childNodes[startOffset] : null;
|
|
39729
|
+
var last = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(endContainer, 'tr') ? endContainer.childNodes[endOffset - 1] : null;
|
|
39730
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isCell(first)) {
|
|
39731
|
+
range.setStart(first, 0);
|
|
39732
|
+
}
|
|
39733
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isCell(last)) {
|
|
39734
|
+
range.setEnd(last, last.childNodes.length);
|
|
39735
|
+
}
|
|
39736
|
+
}
|
|
39737
|
+
},
|
|
39174
39738
|
{
|
|
39175
39739
|
key: "__clearSelectedCells",
|
|
39176
39740
|
value: /**
|
|
@@ -39310,14 +39874,10 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
39310
39874
|
var before = this.__findNeighbor(fake, true, block);
|
|
39311
39875
|
var after = this.__findNeighbor(fake, false, block);
|
|
39312
39876
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isText(before) && hidesSpace(after, /^ /)) {
|
|
39313
|
-
before.nodeValue = before.nodeValue
|
|
39314
|
-
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.NBSP_SPACE.repeat(spaces.length);
|
|
39315
|
-
});
|
|
39877
|
+
before.nodeValue = replaceEdgeSpaces(before.nodeValue, true);
|
|
39316
39878
|
}
|
|
39317
39879
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isText(after) && hidesSpace(before, / $/)) {
|
|
39318
|
-
after.nodeValue = after.nodeValue
|
|
39319
|
-
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.NBSP_SPACE.repeat(spaces.length);
|
|
39320
|
-
});
|
|
39880
|
+
after.nodeValue = replaceEdgeSpaces(after.nodeValue, false);
|
|
39321
39881
|
}
|
|
39322
39882
|
}
|
|
39323
39883
|
},
|
|
@@ -42771,6 +43331,11 @@ function hr(editor) {
|
|
|
42771
43331
|
return false;
|
|
42772
43332
|
}
|
|
42773
43333
|
var p = editor.createInside.element(editor.o.enter);
|
|
43334
|
+
// As Enter's new line has, so it keeps its height without clean-html's
|
|
43335
|
+
// fillEmptyParagraph (#1807)
|
|
43336
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, 'br')) {
|
|
43337
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(p, editor.createInside.element('br'));
|
|
43338
|
+
}
|
|
42774
43339
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
|
|
42775
43340
|
editor.s.setCursorIn(p);
|
|
42776
43341
|
return false;
|
|
@@ -42813,7 +43378,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42813
43378
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
42814
43379
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28077);
|
|
42815
43380
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65946);
|
|
42816
|
-
/* harmony import */ var
|
|
43381
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81910);
|
|
43382
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17326);
|
|
42817
43383
|
/*!
|
|
42818
43384
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42819
43385
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42828,6 +43394,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42828
43394
|
|
|
42829
43395
|
|
|
42830
43396
|
|
|
43397
|
+
|
|
42831
43398
|
/**
|
|
42832
43399
|
* Iframe plugin - use `iframe` instead of DIV in editor. It can be need when you want to attach custom styles in editor
|
|
42833
43400
|
* in backend of you system
|
|
@@ -42888,13 +43455,69 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42888
43455
|
var toggleEditable = function toggleEditable() {
|
|
42889
43456
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(doc.body, 'contenteditable', editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE && !editor.getReadOnly() || null);
|
|
42890
43457
|
};
|
|
43458
|
+
// The start of the whitespace run that ends at `to`
|
|
43459
|
+
var skipBack = function skipBack(text, to) {
|
|
43460
|
+
while(to > 0 && /\s/.test(text.charAt(to - 1))){
|
|
43461
|
+
to -= 1;
|
|
43462
|
+
}
|
|
43463
|
+
return to;
|
|
43464
|
+
};
|
|
43465
|
+
// The editor's own attributes on `<body>`: `min-height` and `contenteditable=true`
|
|
43466
|
+
var cleanBodyTag = function cleanBodyTag(tag) {
|
|
43467
|
+
tag = tag.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i, '');
|
|
43468
|
+
var skip = function skip(from, chars) {
|
|
43469
|
+
while(chars.test(tag.charAt(from))){
|
|
43470
|
+
from += 1;
|
|
43471
|
+
}
|
|
43472
|
+
return from;
|
|
43473
|
+
};
|
|
43474
|
+
var index = tag.indexOf('contenteditable');
|
|
43475
|
+
while(index !== -1){
|
|
43476
|
+
var to = skip(index + 'contenteditable'.length, /["'\s]/);
|
|
43477
|
+
if (tag.charAt(to) === '=') {
|
|
43478
|
+
to = skip(to + 1, /[\s"']/);
|
|
43479
|
+
if (tag.startsWith('true', to)) {
|
|
43480
|
+
to = skip(to + 4, /["']/);
|
|
43481
|
+
var from = index;
|
|
43482
|
+
if (/["']/.test(tag.charAt(from - 1))) {
|
|
43483
|
+
from -= 1;
|
|
43484
|
+
}
|
|
43485
|
+
from = skipBack(tag, from);
|
|
43486
|
+
return tag.slice(0, from) + tag.slice(to);
|
|
43487
|
+
}
|
|
43488
|
+
}
|
|
43489
|
+
index = tag.indexOf('contenteditable', index + 1);
|
|
43490
|
+
}
|
|
43491
|
+
return tag;
|
|
43492
|
+
};
|
|
42891
43493
|
var clearMarkers = function clearMarkers(html) {
|
|
42892
43494
|
// The plugins' own styles, from `getContainer`, aren't part of the value
|
|
42893
|
-
html =
|
|
42894
|
-
var
|
|
42895
|
-
|
|
42896
|
-
|
|
42897
|
-
|
|
43495
|
+
html = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(html, '<style', '>', '</style>', 'jodit-box');
|
|
43496
|
+
var bodyStart = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.indexOfOpenTag)(html, 'body');
|
|
43497
|
+
var bodyEnd = -1;
|
|
43498
|
+
for(var index = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.indexOfClosingTag)(html, 'body', bodyStart + 1); index !== -1; index = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.indexOfClosingTag)(html, 'body', index + 1)){
|
|
43499
|
+
bodyEnd = index;
|
|
43500
|
+
}
|
|
43501
|
+
if (bodyStart !== -1 && bodyEnd !== -1) {
|
|
43502
|
+
var afterBody = bodyEnd + '</body>'.length;
|
|
43503
|
+
var gt = html.indexOf('>', bodyStart);
|
|
43504
|
+
var body = html.slice(bodyStart, afterBody);
|
|
43505
|
+
if (gt !== -1 && gt < bodyEnd) {
|
|
43506
|
+
body = cleanBodyTag(html.slice(bodyStart, gt)) + html.slice(gt, afterBody);
|
|
43507
|
+
}
|
|
43508
|
+
for(var _i = 0, _iter = [
|
|
43509
|
+
'style',
|
|
43510
|
+
'script',
|
|
43511
|
+
'span'
|
|
43512
|
+
]; _i < _iter.length; _i++){
|
|
43513
|
+
var tag = _iter[_i];
|
|
43514
|
+
body = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(body, '<' + tag, '>', '</' + tag + '>', 'jodit');
|
|
43515
|
+
}
|
|
43516
|
+
// remove markers: the spans outside the body are the editor's own
|
|
43517
|
+
var stripSpans = function stripSpans(part) {
|
|
43518
|
+
return (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.removeBetween)((0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(part, '<span', '>', '</span>'), '<span', '>', '</span>');
|
|
43519
|
+
};
|
|
43520
|
+
html = (stripSpans(html.slice(0, bodyStart)) + body + stripSpans(html.slice(afterBody))).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g, '$1$2$3$5').replace(/(<[^<]+?)\sclass="[\s]*"/gim, '$1').replace(/(<[^<]+?)\sstyle="[\s;]*"/gim, '$1').replace(/(<[^<]+?)\sdir="[\s]*"/gim, '$1');
|
|
42898
43521
|
}
|
|
42899
43522
|
return html;
|
|
42900
43523
|
};
|
|
@@ -49724,9 +50347,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49724
50347
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81937);
|
|
49725
50348
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23211);
|
|
49726
50349
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28077);
|
|
49727
|
-
/* harmony import */ var
|
|
49728
|
-
/* harmony import */ var
|
|
49729
|
-
/* harmony import */ var
|
|
50350
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81910);
|
|
50351
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93640);
|
|
50352
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80991);
|
|
50353
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(51730);
|
|
49730
50354
|
/*!
|
|
49731
50355
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
49732
50356
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -49743,17 +50367,18 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49743
50367
|
|
|
49744
50368
|
|
|
49745
50369
|
|
|
50370
|
+
|
|
49746
50371
|
/**
|
|
49747
50372
|
* Process `video` and `audio`
|
|
49748
50373
|
*/ function media(editor) {
|
|
49749
50374
|
var keyFake = 'jodit_fake_wrapper';
|
|
49750
50375
|
var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock, mediaWrappers = _editor_options.mediaWrappers;
|
|
49751
50376
|
var wrap = function wrap(element) {
|
|
49752
|
-
if (element.parentNode && (0,
|
|
50377
|
+
if (element.parentNode && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
49753
50378
|
element = element.parentNode;
|
|
49754
50379
|
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
49755
50380
|
var _getMediaWrapper;
|
|
49756
|
-
element = (_getMediaWrapper = (0,
|
|
50381
|
+
element = (_getMediaWrapper = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.getMediaWrapper)(editor, element)) !== null && _getMediaWrapper !== void 0 ? _getMediaWrapper : (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.wrapMedia)(editor, element);
|
|
49757
50382
|
} else if (mediaInFakeBlock) {
|
|
49758
50383
|
var _$media = element;
|
|
49759
50384
|
var wrapper = editor.createInside.element(mediaFakeTag, (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)({
|
|
@@ -49761,13 +50386,17 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49761
50386
|
contenteditable: false,
|
|
49762
50387
|
draggable: true
|
|
49763
50388
|
}, "data-".concat(keyFake), 1));
|
|
49764
|
-
(0,
|
|
50389
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.attr)(wrapper, 'style', (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.attr)(element, 'style'));
|
|
49765
50390
|
// The wrapper fits the media, whose size changes as its metadata loads
|
|
49766
|
-
// and as it's resized.
|
|
50391
|
+
// and as it's resized. It's inline, as the media is by default, so the
|
|
50392
|
+
// line's text-align still places it, or a block when the media is one.
|
|
50393
|
+
// A percentage width is of the line, so the wrapper is a block that
|
|
50394
|
+
// takes the line, and the media in it follows the text-align it inherits
|
|
49767
50395
|
var fit = function fit() {
|
|
49768
|
-
(0,
|
|
49769
|
-
|
|
49770
|
-
|
|
50396
|
+
var ofLine = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(_$media, 'width').endsWith('%');
|
|
50397
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.css)(wrapper, {
|
|
50398
|
+
display: !ofLine && /^inline/.test((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.css)(_$media, 'display').toString()) ? 'inline-block' : 'block',
|
|
50399
|
+
width: ofLine ? '' : 'fit-content',
|
|
49771
50400
|
height: ''
|
|
49772
50401
|
});
|
|
49773
50402
|
};
|
|
@@ -49814,15 +50443,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49814
50443
|
}
|
|
49815
50444
|
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
49816
50445
|
editor.e.on('afterGetValueFromEditor', function(data) {
|
|
49817
|
-
|
|
49818
|
-
if (rxp.test(data.value)) {
|
|
49819
|
-
data.value = data.value.replace(rxp, '$1');
|
|
49820
|
-
}
|
|
50446
|
+
data.value = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__.unwrapMarkedTags)(data.value, mediaFakeTag, "data-".concat(keyFake));
|
|
49821
50447
|
}).on('change afterInit afterSetMode changePlace', editor.async.debounce(function() {
|
|
49822
50448
|
if (!editor.isDestructed && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.MODE_SOURCE) {
|
|
49823
|
-
(0,
|
|
49824
|
-
if (!(0,
|
|
49825
|
-
(0,
|
|
50449
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.$$)(mediaBlocks.join(','), editor.editor).forEach(function(elm) {
|
|
50450
|
+
if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.dataBind)(elm, keyFake)) {
|
|
50451
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.dataBind)(elm, keyFake, true);
|
|
49826
50452
|
wrap(elm);
|
|
49827
50453
|
}
|
|
49828
50454
|
});
|
|
@@ -51032,7 +51658,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51032
51658
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23211);
|
|
51033
51659
|
/* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88475);
|
|
51034
51660
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28686);
|
|
51035
|
-
/* harmony import */ var
|
|
51661
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81910);
|
|
51662
|
+
/* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(53681);
|
|
51036
51663
|
/*!
|
|
51037
51664
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
51038
51665
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -51045,11 +51672,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51045
51672
|
|
|
51046
51673
|
|
|
51047
51674
|
|
|
51675
|
+
|
|
51048
51676
|
/**
|
|
51049
51677
|
* Remove special HTML comments
|
|
51050
51678
|
* @private
|
|
51051
51679
|
*/ function removeExtraFragments(html) {
|
|
51052
|
-
html =
|
|
51680
|
+
html = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__.removeTagsByPrefix)(html, [
|
|
51681
|
+
'<meta'
|
|
51682
|
+
]);
|
|
51053
51683
|
var start = html.search(/<!--StartFragment-->/i);
|
|
51054
51684
|
if (start !== -1) {
|
|
51055
51685
|
html = html.substring(start + 20);
|
|
@@ -51067,7 +51697,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51067
51697
|
* paste bold
|
|
51068
51698
|
* @private
|
|
51069
51699
|
*/ function removeGoogleDocsWrapper(html) {
|
|
51070
|
-
|
|
51700
|
+
// A plain search: the wrapper check is left to the parsed document below
|
|
51701
|
+
if (!/docs-internal-guid-/i.test(html)) {
|
|
51071
51702
|
return html;
|
|
51072
51703
|
}
|
|
51073
51704
|
// An inert document: images don't load and handlers don't run
|
|
@@ -51124,7 +51755,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51124
51755
|
var dialog = jodit.confirm('<div style="word-break: normal; white-space: normal">'.concat(jodit.i18n(msg), "</div>"), jodit.i18n(title));
|
|
51125
51756
|
var buttons = buttonList.map(function(param) {
|
|
51126
51757
|
var text = param.text, value = param.value;
|
|
51127
|
-
return (0,
|
|
51758
|
+
return (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_6__.Button)(jodit, {
|
|
51128
51759
|
text: text,
|
|
51129
51760
|
name: text.toLowerCase(),
|
|
51130
51761
|
tabIndex: 0
|
|
@@ -51141,7 +51772,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51141
51772
|
}
|
|
51142
51773
|
jodit.e.fire('afterClosePasteDialog', dialog);
|
|
51143
51774
|
});
|
|
51144
|
-
var cancel = (0,
|
|
51775
|
+
var cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_6__.Button)(jodit, {
|
|
51145
51776
|
text: 'Cancel',
|
|
51146
51777
|
tabIndex: 0
|
|
51147
51778
|
}).onAction(function() {
|
|
@@ -52953,12 +53584,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
52953
53584
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23211);
|
|
52954
53585
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28077);
|
|
52955
53586
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
|
|
52956
|
-
/* harmony import */ var
|
|
52957
|
-
/* harmony import */ var
|
|
52958
|
-
/* harmony import */ var
|
|
52959
|
-
/* harmony import */ var
|
|
52960
|
-
/* harmony import */ var
|
|
52961
|
-
/* harmony import */ var
|
|
53587
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81910);
|
|
53588
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80991);
|
|
53589
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18855);
|
|
53590
|
+
/* harmony import */ var jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(42259);
|
|
53591
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(4099);
|
|
53592
|
+
/* harmony import */ var jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(56490);
|
|
53593
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(96608);
|
|
52962
53594
|
/*!
|
|
52963
53595
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
52964
53596
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -52987,6 +53619,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
52987
53619
|
|
|
52988
53620
|
|
|
52989
53621
|
|
|
53622
|
+
|
|
52990
53623
|
var keyBInd = '__jodit-resizer_binded';
|
|
52991
53624
|
/**
|
|
52992
53625
|
* Reads a plain pixel value out of a `width`/`height` attribute.
|
|
@@ -53004,7 +53637,7 @@ var keyBInd = '__jodit-resizer_binded';
|
|
|
53004
53637
|
* A video with no height of its own takes it from its width and its ratio,
|
|
53005
53638
|
* so resizing it keeps the ratio without setting a height.
|
|
53006
53639
|
*/ function heightFollowsWidth(element) {
|
|
53007
|
-
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isTag(element, 'video') && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(element, 'height') && !(0,
|
|
53640
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isTag(element, 'video') && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(element, 'height') && !(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(element, 'height');
|
|
53008
53641
|
}
|
|
53009
53642
|
var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
53010
53643
|
/**
|
|
@@ -53041,7 +53674,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53041
53674
|
}
|
|
53042
53675
|
if (_this.element && _this.rect) {
|
|
53043
53676
|
var workplacePosition = _this.getWorkplacePosition();
|
|
53044
|
-
var pos = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.offset)(_this.element, _this.j, _this.j.ed), left = parseInt((0,
|
|
53677
|
+
var pos = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.offset)(_this.element, _this.j, _this.j.ed), left = parseInt((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(_this.rect, 'left') || '0', 10), top = parseInt((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(_this.rect, 'top') || '0', 10), w = _this.rect.offsetWidth, h = _this.rect.offsetHeight;
|
|
53045
53678
|
var newTop = pos.top - workplacePosition.top, newLeft = pos.left - workplacePosition.left;
|
|
53046
53679
|
if (top !== newTop || left !== newLeft || w !== _this.element.offsetWidth || h !== _this.element.offsetHeight) {
|
|
53047
53680
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.rect, {
|
|
@@ -53084,10 +53717,9 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53084
53717
|
.on('keydown', this.onEditorKeyDown, {
|
|
53085
53718
|
top: true
|
|
53086
53719
|
}).on('afterGetValueFromEditor.resizer', function(data) {
|
|
53087
|
-
|
|
53088
|
-
|
|
53089
|
-
|
|
53090
|
-
}
|
|
53720
|
+
data.value = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_12__.unwrapMarkedTags)(data.value, 'jodit', 'data-jodit_iframe_wrapper', function(inner) {
|
|
53721
|
+
return /<iframe/i.test(inner);
|
|
53722
|
+
});
|
|
53091
53723
|
});
|
|
53092
53724
|
this.addEventListeners();
|
|
53093
53725
|
this.__onChangeEditor();
|
|
@@ -53133,7 +53765,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53133
53765
|
return;
|
|
53134
53766
|
}
|
|
53135
53767
|
var width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(image, 'width');
|
|
53136
|
-
if (width && !(0,
|
|
53768
|
+
if (width && !(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(image, 'width')) {
|
|
53137
53769
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, 'width', width);
|
|
53138
53770
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(image, 'width', null);
|
|
53139
53771
|
}
|
|
@@ -53282,7 +53914,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53282
53914
|
value: function __followCaret() {
|
|
53283
53915
|
var before = this.__keyDownRange;
|
|
53284
53916
|
this.__keyDownRange = null;
|
|
53285
|
-
if (!(0,
|
|
53917
|
+
if (!(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_15__.isMoved)(this.j, before)) {
|
|
53286
53918
|
return;
|
|
53287
53919
|
}
|
|
53288
53920
|
if (this.isShown && this.element && !this.j.s.range.intersectsNode(this.element)) {
|
|
@@ -53326,7 +53958,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53326
53958
|
if (!this.isResizeMode) {
|
|
53327
53959
|
// A click in the element's popup, or in a list it opens, works on
|
|
53328
53960
|
// the element, so it keeps its frame
|
|
53329
|
-
if ((e === null || e === void 0 ? void 0 : e.target) &&
|
|
53961
|
+
if ((e === null || e === void 0 ? void 0 : e.target) && jodit_core_ui__WEBPACK_IMPORTED_MODULE_16__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_17__.Popup)) {
|
|
53330
53962
|
return;
|
|
53331
53963
|
}
|
|
53332
53964
|
return this.hide();
|
|
@@ -53356,7 +53988,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53356
53988
|
if (changeAttrs) {
|
|
53357
53989
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(element, key, value);
|
|
53358
53990
|
}
|
|
53359
|
-
if (!changeAttrs || (0,
|
|
53991
|
+
if (!changeAttrs || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(element, key)) {
|
|
53360
53992
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(element, key, value);
|
|
53361
53993
|
}
|
|
53362
53994
|
}
|
|
@@ -53434,8 +54066,11 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53434
54066
|
// is nothing measurable at all, let the wrapper size itself.
|
|
53435
54067
|
var width = element.offsetWidth || attrPixelSize(element, 'width');
|
|
53436
54068
|
var height = element.offsetHeight || attrPixelSize(element, 'height');
|
|
54069
|
+
// The wrapper takes the iframe's place in its line: inline, as an
|
|
54070
|
+
// iframe is by default, so the line's text-align still places it,
|
|
54071
|
+
// or a block when the iframe is one
|
|
53437
54072
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(wrapper, {
|
|
53438
|
-
display: (0,
|
|
54073
|
+
display: /^inline/.test((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(element, 'display').toString()) ? 'inline-block' : 'block'
|
|
53439
54074
|
});
|
|
53440
54075
|
if (width) {
|
|
53441
54076
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(wrapper, 'width', width);
|
|
@@ -53542,7 +54177,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53542
54177
|
}
|
|
53543
54178
|
]);
|
|
53544
54179
|
return resizer;
|
|
53545
|
-
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(
|
|
54180
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_14__.Plugin));
|
|
53546
54181
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__._)([
|
|
53547
54182
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)(':click')
|
|
53548
54183
|
], resizer.prototype, "onEditorClick", null);
|
|
@@ -55165,20 +55800,13 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
55165
55800
|
value: /**
|
|
55166
55801
|
* Mouse move inside the table
|
|
55167
55802
|
*/ function __onMove(table, e) {
|
|
55168
|
-
var _this_j_o_shadowRoot;
|
|
55169
55803
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
55170
55804
|
return;
|
|
55171
55805
|
}
|
|
55172
55806
|
if (this.j.isLockedNotBy(key)) {
|
|
55173
55807
|
return;
|
|
55174
55808
|
}
|
|
55175
|
-
|
|
55176
|
-
// host, so the lookup must start from the shadow root
|
|
55177
|
-
var node = ((_this_j_o_shadowRoot = this.j.o.shadowRoot) !== null && _this_j_o_shadowRoot !== void 0 ? _this_j_o_shadowRoot : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
55178
|
-
var cell = node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(node, [
|
|
55179
|
-
'td',
|
|
55180
|
-
'th'
|
|
55181
|
-
], table);
|
|
55809
|
+
var cell = this.__cellUnder(e, table);
|
|
55182
55810
|
if (!cell || !this.__selectedCell) {
|
|
55183
55811
|
return;
|
|
55184
55812
|
}
|
|
@@ -55227,34 +55855,33 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
55227
55855
|
this.__selectedCell = null;
|
|
55228
55856
|
}
|
|
55229
55857
|
},
|
|
55858
|
+
{
|
|
55859
|
+
key: "__cellUnder",
|
|
55860
|
+
value: // The cell of this table under the pointer; over a table nested in a cell, the mouse is still in that cell
|
|
55861
|
+
function __cellUnder(e, table) {
|
|
55862
|
+
var _this_j_o_shadowRoot;
|
|
55863
|
+
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
55864
|
+
// host, so the lookup must start from the shadow root
|
|
55865
|
+
var node = ((_this_j_o_shadowRoot = this.j.o.shadowRoot) !== null && _this_j_o_shadowRoot !== void 0 ? _this_j_o_shadowRoot : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
55866
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(node, function(elm) {
|
|
55867
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isCell(elm) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(elm, 'table', table);
|
|
55868
|
+
}, table);
|
|
55869
|
+
}
|
|
55870
|
+
},
|
|
55230
55871
|
{
|
|
55231
55872
|
key: "__onStopSelection",
|
|
55232
55873
|
value: /**
|
|
55233
55874
|
* Stop a selection process
|
|
55234
55875
|
*/ function __onStopSelection(table, e) {
|
|
55235
|
-
var _this_j_o_shadowRoot;
|
|
55236
55876
|
if (!this.__selectedCell) {
|
|
55237
55877
|
return;
|
|
55238
55878
|
}
|
|
55239
55879
|
this.__isSelectionMode = false;
|
|
55240
55880
|
this.j.unlock();
|
|
55241
|
-
|
|
55242
|
-
// host, so the lookup must start from the shadow root
|
|
55243
|
-
var node = ((_this_j_o_shadowRoot = this.j.o.shadowRoot) !== null && _this_j_o_shadowRoot !== void 0 ? _this_j_o_shadowRoot : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
55244
|
-
if (!node) {
|
|
55245
|
-
return;
|
|
55246
|
-
}
|
|
55247
|
-
var cell = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(node, [
|
|
55248
|
-
'td',
|
|
55249
|
-
'th'
|
|
55250
|
-
], table);
|
|
55881
|
+
var cell = this.__cellUnder(e, table);
|
|
55251
55882
|
if (!cell) {
|
|
55252
55883
|
return;
|
|
55253
55884
|
}
|
|
55254
|
-
var ownTable = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(cell, 'table', table);
|
|
55255
|
-
if (ownTable && ownTable !== table) {
|
|
55256
|
-
return; // Nested tables
|
|
55257
|
-
}
|
|
55258
55885
|
this.__showCellsPopup(table, [
|
|
55259
55886
|
cell,
|
|
55260
55887
|
this.__selectedCell
|