jodit 4.13.5 → 4.13.7
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 +13 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +14 -14
- package/es2015/jodit.js +20 -6
- package/es2015/jodit.min.js +5 -5
- 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 +5 -5
- package/es2018/jodit.min.js +5 -5
- 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 +5 -5
- package/es2021/jodit.js +20 -6
- package/es2021/jodit.min.js +5 -5
- 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 +5 -5
- package/es2021.en/jodit.js +20 -6
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +20 -6
- 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/modules/dialog/dialog.js +6 -0
- package/esm/modules/toolbar/button/button.js +2 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +10 -3
- package/package.json +1 -1
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.13.
|
|
6
|
+
export const APP_VERSION = "4.13.7";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -529,6 +529,12 @@ let Dialog = Dialog_1 = class Dialog extends ViewWithToolbar {
|
|
|
529
529
|
this.isOpened = false;
|
|
530
530
|
const self = this;
|
|
531
531
|
self.options = ConfigProto(options, ConfigProto(Config.prototype.dialog, Dialog_1.defaultOptions));
|
|
532
|
+
// Attach event handlers passed via `options.events` to the dialog's own
|
|
533
|
+
// emitter (as FileBrowser already does), so a consumer — e.g. a plugin
|
|
534
|
+
// forwarding the editor's `events` config — can observe `afterOpen` /
|
|
535
|
+
// `beforeClose`. Unlike popups, the dialog fires these on its own
|
|
536
|
+
// emitter, so without this they were unreachable from the editor.
|
|
537
|
+
self.attachEvents(self.options);
|
|
532
538
|
Dom.safeRemove(self.container);
|
|
533
539
|
const n = this.getFullElName.bind(this);
|
|
534
540
|
self.container = this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
|
|
@@ -126,7 +126,8 @@ let ToolbarButton = class ToolbarButton extends UIButton {
|
|
|
126
126
|
button.classList.remove(cn);
|
|
127
127
|
button.classList.add(cn + '__button');
|
|
128
128
|
Object.defineProperty(button, 'component', {
|
|
129
|
-
value: this
|
|
129
|
+
value: this,
|
|
130
|
+
configurable: true
|
|
130
131
|
});
|
|
131
132
|
container.appendChild(button);
|
|
132
133
|
const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${Icon.get('chevron')}</span>`);
|
|
@@ -23,16 +23,23 @@ export function tryRemoveNode(jodit, nodeElm, hadEffect, allowTags, denyTags, cu
|
|
|
23
23
|
*/
|
|
24
24
|
function isRemovableNode(jodit, node, current, allow, deny) {
|
|
25
25
|
if (!Dom.isText(node)) {
|
|
26
|
-
|
|
26
|
+
// The allow/deny hashes are keyed by upper-cased tag name. HTML
|
|
27
|
+
// `nodeName` is already upper-case, but foreign (SVG/MathML) elements
|
|
28
|
+
// keep their original case — an SVG `<script>` reports `"script"`, so a
|
|
29
|
+
// case-sensitive lookup let it slip past `denyTags` and execute. Normalise
|
|
30
|
+
// to upper case so namespace can't bypass the filter. See
|
|
31
|
+
// GHSA-45qg-252v-3f7p.
|
|
32
|
+
const name = node.nodeName.toUpperCase();
|
|
33
|
+
if (allow && !allow[name]) {
|
|
27
34
|
return true;
|
|
28
35
|
}
|
|
29
36
|
// A YouTube/Vimeo player inserted through the Video button is trusted
|
|
30
37
|
// editor content, so keep it even though `iframe` is denied by default
|
|
31
38
|
// — otherwise the embed is stripped ~300ms after insertion (#1381).
|
|
32
39
|
// Arbitrary/bare iframes stay denied.
|
|
33
|
-
const isTrustedEmbed =
|
|
40
|
+
const isTrustedEmbed = name === 'IFRAME' &&
|
|
34
41
|
isAllowedMediaEmbed(attr(node, 'src') || '');
|
|
35
|
-
if (!allow && deny && deny[
|
|
42
|
+
if (!allow && deny && deny[name] && !isTrustedEmbed) {
|
|
36
43
|
return true;
|
|
37
44
|
}
|
|
38
45
|
}
|