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/es2021/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
|
*/
|
|
@@ -1823,7 +1823,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1823
1823
|
* ```
|
|
1824
1824
|
* @packageDocumentation
|
|
1825
1825
|
* @module constants
|
|
1826
|
-
*/ const APP_VERSION = "4.12.
|
|
1826
|
+
*/ const APP_VERSION = "4.12.43";
|
|
1827
1827
|
// prettier-ignore
|
|
1828
1828
|
const ES = "es2021";
|
|
1829
1829
|
const IS_ES_MODERN = true;
|
|
@@ -25316,7 +25316,13 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
25316
25316
|
content: form.container
|
|
25317
25317
|
});
|
|
25318
25318
|
}
|
|
25319
|
-
|
|
25319
|
+
const box = (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__.TabsWidget)(editor, tabs);
|
|
25320
|
+
// Marks this popup so its tabs auto-size to their labels (see
|
|
25321
|
+
// `.jodit-file-selector` in tabs.less) — long localized tab captions are no
|
|
25322
|
+
// longer clipped — while leaving other tab popups (link, video …)
|
|
25323
|
+
// untouched.
|
|
25324
|
+
box.classList.add('jodit-file-selector');
|
|
25325
|
+
return box;
|
|
25320
25326
|
};
|
|
25321
25327
|
function val(elm, selector, value) {
|
|
25322
25328
|
const child = elm.querySelector(selector);
|
|
@@ -25472,9 +25478,6 @@ function val(elm, selector, value) {
|
|
|
25472
25478
|
tab
|
|
25473
25479
|
};
|
|
25474
25480
|
});
|
|
25475
|
-
Object.values(nameToTab).forEach(({ button })=>{
|
|
25476
|
-
button.container.style.width = (100 / tabs.length).toFixed(10) + '%';
|
|
25477
|
-
});
|
|
25478
25481
|
const tab = !state || !state.activeTab || !nameToTab[state.activeTab] ? firstTab : state.activeTab;
|
|
25479
25482
|
setActive(tab);
|
|
25480
25483
|
if (state) {
|
|
@@ -27836,6 +27839,43 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
|
|
|
27836
27839
|
|
|
27837
27840
|
|
|
27838
27841
|
|
|
27842
|
+
|
|
27843
|
+
/***/ }),
|
|
27844
|
+
|
|
27845
|
+
/***/ 28665:
|
|
27846
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27847
|
+
|
|
27848
|
+
"use strict";
|
|
27849
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27850
|
+
/* harmony export */ isAllowedMediaEmbed: function() { return /* binding */ isAllowedMediaEmbed; }
|
|
27851
|
+
/* harmony export */ });
|
|
27852
|
+
/*!
|
|
27853
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27854
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
27855
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
27856
|
+
*/ /**
|
|
27857
|
+
* @module plugins/clean-html
|
|
27858
|
+
*/ // The embed URLs produced by the built-in Video button (see
|
|
27859
|
+
// `convertMediaUrlToVideoEmbed`): `//www.youtube.com/embed/<id>` and
|
|
27860
|
+
// `//player.vimeo.com/video/<id>`. `youtube-nocookie.com` is the privacy
|
|
27861
|
+
// variant YouTube offers for the same `/embed/` player. The `/embed/` and
|
|
27862
|
+
// `/video/` path prefixes are required so a bare provider link
|
|
27863
|
+
// (`youtube.com/@somebody`) is not treated as a player.
|
|
27864
|
+
const YOUTUBE_EMBED = /^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i;
|
|
27865
|
+
const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
|
|
27866
|
+
/**
|
|
27867
|
+
* Whether an `<iframe>` `src` points at a recognized YouTube/Vimeo video
|
|
27868
|
+
* player. Such iframes are inserted intentionally through the Video button, so
|
|
27869
|
+
* clean-html must not strip them (`denyTags` includes `iframe` by default) or
|
|
27870
|
+
* neutralize them with an empty `sandbox=""` (#1381). Arbitrary/bare iframes
|
|
27871
|
+
* are still removed.
|
|
27872
|
+
*
|
|
27873
|
+
* @private
|
|
27874
|
+
*/ function isAllowedMediaEmbed(src) {
|
|
27875
|
+
return YOUTUBE_EMBED.test(src) || VIMEO_EMBED.test(src);
|
|
27876
|
+
}
|
|
27877
|
+
|
|
27878
|
+
|
|
27839
27879
|
/***/ }),
|
|
27840
27880
|
|
|
27841
27881
|
/***/ 37431:
|
|
@@ -28324,6 +28364,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28324
28364
|
/* harmony export */ });
|
|
28325
28365
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
28326
28366
|
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
28367
|
+
/* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28665);
|
|
28327
28368
|
/*!
|
|
28328
28369
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28329
28370
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28332,6 +28373,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28332
28373
|
* @module plugins/clean-html
|
|
28333
28374
|
*/
|
|
28334
28375
|
|
|
28376
|
+
|
|
28335
28377
|
/**
|
|
28336
28378
|
* Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
|
|
28337
28379
|
* @private
|
|
@@ -28340,6 +28382,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28340
28382
|
return hadEffect;
|
|
28341
28383
|
}
|
|
28342
28384
|
const elm = nodeElm;
|
|
28385
|
+
// A trusted YouTube/Vimeo player (inserted via the Video button) must not
|
|
28386
|
+
// get an empty `sandbox=""` — that blocks scripts and stops playback. It
|
|
28387
|
+
// is served in its own third-party origin, so leave it as-is (#1381).
|
|
28388
|
+
if ((0,_is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__.isAllowedMediaEmbed)((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'src') || '')) {
|
|
28389
|
+
return hadEffect;
|
|
28390
|
+
}
|
|
28343
28391
|
if (!elm.hasAttribute('sandbox')) {
|
|
28344
28392
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
|
|
28345
28393
|
return true;
|
|
@@ -28476,6 +28524,8 @@ function filterStyleProperties(style, allowed) {
|
|
|
28476
28524
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
28477
28525
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
28478
28526
|
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4040);
|
|
28527
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
28528
|
+
/* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28665);
|
|
28479
28529
|
/*!
|
|
28480
28530
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28481
28531
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28485,6 +28535,8 @@ function filterStyleProperties(style, allowed) {
|
|
|
28485
28535
|
*/
|
|
28486
28536
|
|
|
28487
28537
|
|
|
28538
|
+
|
|
28539
|
+
|
|
28488
28540
|
/**
|
|
28489
28541
|
* @private
|
|
28490
28542
|
*/ function tryRemoveNode(jodit, nodeElm, hadEffect, allowTags, denyTags, currentSelectionNode) {
|
|
@@ -28501,7 +28553,12 @@ function filterStyleProperties(style, allowed) {
|
|
|
28501
28553
|
if (allow && !allow[node.nodeName]) {
|
|
28502
28554
|
return true;
|
|
28503
28555
|
}
|
|
28504
|
-
|
|
28556
|
+
// A YouTube/Vimeo player inserted through the Video button is trusted
|
|
28557
|
+
// editor content, so keep it even though `iframe` is denied by default
|
|
28558
|
+
// — otherwise the embed is stripped ~300ms after insertion (#1381).
|
|
28559
|
+
// Arbitrary/bare iframes stay denied.
|
|
28560
|
+
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') || '');
|
|
28561
|
+
if (!allow && deny && deny[node.nodeName] && !isTrustedEmbed) {
|
|
28505
28562
|
return true;
|
|
28506
28563
|
}
|
|
28507
28564
|
}
|