jodit 4.10.3 → 4.11.3
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 +28 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +15 -15
- package/es2015/jodit.js +359 -62
- 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 +6 -6
- package/es2018/jodit.min.js +15 -15
- 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 +8 -8
- package/es2021/jodit.js +358 -62
- package/es2021/jodit.min.js +9 -9
- 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 +50 -50
- package/es2021.en/jodit.js +358 -62
- package/es2021.en/jodit.min.js +25 -25
- 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 +416 -62
- 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/config.d.ts +85 -0
- package/esm/core/constants.js +1 -1
- package/esm/core/dom/dom.d.ts +1 -0
- package/esm/core/helpers/html/safe-html.d.ts +3 -2
- package/esm/core/helpers/html/safe-html.js +42 -3
- package/esm/plugins/clean-html/clean-html.js +4 -0
- package/esm/plugins/clean-html/config.d.ts +85 -0
- package/esm/plugins/clean-html/config.js +7 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/convert-unsafe-embeds.d.ts +14 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/convert-unsafe-embeds.js +37 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/index.d.ts +4 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/index.js +4 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/safe-links-target.d.ts +14 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/safe-links-target.js +38 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.d.ts +14 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.js +24 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/sanitize-attributes.js +10 -5
- package/esm/plugins/clean-html/helpers/visitor/filters/sanitize-styles.d.ts +14 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/sanitize-styles.js +70 -0
- package/esm/plugins/drag-and-drop/drag-and-drop.js +1 -1
- package/esm/plugins/enter/helpers/insert-paragraph.js +2 -1
- package/esm/plugins/file/file.js +3 -2
- package/esm/plugins/iframe/iframe.js +8 -6
- package/esm/plugins/image/image.js +3 -2
- package/esm/plugins/image-properties/writers/link.js +6 -0
- package/esm/plugins/link/link.js +15 -3
- package/esm/plugins/resizer/resizer.js +2 -2
- package/esm/plugins/source/editor/engines/area.js +3 -7
- package/package.json +1 -1
- package/types/config.d.ts +85 -0
- package/types/core/dom/dom.d.ts +1 -0
- package/types/core/helpers/html/safe-html.d.ts +3 -2
- package/types/plugins/clean-html/config.d.ts +85 -0
- package/types/plugins/clean-html/helpers/visitor/filters/convert-unsafe-embeds.d.ts +14 -0
- package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +4 -0
- package/types/plugins/clean-html/helpers/visitor/filters/safe-links-target.d.ts +14 -0
- package/types/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.d.ts +14 -0
- package/types/plugins/clean-html/helpers/visitor/filters/sanitize-styles.d.ts +14 -0
package/es2021.en/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.
|
|
4
|
+
* Version: v4.11.3
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1758,7 +1758,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1758
1758
|
* ```
|
|
1759
1759
|
* @packageDocumentation
|
|
1760
1760
|
* @module constants
|
|
1761
|
-
*/ const APP_VERSION = "4.
|
|
1761
|
+
*/ const APP_VERSION = "4.11.3";
|
|
1762
1762
|
// prettier-ignore
|
|
1763
1763
|
const ES = "es2021";
|
|
1764
1764
|
const IS_ES_MODERN = true;
|
|
@@ -5934,14 +5934,50 @@ function normalizeCSS(s) {
|
|
|
5934
5934
|
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(box) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(box)) {
|
|
5935
5935
|
return;
|
|
5936
5936
|
}
|
|
5937
|
-
|
|
5938
|
-
|
|
5937
|
+
const removeEvents = options.removeEventAttributes ?? options.removeOnError;
|
|
5938
|
+
if (removeEvents) {
|
|
5939
|
+
removeAllEventAttributes(box);
|
|
5940
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('*', box).forEach((elm)=>removeAllEventAttributes(elm));
|
|
5941
|
+
} else if (options.removeOnError) {
|
|
5942
|
+
sanitizeHTMLElement(box, options);
|
|
5939
5943
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('[onerror]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
|
|
5940
5944
|
}
|
|
5941
5945
|
if (options.safeJavaScriptLink) {
|
|
5942
|
-
sanitizeHTMLElement(box);
|
|
5946
|
+
sanitizeHTMLElement(box, options);
|
|
5943
5947
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('a[href^="javascript"]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
|
|
5944
5948
|
}
|
|
5949
|
+
if (options.safeLinksTarget) {
|
|
5950
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('a[target="_blank"]', box).forEach((elm)=>{
|
|
5951
|
+
const rel = elm.getAttribute('rel') || '';
|
|
5952
|
+
const parts = rel.split(/\s+/).filter(Boolean);
|
|
5953
|
+
if (!parts.includes('noopener')) {
|
|
5954
|
+
parts.push('noopener');
|
|
5955
|
+
}
|
|
5956
|
+
if (!parts.includes('noreferrer')) {
|
|
5957
|
+
parts.push('noreferrer');
|
|
5958
|
+
}
|
|
5959
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
|
|
5960
|
+
});
|
|
5961
|
+
}
|
|
5962
|
+
}
|
|
5963
|
+
/**
|
|
5964
|
+
* Remove all on* event handler attributes from an element
|
|
5965
|
+
*/ function removeAllEventAttributes(elm) {
|
|
5966
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(elm)) {
|
|
5967
|
+
return false;
|
|
5968
|
+
}
|
|
5969
|
+
let effected = false;
|
|
5970
|
+
const toRemove = [];
|
|
5971
|
+
for(let i = 0; i < elm.attributes.length; i++){
|
|
5972
|
+
if (elm.attributes[i].name.toLowerCase().startsWith('on')) {
|
|
5973
|
+
toRemove.push(elm.attributes[i].name);
|
|
5974
|
+
}
|
|
5975
|
+
}
|
|
5976
|
+
for (const name of toRemove){
|
|
5977
|
+
elm.removeAttribute(name);
|
|
5978
|
+
effected = true;
|
|
5979
|
+
}
|
|
5980
|
+
return effected;
|
|
5945
5981
|
}
|
|
5946
5982
|
function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
|
|
5947
5983
|
safeJavaScriptLink: true,
|
|
@@ -26599,6 +26635,10 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
26599
26635
|
return false;
|
|
26600
26636
|
}
|
|
26601
26637
|
onSafeHTML(sandBox) {
|
|
26638
|
+
const sanitizer = this.j.o.cleanHTML.sanitizer;
|
|
26639
|
+
if (sanitizer) {
|
|
26640
|
+
sandBox.innerHTML = sanitizer(sandBox.innerHTML);
|
|
26641
|
+
}
|
|
26602
26642
|
(0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, this.j.o.cleanHTML);
|
|
26603
26643
|
}
|
|
26604
26644
|
/** @override */ beforeDestruct() {
|
|
@@ -26668,10 +26708,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
26668
26708
|
b: 'strong'
|
|
26669
26709
|
},
|
|
26670
26710
|
allowTags: false,
|
|
26671
|
-
denyTags: 'script',
|
|
26711
|
+
denyTags: 'script,iframe,object,embed',
|
|
26672
26712
|
useIframeSandbox: false,
|
|
26673
26713
|
removeOnError: true,
|
|
26714
|
+
removeEventAttributes: true,
|
|
26674
26715
|
safeJavaScriptLink: true,
|
|
26716
|
+
safeLinksTarget: true,
|
|
26717
|
+
allowedStyles: false,
|
|
26718
|
+
sanitizer: false,
|
|
26719
|
+
sandboxIframesInContent: true,
|
|
26720
|
+
convertUnsafeEmbeds: [
|
|
26721
|
+
'object',
|
|
26722
|
+
'embed'
|
|
26723
|
+
],
|
|
26675
26724
|
disableCleanFilter: null
|
|
26676
26725
|
};
|
|
26677
26726
|
jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.eraser = {
|
|
@@ -26933,6 +26982,56 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
|
|
|
26933
26982
|
}
|
|
26934
26983
|
|
|
26935
26984
|
|
|
26985
|
+
/***/ }),
|
|
26986
|
+
|
|
26987
|
+
/***/ 85085:
|
|
26988
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
26989
|
+
|
|
26990
|
+
"use strict";
|
|
26991
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26992
|
+
/* harmony export */ convertUnsafeEmbeds: function() { return /* binding */ convertUnsafeEmbeds; }
|
|
26993
|
+
/* harmony export */ });
|
|
26994
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
26995
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
26996
|
+
/*!
|
|
26997
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
26998
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
26999
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
27000
|
+
*/ /**
|
|
27001
|
+
* @module plugins/clean-html
|
|
27002
|
+
*/
|
|
27003
|
+
|
|
27004
|
+
/**
|
|
27005
|
+
* Convert `<object>` and `<embed>` elements to safer `<iframe>` elements.
|
|
27006
|
+
* @private
|
|
27007
|
+
*/ function convertUnsafeEmbeds(jodit, nodeElm, hadEffect) {
|
|
27008
|
+
const opt = jodit.o.cleanHTML.convertUnsafeEmbeds;
|
|
27009
|
+
if (!opt || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
|
|
27010
|
+
return hadEffect;
|
|
27011
|
+
}
|
|
27012
|
+
const tag = nodeElm.nodeName.toLowerCase();
|
|
27013
|
+
if (!opt.includes(tag)) {
|
|
27014
|
+
return hadEffect;
|
|
27015
|
+
}
|
|
27016
|
+
const elm = nodeElm;
|
|
27017
|
+
const src = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'data') || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'src') || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'movie') || '';
|
|
27018
|
+
if (!src) {
|
|
27019
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(elm);
|
|
27020
|
+
return true;
|
|
27021
|
+
}
|
|
27022
|
+
const iframe = jodit.createInside.element('iframe');
|
|
27023
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(iframe, {
|
|
27024
|
+
src,
|
|
27025
|
+
sandbox: '',
|
|
27026
|
+
frameborder: '0',
|
|
27027
|
+
width: (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'width'),
|
|
27028
|
+
height: (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'height')
|
|
27029
|
+
});
|
|
27030
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(elm, iframe, undefined, false, true);
|
|
27031
|
+
return true;
|
|
27032
|
+
}
|
|
27033
|
+
|
|
27034
|
+
|
|
26936
27035
|
/***/ }),
|
|
26937
27036
|
|
|
26938
27037
|
/***/ 39188:
|
|
@@ -26980,20 +27079,28 @@ const TABLE_CONTAINER_TAGS = new Set([
|
|
|
26980
27079
|
__webpack_require__.r(__webpack_exports__);
|
|
26981
27080
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26982
27081
|
/* harmony export */ allowAttributes: function() { return /* reexport safe */ _allow_attributes__WEBPACK_IMPORTED_MODULE_0__.allowAttributes; },
|
|
26983
|
-
/* harmony export */
|
|
26984
|
-
/* harmony export */
|
|
26985
|
-
/* harmony export */
|
|
26986
|
-
/* harmony export */
|
|
26987
|
-
/* harmony export */
|
|
26988
|
-
/* harmony export */
|
|
27082
|
+
/* harmony export */ convertUnsafeEmbeds: function() { return /* reexport safe */ _convert_unsafe_embeds__WEBPACK_IMPORTED_MODULE_1__.convertUnsafeEmbeds; },
|
|
27083
|
+
/* harmony export */ fillEmptyParagraph: function() { return /* reexport safe */ _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_2__.fillEmptyParagraph; },
|
|
27084
|
+
/* harmony export */ removeEmptyTextNode: function() { return /* reexport safe */ _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_3__.removeEmptyTextNode; },
|
|
27085
|
+
/* harmony export */ removeInvTextNodes: function() { return /* reexport safe */ _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_4__.removeInvTextNodes; },
|
|
27086
|
+
/* harmony export */ replaceOldTags: function() { return /* reexport safe */ _replace_old_tags__WEBPACK_IMPORTED_MODULE_5__.replaceOldTags; },
|
|
27087
|
+
/* harmony export */ safeLinksTarget: function() { return /* reexport safe */ _safe_links_target__WEBPACK_IMPORTED_MODULE_6__.safeLinksTarget; },
|
|
27088
|
+
/* harmony export */ sandboxIframesInContent: function() { return /* reexport safe */ _sandbox_iframes_in_content__WEBPACK_IMPORTED_MODULE_7__.sandboxIframesInContent; },
|
|
27089
|
+
/* harmony export */ sanitizeAttributes: function() { return /* reexport safe */ _sanitize_attributes__WEBPACK_IMPORTED_MODULE_8__.sanitizeAttributes; },
|
|
27090
|
+
/* harmony export */ sanitizeStyles: function() { return /* reexport safe */ _sanitize_styles__WEBPACK_IMPORTED_MODULE_9__.sanitizeStyles; },
|
|
27091
|
+
/* harmony export */ tryRemoveNode: function() { return /* reexport safe */ _try_remove_node__WEBPACK_IMPORTED_MODULE_10__.tryRemoveNode; }
|
|
26989
27092
|
/* harmony export */ });
|
|
26990
27093
|
/* harmony import */ var _allow_attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95559);
|
|
26991
|
-
/* harmony import */ var
|
|
26992
|
-
/* harmony import */ var
|
|
26993
|
-
/* harmony import */ var
|
|
26994
|
-
/* harmony import */ var
|
|
26995
|
-
/* harmony import */ var
|
|
26996
|
-
/* harmony import */ var
|
|
27094
|
+
/* harmony import */ var _convert_unsafe_embeds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85085);
|
|
27095
|
+
/* harmony import */ var _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39188);
|
|
27096
|
+
/* harmony import */ var _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94561);
|
|
27097
|
+
/* harmony import */ var _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53514);
|
|
27098
|
+
/* harmony import */ var _replace_old_tags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35104);
|
|
27099
|
+
/* harmony import */ var _safe_links_target__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77041);
|
|
27100
|
+
/* harmony import */ var _sandbox_iframes_in_content__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(66647);
|
|
27101
|
+
/* harmony import */ var _sanitize_attributes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65015);
|
|
27102
|
+
/* harmony import */ var _sanitize_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(60220);
|
|
27103
|
+
/* harmony import */ var _try_remove_node__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27611);
|
|
26997
27104
|
/*!
|
|
26998
27105
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
26999
27106
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -27011,6 +27118,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27011
27118
|
|
|
27012
27119
|
|
|
27013
27120
|
|
|
27121
|
+
|
|
27122
|
+
|
|
27123
|
+
|
|
27124
|
+
|
|
27014
27125
|
/***/ }),
|
|
27015
27126
|
|
|
27016
27127
|
/***/ 94561:
|
|
@@ -27127,6 +27238,90 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27127
27238
|
}
|
|
27128
27239
|
|
|
27129
27240
|
|
|
27241
|
+
/***/ }),
|
|
27242
|
+
|
|
27243
|
+
/***/ 77041:
|
|
27244
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27245
|
+
|
|
27246
|
+
"use strict";
|
|
27247
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27248
|
+
/* harmony export */ safeLinksTarget: function() { return /* binding */ safeLinksTarget; }
|
|
27249
|
+
/* harmony export */ });
|
|
27250
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
27251
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
27252
|
+
/*!
|
|
27253
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27254
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
27255
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
27256
|
+
*/ /**
|
|
27257
|
+
* @module plugins/clean-html
|
|
27258
|
+
*/
|
|
27259
|
+
|
|
27260
|
+
/**
|
|
27261
|
+
* Automatically add `rel="noopener noreferrer"` to links with `target="_blank"`
|
|
27262
|
+
* @private
|
|
27263
|
+
*/ function safeLinksTarget(jodit, nodeElm, hadEffect) {
|
|
27264
|
+
if (!jodit.o.cleanHTML.safeLinksTarget || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) || nodeElm.nodeName !== 'A') {
|
|
27265
|
+
return hadEffect;
|
|
27266
|
+
}
|
|
27267
|
+
const elm = nodeElm;
|
|
27268
|
+
if ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'target') !== '_blank') {
|
|
27269
|
+
return hadEffect;
|
|
27270
|
+
}
|
|
27271
|
+
const rel = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel') || '';
|
|
27272
|
+
const parts = rel.split(/\s+/).filter(Boolean);
|
|
27273
|
+
let changed = false;
|
|
27274
|
+
if (!parts.includes('noopener')) {
|
|
27275
|
+
parts.push('noopener');
|
|
27276
|
+
changed = true;
|
|
27277
|
+
}
|
|
27278
|
+
if (!parts.includes('noreferrer')) {
|
|
27279
|
+
parts.push('noreferrer');
|
|
27280
|
+
changed = true;
|
|
27281
|
+
}
|
|
27282
|
+
if (changed) {
|
|
27283
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
|
|
27284
|
+
return true;
|
|
27285
|
+
}
|
|
27286
|
+
return hadEffect;
|
|
27287
|
+
}
|
|
27288
|
+
|
|
27289
|
+
|
|
27290
|
+
/***/ }),
|
|
27291
|
+
|
|
27292
|
+
/***/ 66647:
|
|
27293
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27294
|
+
|
|
27295
|
+
"use strict";
|
|
27296
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27297
|
+
/* harmony export */ sandboxIframesInContent: function() { return /* binding */ sandboxIframesInContent; }
|
|
27298
|
+
/* harmony export */ });
|
|
27299
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
27300
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
27301
|
+
/*!
|
|
27302
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27303
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
27304
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
27305
|
+
*/ /**
|
|
27306
|
+
* @module plugins/clean-html
|
|
27307
|
+
*/
|
|
27308
|
+
|
|
27309
|
+
/**
|
|
27310
|
+
* Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
|
|
27311
|
+
* @private
|
|
27312
|
+
*/ function sandboxIframesInContent(jodit, nodeElm, hadEffect) {
|
|
27313
|
+
if (!jodit.o.cleanHTML.sandboxIframesInContent || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) || nodeElm.nodeName !== 'IFRAME') {
|
|
27314
|
+
return hadEffect;
|
|
27315
|
+
}
|
|
27316
|
+
const elm = nodeElm;
|
|
27317
|
+
if (!elm.hasAttribute('sandbox')) {
|
|
27318
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
|
|
27319
|
+
return true;
|
|
27320
|
+
}
|
|
27321
|
+
return hadEffect;
|
|
27322
|
+
}
|
|
27323
|
+
|
|
27324
|
+
|
|
27130
27325
|
/***/ }),
|
|
27131
27326
|
|
|
27132
27327
|
/***/ 65015:
|
|
@@ -27149,9 +27344,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27149
27344
|
/**
|
|
27150
27345
|
* @private
|
|
27151
27346
|
*/ function sanitizeAttributes(jodit, nodeElm, hadEffect) {
|
|
27152
|
-
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)
|
|
27153
|
-
|
|
27154
|
-
|
|
27347
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
|
|
27348
|
+
return hadEffect;
|
|
27349
|
+
}
|
|
27350
|
+
const opts = jodit.options.cleanHTML;
|
|
27351
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.sanitizeHTMLElement)(nodeElm, {
|
|
27352
|
+
safeJavaScriptLink: opts.safeJavaScriptLink,
|
|
27353
|
+
removeOnError: opts.removeOnError,
|
|
27354
|
+
removeEventAttributes: opts.removeEventAttributes,
|
|
27355
|
+
safeLinksTarget: opts.safeLinksTarget
|
|
27155
27356
|
})) {
|
|
27156
27357
|
return true;
|
|
27157
27358
|
}
|
|
@@ -27159,6 +27360,84 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27159
27360
|
}
|
|
27160
27361
|
|
|
27161
27362
|
|
|
27363
|
+
/***/ }),
|
|
27364
|
+
|
|
27365
|
+
/***/ 60220:
|
|
27366
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27367
|
+
|
|
27368
|
+
"use strict";
|
|
27369
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27370
|
+
/* harmony export */ sanitizeStyles: function() { return /* binding */ sanitizeStyles; }
|
|
27371
|
+
/* harmony export */ });
|
|
27372
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
27373
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
27374
|
+
/*!
|
|
27375
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27376
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
27377
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
27378
|
+
*/ /**
|
|
27379
|
+
* @module plugins/clean-html
|
|
27380
|
+
*/
|
|
27381
|
+
|
|
27382
|
+
/**
|
|
27383
|
+
* Filter CSS properties in style attributes based on allowedStyles whitelist
|
|
27384
|
+
* @private
|
|
27385
|
+
*/ function sanitizeStyles(jodit, nodeElm, hadEffect) {
|
|
27386
|
+
const allowedStyles = jodit.o.cleanHTML.allowedStyles;
|
|
27387
|
+
if (!allowedStyles || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
|
|
27388
|
+
return hadEffect;
|
|
27389
|
+
}
|
|
27390
|
+
const elm = nodeElm;
|
|
27391
|
+
const style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style');
|
|
27392
|
+
if (!style) {
|
|
27393
|
+
return hadEffect;
|
|
27394
|
+
}
|
|
27395
|
+
const tagName = nodeElm.nodeName.toLowerCase();
|
|
27396
|
+
const allowed = getAllowedPropsForTag(tagName, allowedStyles);
|
|
27397
|
+
if (!allowed) {
|
|
27398
|
+
return hadEffect;
|
|
27399
|
+
}
|
|
27400
|
+
const filtered = filterStyleProperties(style, allowed);
|
|
27401
|
+
if (filtered !== style) {
|
|
27402
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', filtered || null);
|
|
27403
|
+
return true;
|
|
27404
|
+
}
|
|
27405
|
+
return hadEffect;
|
|
27406
|
+
}
|
|
27407
|
+
function getAllowedPropsForTag(tagName, allowedStyles) {
|
|
27408
|
+
const tagSpecific = allowedStyles[tagName];
|
|
27409
|
+
const global = allowedStyles['*'];
|
|
27410
|
+
if (!tagSpecific && !global) {
|
|
27411
|
+
return null;
|
|
27412
|
+
}
|
|
27413
|
+
const set = new Set();
|
|
27414
|
+
if (global) {
|
|
27415
|
+
for (const prop of global){
|
|
27416
|
+
set.add(prop.toLowerCase());
|
|
27417
|
+
}
|
|
27418
|
+
}
|
|
27419
|
+
if (tagSpecific) {
|
|
27420
|
+
for (const prop of tagSpecific){
|
|
27421
|
+
set.add(prop.toLowerCase());
|
|
27422
|
+
}
|
|
27423
|
+
}
|
|
27424
|
+
return set;
|
|
27425
|
+
}
|
|
27426
|
+
function filterStyleProperties(style, allowed) {
|
|
27427
|
+
return style.split(';').map((s)=>s.trim()).filter((s)=>{
|
|
27428
|
+
if (!s) {
|
|
27429
|
+
return false;
|
|
27430
|
+
}
|
|
27431
|
+
const colonIdx = s.indexOf(':');
|
|
27432
|
+
if (colonIdx === -1) {
|
|
27433
|
+
return false;
|
|
27434
|
+
}
|
|
27435
|
+
const prop = s.substring(0, colonIdx).trim().toLowerCase();
|
|
27436
|
+
return allowed.has(prop);
|
|
27437
|
+
}).join('; ').replace(/;\s*$/, '');
|
|
27438
|
+
}
|
|
27439
|
+
|
|
27440
|
+
|
|
27162
27441
|
/***/ }),
|
|
27163
27442
|
|
|
27164
27443
|
/***/ 27611:
|
|
@@ -28272,7 +28551,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('dragAndDropElem
|
|
|
28272
28551
|
'src'
|
|
28273
28552
|
];
|
|
28274
28553
|
fragment = this.j.createInside.element(tagName);
|
|
28275
|
-
|
|
28554
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(fragment, field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(this.draggable, 'data-src') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(this.draggable, 'src') || '');
|
|
28276
28555
|
if (tagName === 'a') {
|
|
28277
28556
|
fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(fragment, field) || '';
|
|
28278
28557
|
}
|
|
@@ -28892,7 +29171,8 @@ function brBefore(start) {
|
|
|
28892
29171
|
/* harmony export */ insertParagraph: function() { return /* binding */ insertParagraph; }
|
|
28893
29172
|
/* harmony export */ });
|
|
28894
29173
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
28895
|
-
/* harmony import */ var
|
|
29174
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
29175
|
+
/* harmony import */ var jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60898);
|
|
28896
29176
|
/*!
|
|
28897
29177
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28898
29178
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28901,6 +29181,7 @@ function brBefore(start) {
|
|
|
28901
29181
|
* @module plugins/enter
|
|
28902
29182
|
*/
|
|
28903
29183
|
|
|
29184
|
+
|
|
28904
29185
|
/**
|
|
28905
29186
|
* Insert default paragraph
|
|
28906
29187
|
* @private
|
|
@@ -28910,11 +29191,11 @@ function brBefore(start) {
|
|
|
28910
29191
|
p.appendChild(br);
|
|
28911
29192
|
}
|
|
28912
29193
|
if (style && style.cssText) {
|
|
28913
|
-
|
|
29194
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(p, 'style', style.cssText);
|
|
28914
29195
|
}
|
|
28915
29196
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(fake, p);
|
|
28916
29197
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.before(isBR ? p : br, fake);
|
|
28917
|
-
(0,
|
|
29198
|
+
(0,jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
|
|
28918
29199
|
return p;
|
|
28919
29200
|
}
|
|
28920
29201
|
|
|
@@ -29104,8 +29385,9 @@ function brBefore(start) {
|
|
|
29104
29385
|
/* unused harmony export file */
|
|
29105
29386
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
29106
29387
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
|
|
29107
|
-
/* harmony import */ var
|
|
29108
|
-
/* harmony import */ var
|
|
29388
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
|
|
29389
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5266);
|
|
29390
|
+
/* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15753);
|
|
29109
29391
|
/*!
|
|
29110
29392
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29111
29393
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -29118,7 +29400,8 @@ function brBefore(start) {
|
|
|
29118
29400
|
|
|
29119
29401
|
|
|
29120
29402
|
|
|
29121
|
-
|
|
29403
|
+
|
|
29404
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
29122
29405
|
popup: (editor, current, close)=>{
|
|
29123
29406
|
const insert = (url, title = '')=>{
|
|
29124
29407
|
editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
|
|
@@ -29127,7 +29410,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
|
|
|
29127
29410
|
if (current && (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'a') || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'a', editor.editor))) {
|
|
29128
29411
|
sourceAnchor = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'a') ? current : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'a', editor.editor);
|
|
29129
29412
|
}
|
|
29130
|
-
return (0,
|
|
29413
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__.FileSelectorWidget)(editor, {
|
|
29131
29414
|
filebrowser: (data)=>{
|
|
29132
29415
|
data.files && data.files.forEach((file)=>insert(data.baseurl + file));
|
|
29133
29416
|
close();
|
|
@@ -29135,8 +29418,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
|
|
|
29135
29418
|
upload: true,
|
|
29136
29419
|
url: (url, text)=>{
|
|
29137
29420
|
if (sourceAnchor) {
|
|
29138
|
-
|
|
29139
|
-
|
|
29421
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'href', url);
|
|
29422
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'title', text);
|
|
29140
29423
|
} else {
|
|
29141
29424
|
insert(url, text);
|
|
29142
29425
|
}
|
|
@@ -29999,8 +30282,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
29999
30282
|
if (opt.iframeCSSLinks) {
|
|
30000
30283
|
opt.iframeCSSLinks.forEach((href)=>{
|
|
30001
30284
|
const link = doc.createElement('link');
|
|
30002
|
-
|
|
30003
|
-
|
|
30285
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'rel', 'stylesheet');
|
|
30286
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
|
|
30004
30287
|
doc.head && doc.head.appendChild(link);
|
|
30005
30288
|
});
|
|
30006
30289
|
}
|
|
@@ -30017,11 +30300,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
30017
30300
|
iframe.style.display = 'block';
|
|
30018
30301
|
iframe.src = 'about:blank';
|
|
30019
30302
|
iframe.className = 'jodit-wysiwyg_iframe';
|
|
30020
|
-
|
|
30021
|
-
|
|
30022
|
-
|
|
30303
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(iframe, {
|
|
30304
|
+
allowtransparency: 'true',
|
|
30305
|
+
tabindex: opt.tabIndex.toString(),
|
|
30306
|
+
frameborder: '0'
|
|
30307
|
+
});
|
|
30023
30308
|
if (opt.iframeSandbox != null) {
|
|
30024
|
-
|
|
30309
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(iframe, 'sandbox', opt.iframeSandbox);
|
|
30025
30310
|
}
|
|
30026
30311
|
editor.workplace.appendChild(iframe);
|
|
30027
30312
|
editor.iframe = iframe;
|
|
@@ -31708,6 +31993,10 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
|
|
|
31708
31993
|
}
|
|
31709
31994
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'href', imageLink);
|
|
31710
31995
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'target', imageLinkOpenInNewTab ? '_blank' : null);
|
|
31996
|
+
if (!imageLinkOpenInNewTab) {
|
|
31997
|
+
const relParts = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
|
|
31998
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
31999
|
+
}
|
|
31711
32000
|
} else {
|
|
31712
32001
|
if (link && link.parentNode) {
|
|
31713
32002
|
link.parentNode.replaceChild(image, link);
|
|
@@ -31817,11 +32106,12 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
|
|
|
31817
32106
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27795);
|
|
31818
32107
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
|
|
31819
32108
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65946);
|
|
31820
|
-
/* harmony import */ var
|
|
31821
|
-
/* harmony import */ var
|
|
31822
|
-
/* harmony import */ var
|
|
31823
|
-
/* harmony import */ var
|
|
31824
|
-
/* harmony import */ var
|
|
32109
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
32110
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29434);
|
|
32111
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5266);
|
|
32112
|
+
/* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15753);
|
|
32113
|
+
/* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64831);
|
|
32114
|
+
/* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_image_svg__WEBPACK_IMPORTED_MODULE_7__);
|
|
31825
32115
|
/*!
|
|
31826
32116
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
31827
32117
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -31837,15 +32127,16 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
|
|
|
31837
32127
|
|
|
31838
32128
|
|
|
31839
32129
|
|
|
31840
|
-
|
|
31841
|
-
|
|
32130
|
+
|
|
32131
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__.Icon.set('image', (_image_svg__WEBPACK_IMPORTED_MODULE_7___default()));
|
|
32132
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.image = {
|
|
31842
32133
|
popup: (editor, current, close)=>{
|
|
31843
32134
|
let sourceImage = null;
|
|
31844
32135
|
if (current && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(current) && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(current) && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('img', current).length)) {
|
|
31845
32136
|
sourceImage = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'img') ? current : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('img', current)[0];
|
|
31846
32137
|
}
|
|
31847
32138
|
editor.s.save();
|
|
31848
|
-
return (0,
|
|
32139
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__.FileSelectorWidget)(editor, {
|
|
31849
32140
|
filebrowser: (data)=>{
|
|
31850
32141
|
editor.s.restore();
|
|
31851
32142
|
data.files && data.files.forEach((file)=>editor.s.insertImage(data.baseurl + file, null, editor.o.imageDefaultWidth));
|
|
@@ -31858,8 +32149,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.image = {
|
|
|
31858
32149
|
url = '//' + url;
|
|
31859
32150
|
}
|
|
31860
32151
|
const image = sourceImage || editor.createInside.element('img');
|
|
31861
|
-
|
|
31862
|
-
|
|
32152
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'src', url);
|
|
32153
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'alt', text);
|
|
31863
32154
|
if (!sourceImage) {
|
|
31864
32155
|
await editor.s.insertImage(image, null, editor.o.imageDefaultWidth);
|
|
31865
32156
|
}
|
|
@@ -33521,7 +33812,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
33521
33812
|
}
|
|
33522
33813
|
if (jodit.s.isCollapsed()) {
|
|
33523
33814
|
const a = jodit.createInside.element('a');
|
|
33524
|
-
|
|
33815
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'href', html);
|
|
33525
33816
|
a.textContent = html;
|
|
33526
33817
|
jodit.e.fire('applyLink', jodit, a, null);
|
|
33527
33818
|
return a;
|
|
@@ -33581,7 +33872,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
33581
33872
|
target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'target') === '_blank';
|
|
33582
33873
|
}
|
|
33583
33874
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
33584
|
-
nofollow_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'rel')
|
|
33875
|
+
nofollow_checkbox.checked = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
|
|
33585
33876
|
}
|
|
33586
33877
|
insert.textContent = i18n('Update');
|
|
33587
33878
|
} else {
|
|
@@ -33647,7 +33938,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
33647
33938
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
33648
33939
|
}
|
|
33649
33940
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
33650
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel'
|
|
33941
|
+
const relParts = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
|
|
33942
|
+
const hasNofollow = relParts.includes('nofollow');
|
|
33943
|
+
if (nofollow_checkbox.checked && !hasNofollow) {
|
|
33944
|
+
relParts.push('nofollow');
|
|
33945
|
+
} else if (!nofollow_checkbox.checked && hasNofollow) {
|
|
33946
|
+
relParts.splice(relParts.indexOf('nofollow'), 1);
|
|
33947
|
+
}
|
|
33948
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
33651
33949
|
}
|
|
33652
33950
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
33653
33951
|
});
|
|
@@ -36278,8 +36576,8 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
36278
36576
|
this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
|
|
36279
36577
|
this.j.s.select(element);
|
|
36280
36578
|
}).off(element, 'changesize').on(element, 'changesize', ()=>{
|
|
36281
|
-
|
|
36282
|
-
|
|
36579
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth + 'px');
|
|
36580
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight + 'px');
|
|
36283
36581
|
});
|
|
36284
36582
|
}
|
|
36285
36583
|
this.j.e.on(element, 'dragstart', this.hide);
|
|
@@ -38316,8 +38614,9 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
38316
38614
|
/* harmony export */ });
|
|
38317
38615
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
38318
38616
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
38319
|
-
/* harmony import */ var
|
|
38320
|
-
/* harmony import */ var
|
|
38617
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
|
|
38618
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80991);
|
|
38619
|
+
/* harmony import */ var jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94193);
|
|
38321
38620
|
/*!
|
|
38322
38621
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38323
38622
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38328,7 +38627,8 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
38328
38627
|
|
|
38329
38628
|
|
|
38330
38629
|
|
|
38331
|
-
|
|
38630
|
+
|
|
38631
|
+
class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_4__.SourceEditor {
|
|
38332
38632
|
init(editor) {
|
|
38333
38633
|
this.instance = editor.c.element('textarea', {
|
|
38334
38634
|
class: 'jodit-source__mirror',
|
|
@@ -38336,7 +38636,7 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
38336
38636
|
});
|
|
38337
38637
|
this.container.appendChild(this.instance);
|
|
38338
38638
|
editor.e.on(this.instance, 'mousedown keydown touchstart input', editor.async.debounce(this.toWYSIWYG, editor.defaultTimeout)).on('setMinHeight.source', (minHeightD)=>{
|
|
38339
|
-
(0,
|
|
38639
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(this.instance, 'minHeight', minHeightD);
|
|
38340
38640
|
}).on(this.instance, 'change keydown mousedown touchstart input', this.autosize).on('afterSetMode.source', this.autosize).on(this.instance, 'mousedown focus', (e)=>{
|
|
38341
38641
|
editor.e.fire(e.type, e);
|
|
38342
38642
|
});
|
|
@@ -38380,14 +38680,10 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
38380
38680
|
this.instance.blur();
|
|
38381
38681
|
}
|
|
38382
38682
|
setPlaceHolder(title) {
|
|
38383
|
-
this.instance
|
|
38683
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(this.instance, 'placeholder', title);
|
|
38384
38684
|
}
|
|
38385
38685
|
setReadOnly(isReadOnly) {
|
|
38386
|
-
|
|
38387
|
-
this.instance.setAttribute('readonly', 'true');
|
|
38388
|
-
} else {
|
|
38389
|
-
this.instance.removeAttribute('readonly');
|
|
38390
|
-
}
|
|
38686
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(this.instance, 'readonly', isReadOnly ? 'true' : null);
|
|
38391
38687
|
}
|
|
38392
38688
|
selectAll() {
|
|
38393
38689
|
this.instance.select();
|