jodit 4.19.10 → 4.19.11
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 +139 -131
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +7 -7
- package/es2015/jodit.js +703 -166
- package/es2015/jodit.min.js +7 -7
- 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.js +7 -7
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +13 -13
- package/es2021/jodit.js +703 -166
- package/es2021/jodit.min.js +13 -13
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +19 -19
- package/es2021.en/jodit.js +703 -166
- package/es2021.en/jodit.min.js +19 -19
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +731 -171
- package/es5/jodit.min.css +2 -2
- 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/jodit.js +2 -1
- package/esm/plugins/delete/delete.js +16 -2
- package/esm/plugins/iframe/iframe.js +59 -12
- package/esm/plugins/media/media.js +2 -4
- package/esm/plugins/paste/helpers.js +4 -2
- package/esm/plugins/resizer/resizer.js +2 -4
- 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/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.11
|
|
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.11";
|
|
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);
|
|
@@ -22409,11 +22897,12 @@ View.defaultOptions = {
|
|
|
22409
22897
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(84839);
|
|
22410
22898
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28077);
|
|
22411
22899
|
/* 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
|
|
22900
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(81910);
|
|
22901
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(80991);
|
|
22902
|
+
/* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(73714);
|
|
22903
|
+
/* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(80512);
|
|
22904
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(5266);
|
|
22905
|
+
/* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(60936);
|
|
22417
22906
|
/*!
|
|
22418
22907
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
22419
22908
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -22442,6 +22931,7 @@ View.defaultOptions = {
|
|
|
22442
22931
|
|
|
22443
22932
|
|
|
22444
22933
|
|
|
22934
|
+
|
|
22445
22935
|
|
|
22446
22936
|
|
|
22447
22937
|
var FOCUS_EVENTS = new Set([
|
|
@@ -22474,7 +22964,7 @@ var NOEDIT = {
|
|
|
22474
22964
|
* `alignClasses.img` when that isn't set
|
|
22475
22965
|
*/ function makeOptions(options) {
|
|
22476
22966
|
var _opt_alignClasses;
|
|
22477
|
-
var opt = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)(options || {},
|
|
22967
|
+
var opt = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions);
|
|
22478
22968
|
if (opt.imageAlignClasses && !((_opt_alignClasses = opt.alignClasses) === null || _opt_alignClasses === void 0 ? void 0 : _opt_alignClasses.img)) {
|
|
22479
22969
|
opt.alignClasses = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)({
|
|
22480
22970
|
img: opt.imageAlignClasses
|
|
@@ -22518,7 +23008,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22518
23008
|
_this.destruct();
|
|
22519
23009
|
throw e;
|
|
22520
23010
|
}
|
|
22521
|
-
_this.setStatus(
|
|
23011
|
+
_this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.STATUSES.beforeInit);
|
|
22522
23012
|
_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
23013
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.instances[_this.id] = _this;
|
|
22524
23014
|
_this.attachEvents(options);
|
|
@@ -22528,7 +23018,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22528
23018
|
}
|
|
22529
23019
|
});
|
|
22530
23020
|
_this.e.on('prepareWYSIWYGEditor', _this.__prepareWYSIWYGEditor);
|
|
22531
|
-
_this.selection = new
|
|
23021
|
+
_this.selection = new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Selection(_this);
|
|
22532
23022
|
var beforeInitHookResult = _this.beforeInitHook();
|
|
22533
23023
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.callPromise)(beforeInitHookResult, function() {
|
|
22534
23024
|
if (_this.isInDestruct) {
|
|
@@ -22552,7 +23042,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22552
23042
|
_this.e.fire('afterInit', _this);
|
|
22553
23043
|
}
|
|
22554
23044
|
;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.callPromise)(_this.afterInitHook());
|
|
22555
|
-
_this.setStatus(
|
|
23045
|
+
_this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.STATUSES.ready);
|
|
22556
23046
|
_this.e.fire('afterConstructor', _this);
|
|
22557
23047
|
};
|
|
22558
23048
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.callPromise)(addPlaceResult, init);
|
|
@@ -22609,14 +23099,14 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22609
23099
|
* Return a default timeout period in milliseconds for some debounce or throttle functions.
|
|
22610
23100
|
* By default, `{history.timeout}` options
|
|
22611
23101
|
*/ function get() {
|
|
22612
|
-
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.isNumber)(this.o.defaultTimeout) ? this.o.defaultTimeout :
|
|
23102
|
+
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
23103
|
}
|
|
22614
23104
|
},
|
|
22615
23105
|
{
|
|
22616
23106
|
key: "createInside",
|
|
22617
23107
|
get: function get() {
|
|
22618
23108
|
var _this = this;
|
|
22619
|
-
return new
|
|
23109
|
+
return new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Create(function() {
|
|
22620
23110
|
return _this.ed;
|
|
22621
23111
|
}, this.o.createAttributes);
|
|
22622
23112
|
}
|
|
@@ -22891,7 +23381,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
22891
23381
|
}
|
|
22892
23382
|
value = this.getNativeEditorValue().replace(jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
22893
23383
|
if (removeSelectionMarkers) {
|
|
22894
|
-
value =
|
|
23384
|
+
value = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_16__.removeEmptyMarkedTags)(value, 'span', 'id="jodit-selection_marker_');
|
|
22895
23385
|
}
|
|
22896
23386
|
if (value === '<br>') {
|
|
22897
23387
|
value = '';
|
|
@@ -23281,7 +23771,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23281
23771
|
return this.getMode();
|
|
23282
23772
|
}
|
|
23283
23773
|
var active = this.od.activeElement;
|
|
23284
|
-
if (active && (active === this.iframe ||
|
|
23774
|
+
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
23775
|
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.MODE_WYSIWYG;
|
|
23286
23776
|
}
|
|
23287
23777
|
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.MODE_SOURCE;
|
|
@@ -23475,7 +23965,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23475
23965
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.toArray)(element.attributes).forEach(function(attr) {
|
|
23476
23966
|
var name = attr.name;
|
|
23477
23967
|
var value = attr.value;
|
|
23478
|
-
if (
|
|
23968
|
+
if (jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions[name] !== undefined && (!options || options[name] === undefined)) {
|
|
23479
23969
|
if ([
|
|
23480
23970
|
'readonly',
|
|
23481
23971
|
'disabled'
|
|
@@ -23512,7 +24002,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23512
24002
|
container = element;
|
|
23513
24003
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)(element, __defaultClassesKey, element.className.toString());
|
|
23514
24004
|
buffer = container.innerHTML;
|
|
23515
|
-
|
|
24005
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.detach(container);
|
|
23516
24006
|
}
|
|
23517
24007
|
container.classList.add('jodit_inline');
|
|
23518
24008
|
container.classList.add('jodit-container');
|
|
@@ -23520,7 +24010,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23520
24010
|
// actual for inline mode
|
|
23521
24011
|
if (element !== container) {
|
|
23522
24012
|
// hide source element
|
|
23523
|
-
var display = (0,
|
|
24013
|
+
var display = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_17__.cssInline)(element, 'display');
|
|
23524
24014
|
if (display) {
|
|
23525
24015
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)(element, __defaultStyleDisplayKey, display);
|
|
23526
24016
|
}
|
|
@@ -23532,21 +24022,21 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23532
24022
|
// the toolbar box below it when (re)attaching the toolbar container.
|
|
23533
24023
|
var aboveSlot = this.c.div(this.getFullElName(SLOT, 'above'), NOEDIT);
|
|
23534
24024
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.attr)(aboveSlot, 'data-jodit-above-toolbar', '');
|
|
23535
|
-
|
|
24025
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.appendChildFirst(container, aboveSlot);
|
|
23536
24026
|
var topSlot = this.c.div(this.getFullElName(SLOT, 'top'), NOEDIT);
|
|
23537
|
-
|
|
24027
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(container, topSlot);
|
|
23538
24028
|
var centerSlot = this.c.div(this.getFullElName(SLOT, 'center'), NOEDIT);
|
|
23539
24029
|
var workplace = this.c.div('jodit-workplace', NOEDIT);
|
|
23540
24030
|
var leftSlot = this.c.div(this.getFullElName(SLOT, 'left'), NOEDIT);
|
|
23541
24031
|
var rightSlot = this.c.div(this.getFullElName(SLOT, 'right'), NOEDIT);
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
24032
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(centerSlot, leftSlot);
|
|
24033
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(centerSlot, workplace);
|
|
24034
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(centerSlot, rightSlot);
|
|
24035
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(container, centerSlot);
|
|
23546
24036
|
var bottomPanel = this.c.div(this.getFullElName(SLOT, 'bottom'), NOEDIT);
|
|
23547
|
-
|
|
24037
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(container, bottomPanel);
|
|
23548
24038
|
if (element.parentNode && element !== container) {
|
|
23549
|
-
|
|
24039
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.before(element, container);
|
|
23550
24040
|
}
|
|
23551
24041
|
Object.defineProperty(element, 'component', {
|
|
23552
24042
|
enumerable: false,
|
|
@@ -23558,7 +24048,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23558
24048
|
'aria-disabled': false,
|
|
23559
24049
|
tabindex: this.o.tabIndex
|
|
23560
24050
|
});
|
|
23561
|
-
|
|
24051
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(workplace, editor);
|
|
23562
24052
|
var currentPlace = {
|
|
23563
24053
|
editor: editor,
|
|
23564
24054
|
element: element,
|
|
@@ -23572,9 +24062,9 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23572
24062
|
left: leftSlot,
|
|
23573
24063
|
right: rightSlot
|
|
23574
24064
|
},
|
|
23575
|
-
statusbar: new
|
|
24065
|
+
statusbar: new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.StatusBar(this, container),
|
|
23576
24066
|
options: this.isReady ? makeOptions(options) : this.options,
|
|
23577
|
-
history: new
|
|
24067
|
+
history: new jodit_modules__WEBPACK_IMPORTED_MODULE_21__.History(this),
|
|
23578
24068
|
editorWindow: this.ow
|
|
23579
24069
|
};
|
|
23580
24070
|
this.__elementToPlace.set(editor, currentPlace);
|
|
@@ -23610,7 +24100,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23610
24100
|
{
|
|
23611
24101
|
key: "addDisclaimer",
|
|
23612
24102
|
value: function addDisclaimer(elm) {
|
|
23613
|
-
|
|
24103
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.append(this.workplace, elm);
|
|
23614
24104
|
}
|
|
23615
24105
|
},
|
|
23616
24106
|
{
|
|
@@ -23684,7 +24174,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23684
24174
|
return;
|
|
23685
24175
|
}
|
|
23686
24176
|
if (stayDefault === false || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.isPromise)(stayDefault)) {
|
|
23687
|
-
|
|
24177
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(defaultEditorArea);
|
|
23688
24178
|
}
|
|
23689
24179
|
addClassNames(_this.o.editorClassName, _this.editor);
|
|
23690
24180
|
if (_this.o.style) {
|
|
@@ -23739,7 +24229,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23739
24229
|
// and such an element stays in the editor
|
|
23740
24230
|
if (FOCUS_EVENTS.has(type)) {
|
|
23741
24231
|
var inner = type === 'focusin' || type === 'focusout';
|
|
23742
|
-
if (inner === (event.target === editor) ||
|
|
24232
|
+
if (inner === (event.target === editor) || jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.isOrContains(editor, event.relatedTarget)) {
|
|
23743
24233
|
return;
|
|
23744
24234
|
}
|
|
23745
24235
|
if (inner) {
|
|
@@ -23780,7 +24270,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23780
24270
|
key: "fetch",
|
|
23781
24271
|
value: function fetch(url, options) {
|
|
23782
24272
|
var _this = this;
|
|
23783
|
-
var ajax = new
|
|
24273
|
+
var ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_18__.Ajax((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_8__._)({
|
|
23784
24274
|
url: url
|
|
23785
24275
|
}, options), this.o.defaultAjaxOptions);
|
|
23786
24276
|
var destroy = function destroy1() {
|
|
@@ -23807,7 +24297,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23807
24297
|
if (this.isInDestruct) {
|
|
23808
24298
|
return;
|
|
23809
24299
|
}
|
|
23810
|
-
this.setStatus(
|
|
24300
|
+
this.setStatus(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.STATUSES.beforeDestruct);
|
|
23811
24301
|
this.__elementToPlace.clear();
|
|
23812
24302
|
(_cached = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.cached)(this, 'storage')) === null || _cached === void 0 ? void 0 : _cached.clear();
|
|
23813
24303
|
(_cached1 = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.cached)(this, 'buffer')) === null || _cached1 === void 0 ? void 0 : _cached1.clear();
|
|
@@ -23846,17 +24336,17 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23846
24336
|
_this.e.off(container);
|
|
23847
24337
|
_this.e.off(element);
|
|
23848
24338
|
_this.e.off(editor);
|
|
23849
|
-
|
|
23850
|
-
|
|
24339
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(workplace);
|
|
24340
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(editor);
|
|
23851
24341
|
if (container !== element) {
|
|
23852
|
-
|
|
24342
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(container);
|
|
23853
24343
|
}
|
|
23854
24344
|
Object.defineProperty(element, 'component', {
|
|
23855
24345
|
enumerable: false,
|
|
23856
24346
|
configurable: true,
|
|
23857
24347
|
value: null
|
|
23858
24348
|
});
|
|
23859
|
-
|
|
24349
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Dom.safeRemove(iframe);
|
|
23860
24350
|
// inline mode
|
|
23861
24351
|
if (container === element) {
|
|
23862
24352
|
element.innerHTML = tmpValue;
|
|
@@ -23919,7 +24409,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23919
24409
|
get: /**
|
|
23920
24410
|
* Default settings
|
|
23921
24411
|
*/ function get() {
|
|
23922
|
-
return
|
|
24412
|
+
return jodit_config__WEBPACK_IMPORTED_MODULE_20__.Config.defaultOptions;
|
|
23923
24413
|
}
|
|
23924
24414
|
},
|
|
23925
24415
|
{
|
|
@@ -23972,7 +24462,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23972
24462
|
}
|
|
23973
24463
|
]);
|
|
23974
24464
|
return Jodit;
|
|
23975
|
-
}(
|
|
24465
|
+
}(jodit_modules__WEBPACK_IMPORTED_MODULE_21__.ViewWithToolbar);
|
|
23976
24466
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "fatMode", jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.FAT_MODE);
|
|
23977
24467
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "plugins", jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.pluginSystem);
|
|
23978
24468
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "modules", jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.modules);
|
|
@@ -23982,7 +24472,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23982
24472
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "instances", jodit_core_global__WEBPACK_IMPORTED_MODULE_14__.instances);
|
|
23983
24473
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "lang", jodit_core_constants__WEBPACK_IMPORTED_MODULE_12__.lang);
|
|
23984
24474
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Jodit, "core", {
|
|
23985
|
-
Plugin:
|
|
24475
|
+
Plugin: jodit_modules__WEBPACK_IMPORTED_MODULE_21__.Plugin
|
|
23986
24476
|
});
|
|
23987
24477
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__._)([
|
|
23988
24478
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.cache
|
|
@@ -24009,7 +24499,7 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
24009
24499
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.autobind
|
|
24010
24500
|
], Jodit.prototype, "__prepareWYSIWYGEditor", null);
|
|
24011
24501
|
Jodit = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__._)([
|
|
24012
|
-
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.derive)(
|
|
24502
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_13__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_19__.Dlgs)
|
|
24013
24503
|
], Jodit);
|
|
24014
24504
|
function addClassNames(className, elm) {
|
|
24015
24505
|
if (className) {
|
|
@@ -39087,7 +39577,18 @@ var KEEPS_SPACES = new Set([
|
|
|
39087
39577
|
/**
|
|
39088
39578
|
* A plain space beside this neighbor isn't shown: there is none, or it's a
|
|
39089
39579
|
* line break, a block or text starting (or ending) with a plain space
|
|
39090
|
-
*/
|
|
39580
|
+
*/ // The run of spaces at the end (or the start) of the text becomes nbsp; counted, as `/ +$/` backtracks on a long run
|
|
39581
|
+
function replaceEdgeSpaces(text, atEnd) {
|
|
39582
|
+
var count = 0;
|
|
39583
|
+
while(count < text.length && text.charAt(atEnd ? text.length - 1 - count : count) === ' '){
|
|
39584
|
+
count += 1;
|
|
39585
|
+
}
|
|
39586
|
+
if (count === 0) {
|
|
39587
|
+
return text;
|
|
39588
|
+
}
|
|
39589
|
+
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);
|
|
39590
|
+
}
|
|
39591
|
+
function hidesSpace(neighbor, edge) {
|
|
39091
39592
|
var _neighbor_nodeValue;
|
|
39092
39593
|
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
39594
|
}
|
|
@@ -39310,14 +39811,10 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
39310
39811
|
var before = this.__findNeighbor(fake, true, block);
|
|
39311
39812
|
var after = this.__findNeighbor(fake, false, block);
|
|
39312
39813
|
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
|
-
});
|
|
39814
|
+
before.nodeValue = replaceEdgeSpaces(before.nodeValue, true);
|
|
39316
39815
|
}
|
|
39317
39816
|
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
|
-
});
|
|
39817
|
+
after.nodeValue = replaceEdgeSpaces(after.nodeValue, false);
|
|
39321
39818
|
}
|
|
39322
39819
|
}
|
|
39323
39820
|
},
|
|
@@ -42813,7 +43310,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42813
43310
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
42814
43311
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28077);
|
|
42815
43312
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65946);
|
|
42816
|
-
/* harmony import */ var
|
|
43313
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81910);
|
|
43314
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17326);
|
|
42817
43315
|
/*!
|
|
42818
43316
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42819
43317
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42828,6 +43326,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42828
43326
|
|
|
42829
43327
|
|
|
42830
43328
|
|
|
43329
|
+
|
|
42831
43330
|
/**
|
|
42832
43331
|
* Iframe plugin - use `iframe` instead of DIV in editor. It can be need when you want to attach custom styles in editor
|
|
42833
43332
|
* in backend of you system
|
|
@@ -42888,13 +43387,69 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42888
43387
|
var toggleEditable = function toggleEditable() {
|
|
42889
43388
|
(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
43389
|
};
|
|
43390
|
+
// The start of the whitespace run that ends at `to`
|
|
43391
|
+
var skipBack = function skipBack(text, to) {
|
|
43392
|
+
while(to > 0 && /\s/.test(text.charAt(to - 1))){
|
|
43393
|
+
to -= 1;
|
|
43394
|
+
}
|
|
43395
|
+
return to;
|
|
43396
|
+
};
|
|
43397
|
+
// The editor's own attributes on `<body>`: `min-height` and `contenteditable=true`
|
|
43398
|
+
var cleanBodyTag = function cleanBodyTag(tag) {
|
|
43399
|
+
tag = tag.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i, '');
|
|
43400
|
+
var skip = function skip(from, chars) {
|
|
43401
|
+
while(chars.test(tag.charAt(from))){
|
|
43402
|
+
from += 1;
|
|
43403
|
+
}
|
|
43404
|
+
return from;
|
|
43405
|
+
};
|
|
43406
|
+
var index = tag.indexOf('contenteditable');
|
|
43407
|
+
while(index !== -1){
|
|
43408
|
+
var to = skip(index + 'contenteditable'.length, /["'\s]/);
|
|
43409
|
+
if (tag.charAt(to) === '=') {
|
|
43410
|
+
to = skip(to + 1, /[\s"']/);
|
|
43411
|
+
if (tag.startsWith('true', to)) {
|
|
43412
|
+
to = skip(to + 4, /["']/);
|
|
43413
|
+
var from = index;
|
|
43414
|
+
if (/["']/.test(tag.charAt(from - 1))) {
|
|
43415
|
+
from -= 1;
|
|
43416
|
+
}
|
|
43417
|
+
from = skipBack(tag, from);
|
|
43418
|
+
return tag.slice(0, from) + tag.slice(to);
|
|
43419
|
+
}
|
|
43420
|
+
}
|
|
43421
|
+
index = tag.indexOf('contenteditable', index + 1);
|
|
43422
|
+
}
|
|
43423
|
+
return tag;
|
|
43424
|
+
};
|
|
42891
43425
|
var clearMarkers = function clearMarkers(html) {
|
|
42892
43426
|
// The plugins' own styles, from `getContainer`, aren't part of the value
|
|
42893
|
-
html =
|
|
42894
|
-
var
|
|
42895
|
-
|
|
42896
|
-
|
|
42897
|
-
|
|
43427
|
+
html = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(html, '<style', '>', '</style>', 'jodit-box');
|
|
43428
|
+
var bodyStart = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.indexOfOpenTag)(html, 'body');
|
|
43429
|
+
var bodyEnd = -1;
|
|
43430
|
+
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)){
|
|
43431
|
+
bodyEnd = index;
|
|
43432
|
+
}
|
|
43433
|
+
if (bodyStart !== -1 && bodyEnd !== -1) {
|
|
43434
|
+
var afterBody = bodyEnd + '</body>'.length;
|
|
43435
|
+
var gt = html.indexOf('>', bodyStart);
|
|
43436
|
+
var body = html.slice(bodyStart, afterBody);
|
|
43437
|
+
if (gt !== -1 && gt < bodyEnd) {
|
|
43438
|
+
body = cleanBodyTag(html.slice(bodyStart, gt)) + html.slice(gt, afterBody);
|
|
43439
|
+
}
|
|
43440
|
+
for(var _i = 0, _iter = [
|
|
43441
|
+
'style',
|
|
43442
|
+
'script',
|
|
43443
|
+
'span'
|
|
43444
|
+
]; _i < _iter.length; _i++){
|
|
43445
|
+
var tag = _iter[_i];
|
|
43446
|
+
body = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(body, '<' + tag, '>', '</' + tag + '>', 'jodit');
|
|
43447
|
+
}
|
|
43448
|
+
// remove markers: the spans outside the body are the editor's own
|
|
43449
|
+
var stripSpans = function stripSpans(part) {
|
|
43450
|
+
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>');
|
|
43451
|
+
};
|
|
43452
|
+
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
43453
|
}
|
|
42899
43454
|
return html;
|
|
42900
43455
|
};
|
|
@@ -49724,9 +50279,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49724
50279
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81937);
|
|
49725
50280
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23211);
|
|
49726
50281
|
/* 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
|
|
50282
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81910);
|
|
50283
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93640);
|
|
50284
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80991);
|
|
50285
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(51730);
|
|
49730
50286
|
/*!
|
|
49731
50287
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
49732
50288
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -49743,17 +50299,18 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49743
50299
|
|
|
49744
50300
|
|
|
49745
50301
|
|
|
50302
|
+
|
|
49746
50303
|
/**
|
|
49747
50304
|
* Process `video` and `audio`
|
|
49748
50305
|
*/ function media(editor) {
|
|
49749
50306
|
var keyFake = 'jodit_fake_wrapper';
|
|
49750
50307
|
var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock, mediaWrappers = _editor_options.mediaWrappers;
|
|
49751
50308
|
var wrap = function wrap(element) {
|
|
49752
|
-
if (element.parentNode && (0,
|
|
50309
|
+
if (element.parentNode && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
49753
50310
|
element = element.parentNode;
|
|
49754
50311
|
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
49755
50312
|
var _getMediaWrapper;
|
|
49756
|
-
element = (_getMediaWrapper = (0,
|
|
50313
|
+
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
50314
|
} else if (mediaInFakeBlock) {
|
|
49758
50315
|
var _$media = element;
|
|
49759
50316
|
var wrapper = editor.createInside.element(mediaFakeTag, (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)({
|
|
@@ -49761,13 +50318,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49761
50318
|
contenteditable: false,
|
|
49762
50319
|
draggable: true
|
|
49763
50320
|
}, "data-".concat(keyFake), 1));
|
|
49764
|
-
(0,
|
|
50321
|
+
(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
50322
|
// The wrapper fits the media, whose size changes as its metadata loads
|
|
49766
50323
|
// and as it's resized. A percentage width is of the line, so it takes that
|
|
49767
50324
|
var fit = function fit() {
|
|
49768
|
-
(0,
|
|
49769
|
-
display: (0,
|
|
49770
|
-
width: (0,
|
|
50325
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.css)(wrapper, {
|
|
50326
|
+
display: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(_$media, 'display') === 'inline-block' ? 'inline-block' : 'block',
|
|
50327
|
+
width: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(_$media, 'width').endsWith('%') ? '' : 'fit-content',
|
|
49771
50328
|
height: ''
|
|
49772
50329
|
});
|
|
49773
50330
|
};
|
|
@@ -49814,15 +50371,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
49814
50371
|
}
|
|
49815
50372
|
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
49816
50373
|
editor.e.on('afterGetValueFromEditor', function(data) {
|
|
49817
|
-
|
|
49818
|
-
if (rxp.test(data.value)) {
|
|
49819
|
-
data.value = data.value.replace(rxp, '$1');
|
|
49820
|
-
}
|
|
50374
|
+
data.value = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__.unwrapMarkedTags)(data.value, mediaFakeTag, "data-".concat(keyFake));
|
|
49821
50375
|
}).on('change afterInit afterSetMode changePlace', editor.async.debounce(function() {
|
|
49822
50376
|
if (!editor.isDestructed && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.MODE_SOURCE) {
|
|
49823
|
-
(0,
|
|
49824
|
-
if (!(0,
|
|
49825
|
-
(0,
|
|
50377
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.$$)(mediaBlocks.join(','), editor.editor).forEach(function(elm) {
|
|
50378
|
+
if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.dataBind)(elm, keyFake)) {
|
|
50379
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.dataBind)(elm, keyFake, true);
|
|
49826
50380
|
wrap(elm);
|
|
49827
50381
|
}
|
|
49828
50382
|
});
|
|
@@ -51032,7 +51586,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51032
51586
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23211);
|
|
51033
51587
|
/* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88475);
|
|
51034
51588
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28686);
|
|
51035
|
-
/* harmony import */ var
|
|
51589
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81910);
|
|
51590
|
+
/* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(53681);
|
|
51036
51591
|
/*!
|
|
51037
51592
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
51038
51593
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -51045,11 +51600,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51045
51600
|
|
|
51046
51601
|
|
|
51047
51602
|
|
|
51603
|
+
|
|
51048
51604
|
/**
|
|
51049
51605
|
* Remove special HTML comments
|
|
51050
51606
|
* @private
|
|
51051
51607
|
*/ function removeExtraFragments(html) {
|
|
51052
|
-
html =
|
|
51608
|
+
html = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_5__.removeTagsByPrefix)(html, [
|
|
51609
|
+
'<meta'
|
|
51610
|
+
]);
|
|
51053
51611
|
var start = html.search(/<!--StartFragment-->/i);
|
|
51054
51612
|
if (start !== -1) {
|
|
51055
51613
|
html = html.substring(start + 20);
|
|
@@ -51067,7 +51625,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51067
51625
|
* paste bold
|
|
51068
51626
|
* @private
|
|
51069
51627
|
*/ function removeGoogleDocsWrapper(html) {
|
|
51070
|
-
|
|
51628
|
+
// A plain search: the wrapper check is left to the parsed document below
|
|
51629
|
+
if (!/docs-internal-guid-/i.test(html)) {
|
|
51071
51630
|
return html;
|
|
51072
51631
|
}
|
|
51073
51632
|
// An inert document: images don't load and handlers don't run
|
|
@@ -51124,7 +51683,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51124
51683
|
var dialog = jodit.confirm('<div style="word-break: normal; white-space: normal">'.concat(jodit.i18n(msg), "</div>"), jodit.i18n(title));
|
|
51125
51684
|
var buttons = buttonList.map(function(param) {
|
|
51126
51685
|
var text = param.text, value = param.value;
|
|
51127
|
-
return (0,
|
|
51686
|
+
return (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_6__.Button)(jodit, {
|
|
51128
51687
|
text: text,
|
|
51129
51688
|
name: text.toLowerCase(),
|
|
51130
51689
|
tabIndex: 0
|
|
@@ -51141,7 +51700,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
51141
51700
|
}
|
|
51142
51701
|
jodit.e.fire('afterClosePasteDialog', dialog);
|
|
51143
51702
|
});
|
|
51144
|
-
var cancel = (0,
|
|
51703
|
+
var cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_6__.Button)(jodit, {
|
|
51145
51704
|
text: 'Cancel',
|
|
51146
51705
|
tabIndex: 0
|
|
51147
51706
|
}).onAction(function() {
|
|
@@ -52953,12 +53512,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
52953
53512
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23211);
|
|
52954
53513
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28077);
|
|
52955
53514
|
/* 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
|
|
53515
|
+
/* harmony import */ var jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81910);
|
|
53516
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80991);
|
|
53517
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18855);
|
|
53518
|
+
/* harmony import */ var jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(42259);
|
|
53519
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(4099);
|
|
53520
|
+
/* harmony import */ var jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(56490);
|
|
53521
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(96608);
|
|
52962
53522
|
/*!
|
|
52963
53523
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
52964
53524
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -52987,6 +53547,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
52987
53547
|
|
|
52988
53548
|
|
|
52989
53549
|
|
|
53550
|
+
|
|
52990
53551
|
var keyBInd = '__jodit-resizer_binded';
|
|
52991
53552
|
/**
|
|
52992
53553
|
* Reads a plain pixel value out of a `width`/`height` attribute.
|
|
@@ -53004,7 +53565,7 @@ var keyBInd = '__jodit-resizer_binded';
|
|
|
53004
53565
|
* A video with no height of its own takes it from its width and its ratio,
|
|
53005
53566
|
* so resizing it keeps the ratio without setting a height.
|
|
53006
53567
|
*/ 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,
|
|
53568
|
+
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
53569
|
}
|
|
53009
53570
|
var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
53010
53571
|
/**
|
|
@@ -53041,7 +53602,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53041
53602
|
}
|
|
53042
53603
|
if (_this.element && _this.rect) {
|
|
53043
53604
|
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,
|
|
53605
|
+
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
53606
|
var newTop = pos.top - workplacePosition.top, newLeft = pos.left - workplacePosition.left;
|
|
53046
53607
|
if (top !== newTop || left !== newLeft || w !== _this.element.offsetWidth || h !== _this.element.offsetHeight) {
|
|
53047
53608
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(_this.rect, {
|
|
@@ -53084,10 +53645,9 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53084
53645
|
.on('keydown', this.onEditorKeyDown, {
|
|
53085
53646
|
top: true
|
|
53086
53647
|
}).on('afterGetValueFromEditor.resizer', function(data) {
|
|
53087
|
-
|
|
53088
|
-
|
|
53089
|
-
|
|
53090
|
-
}
|
|
53648
|
+
data.value = (0,jodit_core_helpers_html_tag_scan__WEBPACK_IMPORTED_MODULE_12__.unwrapMarkedTags)(data.value, 'jodit', 'data-jodit_iframe_wrapper', function(inner) {
|
|
53649
|
+
return /<iframe/i.test(inner);
|
|
53650
|
+
});
|
|
53091
53651
|
});
|
|
53092
53652
|
this.addEventListeners();
|
|
53093
53653
|
this.__onChangeEditor();
|
|
@@ -53133,7 +53693,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53133
53693
|
return;
|
|
53134
53694
|
}
|
|
53135
53695
|
var width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(image, 'width');
|
|
53136
|
-
if (width && !(0,
|
|
53696
|
+
if (width && !(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(image, 'width')) {
|
|
53137
53697
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, 'width', width);
|
|
53138
53698
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(image, 'width', null);
|
|
53139
53699
|
}
|
|
@@ -53282,7 +53842,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53282
53842
|
value: function __followCaret() {
|
|
53283
53843
|
var before = this.__keyDownRange;
|
|
53284
53844
|
this.__keyDownRange = null;
|
|
53285
|
-
if (!(0,
|
|
53845
|
+
if (!(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_15__.isMoved)(this.j, before)) {
|
|
53286
53846
|
return;
|
|
53287
53847
|
}
|
|
53288
53848
|
if (this.isShown && this.element && !this.j.s.range.intersectsNode(this.element)) {
|
|
@@ -53326,7 +53886,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53326
53886
|
if (!this.isResizeMode) {
|
|
53327
53887
|
// A click in the element's popup, or in a list it opens, works on
|
|
53328
53888
|
// the element, so it keeps its frame
|
|
53329
|
-
if ((e === null || e === void 0 ? void 0 : e.target) &&
|
|
53889
|
+
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
53890
|
return;
|
|
53331
53891
|
}
|
|
53332
53892
|
return this.hide();
|
|
@@ -53356,7 +53916,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53356
53916
|
if (changeAttrs) {
|
|
53357
53917
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.attr)(element, key, value);
|
|
53358
53918
|
}
|
|
53359
|
-
if (!changeAttrs || (0,
|
|
53919
|
+
if (!changeAttrs || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(element, key)) {
|
|
53360
53920
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(element, key, value);
|
|
53361
53921
|
}
|
|
53362
53922
|
}
|
|
@@ -53435,7 +53995,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53435
53995
|
var width = element.offsetWidth || attrPixelSize(element, 'width');
|
|
53436
53996
|
var height = element.offsetHeight || attrPixelSize(element, 'height');
|
|
53437
53997
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(wrapper, {
|
|
53438
|
-
display: (0,
|
|
53998
|
+
display: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_13__.cssInline)(element, 'display') === 'inline-block' ? 'inline-block' : 'block'
|
|
53439
53999
|
});
|
|
53440
54000
|
if (width) {
|
|
53441
54001
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(wrapper, 'width', width);
|
|
@@ -53542,7 +54102,7 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53542
54102
|
}
|
|
53543
54103
|
]);
|
|
53544
54104
|
return resizer;
|
|
53545
|
-
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(
|
|
54105
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_14__.Plugin));
|
|
53546
54106
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__._)([
|
|
53547
54107
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)(':click')
|
|
53548
54108
|
], resizer.prototype, "onEditorClick", null);
|