jodit 4.12.39 → 4.12.43
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 +12 -0
- package/es2015/jodit.css +13 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +64 -7
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +4 -4
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +4 -4
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +13 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +4 -4
- package/es2021/jodit.js +64 -7
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +4 -4
- 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 +13 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +4 -4
- package/es2021.en/jodit.js +64 -7
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +5 -5
- 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 +18 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +64 -8
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/modules/widget/file-selector/file-selector.js +7 -1
- package/esm/modules/widget/tabs/tabs.js +0 -3
- package/esm/plugins/clean-html/helpers/index.d.ts +1 -0
- package/esm/plugins/clean-html/helpers/index.js +1 -0
- package/esm/plugins/clean-html/helpers/is-allowed-media-embed.d.ts +15 -0
- package/esm/plugins/clean-html/helpers/is-allowed-media-embed.js +28 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.js +7 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +9 -1
- package/package.json +1 -1
- package/types/plugins/clean-html/helpers/index.d.ts +1 -0
- package/types/plugins/clean-html/helpers/is-allowed-media-embed.d.ts +15 -0
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.12.
|
|
4
|
+
* Version: v4.12.43
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1829,7 +1829,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1829
1829
|
* ```
|
|
1830
1830
|
* @packageDocumentation
|
|
1831
1831
|
* @module constants
|
|
1832
|
-
*/ const APP_VERSION = "4.12.
|
|
1832
|
+
*/ const APP_VERSION = "4.12.43";
|
|
1833
1833
|
// prettier-ignore
|
|
1834
1834
|
const ES = "es2015";
|
|
1835
1835
|
const IS_ES_MODERN = true;
|
|
@@ -25503,7 +25503,13 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
25503
25503
|
content: form.container
|
|
25504
25504
|
});
|
|
25505
25505
|
}
|
|
25506
|
-
|
|
25506
|
+
const box = (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__.TabsWidget)(editor, tabs);
|
|
25507
|
+
// Marks this popup so its tabs auto-size to their labels (see
|
|
25508
|
+
// `.jodit-file-selector` in tabs.less) — long localized tab captions are no
|
|
25509
|
+
// longer clipped — while leaving other tab popups (link, video …)
|
|
25510
|
+
// untouched.
|
|
25511
|
+
box.classList.add('jodit-file-selector');
|
|
25512
|
+
return box;
|
|
25507
25513
|
};
|
|
25508
25514
|
function val(elm, selector, value) {
|
|
25509
25515
|
const child = elm.querySelector(selector);
|
|
@@ -25659,9 +25665,6 @@ function val(elm, selector, value) {
|
|
|
25659
25665
|
tab
|
|
25660
25666
|
};
|
|
25661
25667
|
});
|
|
25662
|
-
Object.values(nameToTab).forEach(({ button })=>{
|
|
25663
|
-
button.container.style.width = (100 / tabs.length).toFixed(10) + '%';
|
|
25664
|
-
});
|
|
25665
25668
|
const tab = !state || !state.activeTab || !nameToTab[state.activeTab] ? firstTab : state.activeTab;
|
|
25666
25669
|
setActive(tab);
|
|
25667
25670
|
if (state) {
|
|
@@ -28032,6 +28035,43 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
|
|
|
28032
28035
|
|
|
28033
28036
|
|
|
28034
28037
|
|
|
28038
|
+
|
|
28039
|
+
/***/ }),
|
|
28040
|
+
|
|
28041
|
+
/***/ 28665:
|
|
28042
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
28043
|
+
|
|
28044
|
+
"use strict";
|
|
28045
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28046
|
+
/* harmony export */ isAllowedMediaEmbed: function() { return /* binding */ isAllowedMediaEmbed; }
|
|
28047
|
+
/* harmony export */ });
|
|
28048
|
+
/*!
|
|
28049
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28050
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
28051
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
28052
|
+
*/ /**
|
|
28053
|
+
* @module plugins/clean-html
|
|
28054
|
+
*/ // The embed URLs produced by the built-in Video button (see
|
|
28055
|
+
// `convertMediaUrlToVideoEmbed`): `//www.youtube.com/embed/<id>` and
|
|
28056
|
+
// `//player.vimeo.com/video/<id>`. `youtube-nocookie.com` is the privacy
|
|
28057
|
+
// variant YouTube offers for the same `/embed/` player. The `/embed/` and
|
|
28058
|
+
// `/video/` path prefixes are required so a bare provider link
|
|
28059
|
+
// (`youtube.com/@somebody`) is not treated as a player.
|
|
28060
|
+
const YOUTUBE_EMBED = /^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i;
|
|
28061
|
+
const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
|
|
28062
|
+
/**
|
|
28063
|
+
* Whether an `<iframe>` `src` points at a recognized YouTube/Vimeo video
|
|
28064
|
+
* player. Such iframes are inserted intentionally through the Video button, so
|
|
28065
|
+
* clean-html must not strip them (`denyTags` includes `iframe` by default) or
|
|
28066
|
+
* neutralize them with an empty `sandbox=""` (#1381). Arbitrary/bare iframes
|
|
28067
|
+
* are still removed.
|
|
28068
|
+
*
|
|
28069
|
+
* @private
|
|
28070
|
+
*/ function isAllowedMediaEmbed(src) {
|
|
28071
|
+
return YOUTUBE_EMBED.test(src) || VIMEO_EMBED.test(src);
|
|
28072
|
+
}
|
|
28073
|
+
|
|
28074
|
+
|
|
28035
28075
|
/***/ }),
|
|
28036
28076
|
|
|
28037
28077
|
/***/ 37431:
|
|
@@ -28520,6 +28560,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28520
28560
|
/* harmony export */ });
|
|
28521
28561
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
28522
28562
|
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
28563
|
+
/* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28665);
|
|
28523
28564
|
/*!
|
|
28524
28565
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28525
28566
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28528,6 +28569,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28528
28569
|
* @module plugins/clean-html
|
|
28529
28570
|
*/
|
|
28530
28571
|
|
|
28572
|
+
|
|
28531
28573
|
/**
|
|
28532
28574
|
* Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
|
|
28533
28575
|
* @private
|
|
@@ -28536,6 +28578,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28536
28578
|
return hadEffect;
|
|
28537
28579
|
}
|
|
28538
28580
|
const elm = nodeElm;
|
|
28581
|
+
// A trusted YouTube/Vimeo player (inserted via the Video button) must not
|
|
28582
|
+
// get an empty `sandbox=""` — that blocks scripts and stops playback. It
|
|
28583
|
+
// is served in its own third-party origin, so leave it as-is (#1381).
|
|
28584
|
+
if ((0,_is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__.isAllowedMediaEmbed)((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'src') || '')) {
|
|
28585
|
+
return hadEffect;
|
|
28586
|
+
}
|
|
28539
28587
|
if (!elm.hasAttribute('sandbox')) {
|
|
28540
28588
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
|
|
28541
28589
|
return true;
|
|
@@ -28672,6 +28720,8 @@ function filterStyleProperties(style, allowed) {
|
|
|
28672
28720
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
28673
28721
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
28674
28722
|
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4040);
|
|
28723
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
28724
|
+
/* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28665);
|
|
28675
28725
|
/*!
|
|
28676
28726
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28677
28727
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28681,6 +28731,8 @@ function filterStyleProperties(style, allowed) {
|
|
|
28681
28731
|
*/
|
|
28682
28732
|
|
|
28683
28733
|
|
|
28734
|
+
|
|
28735
|
+
|
|
28684
28736
|
/**
|
|
28685
28737
|
* @private
|
|
28686
28738
|
*/ function tryRemoveNode(jodit, nodeElm, hadEffect, allowTags, denyTags, currentSelectionNode) {
|
|
@@ -28697,7 +28749,12 @@ function filterStyleProperties(style, allowed) {
|
|
|
28697
28749
|
if (allow && !allow[node.nodeName]) {
|
|
28698
28750
|
return true;
|
|
28699
28751
|
}
|
|
28700
|
-
|
|
28752
|
+
// A YouTube/Vimeo player inserted through the Video button is trusted
|
|
28753
|
+
// editor content, so keep it even though `iframe` is denied by default
|
|
28754
|
+
// — otherwise the embed is stripped ~300ms after insertion (#1381).
|
|
28755
|
+
// Arbitrary/bare iframes stay denied.
|
|
28756
|
+
const isTrustedEmbed = node.nodeName === 'IFRAME' && (0,_is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_4__.isAllowedMediaEmbed)((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(node, 'src') || '');
|
|
28757
|
+
if (!allow && deny && deny[node.nodeName] && !isTrustedEmbed) {
|
|
28701
28758
|
return true;
|
|
28702
28759
|
}
|
|
28703
28760
|
}
|