jodit 4.2.39 → 4.2.40
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 +18 -9
- package/es2015/jodit.css +7 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +48 -34
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.css +53 -0
- package/es2015/plugins/debug/debug.js +162 -24
- package/es2015/plugins/debug/debug.min.css +1 -0
- package/es2015/plugins/debug/debug.min.js +2 -2
- 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.css +7 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +48 -34
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.css +53 -0
- package/es2018/plugins/debug/debug.js +162 -24
- package/es2018/plugins/debug/debug.min.css +1 -0
- package/es2018/plugins/debug/debug.min.js +2 -2
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +7 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +48 -33
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.css +53 -0
- package/es2021/plugins/debug/debug.js +161 -24
- package/es2021/plugins/debug/debug.min.css +1 -0
- package/es2021/plugins/debug/debug.min.js +2 -2
- 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 +7 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +48 -33
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.css +53 -0
- package/es2021.en/plugins/debug/debug.js +161 -24
- package/es2021.en/plugins/debug/debug.min.css +1 -0
- package/es2021.en/plugins/debug/debug.min.js +2 -2
- 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/164.fat.min.js +1 -1
- package/es5/164.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +11 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +54 -43
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +53 -0
- package/es5/plugins/debug/debug.js +161 -24
- package/es5/plugins/debug/debug.min.css +1 -0
- package/es5/plugins/debug/debug.min.js +2 -2
- 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/esm/core/constants.js +1 -1
- package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
- package/esm/core/ui/button/tooltip/tooltip.js +19 -8
- package/esm/core/view/view-with-toolbar.d.ts +1 -0
- package/esm/core/view/view-with-toolbar.js +3 -0
- package/esm/modules/toolbar/collection/collection.d.ts +0 -1
- package/esm/modules/toolbar/collection/collection.js +1 -4
- package/esm/plugins/debug/debug.d.ts +1 -0
- package/esm/plugins/enter/helpers/check-br.js +2 -0
- package/esm/plugins/index.js +1 -0
- package/esm/plugins/inline-popup/inline-popup.d.ts +0 -1
- package/esm/plugins/inline-popup/inline-popup.js +7 -7
- package/package.json +1 -1
- package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
- package/types/core/view/view-with-toolbar.d.ts +1 -0
- package/types/modules/toolbar/collection/collection.d.ts +0 -1
- package/types/plugins/debug/debug.d.ts +1 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +0 -1
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.2.
|
|
4
|
+
* Version: v4.2.40
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1736,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1736
1736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1737
1737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1738
1738
|
*/
|
|
1739
|
-
const APP_VERSION = "4.2.
|
|
1739
|
+
const APP_VERSION = "4.2.40";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2021";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -13410,6 +13410,7 @@ const JODIT_EVENTS_ON_HIDE = [
|
|
|
13410
13410
|
'changePlace.tooltip',
|
|
13411
13411
|
'afterOpenPopup.tooltip',
|
|
13412
13412
|
'hidePopup.tooltip',
|
|
13413
|
+
'beforePopupClose.tooltip',
|
|
13413
13414
|
'closeAllPopups.tooltip'
|
|
13414
13415
|
];
|
|
13415
13416
|
let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_5__/* .UIElement */ .D {
|
|
@@ -13422,6 +13423,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13422
13423
|
constructor(view) {
|
|
13423
13424
|
super(view);
|
|
13424
13425
|
this.__isOpened = false;
|
|
13426
|
+
this.__attachedContainers = new Set();
|
|
13425
13427
|
this.__listenClose = false;
|
|
13426
13428
|
this.__currentTarget = null;
|
|
13427
13429
|
this.__delayShowTimeout = 0;
|
|
@@ -13440,7 +13442,16 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13440
13442
|
__onAttach(container) {
|
|
13441
13443
|
// TODO Move it inside __show method. Now it is here because testcase failed with capturing
|
|
13442
13444
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13443
|
-
this.
|
|
13445
|
+
this.__attachedContainers.add(container);
|
|
13446
|
+
this.__attachedContainers.add(this.j.container);
|
|
13447
|
+
this.j.e
|
|
13448
|
+
.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13449
|
+
capture: true
|
|
13450
|
+
})
|
|
13451
|
+
.on(container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13452
|
+
capture: true
|
|
13453
|
+
})
|
|
13454
|
+
.on(this.j.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13444
13455
|
capture: true
|
|
13445
13456
|
});
|
|
13446
13457
|
}
|
|
@@ -13452,10 +13463,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13452
13463
|
const view = this.j;
|
|
13453
13464
|
view.e
|
|
13454
13465
|
.on(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
|
|
13455
|
-
.on(JODIT_EVENTS_ON_HIDE, this.__hide)
|
|
13456
|
-
.on(view.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13457
|
-
capture: true
|
|
13458
|
-
});
|
|
13466
|
+
.on(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13459
13467
|
}
|
|
13460
13468
|
__removeListenersOnLeave() {
|
|
13461
13469
|
if (!this.__listenClose) {
|
|
@@ -13465,8 +13473,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13465
13473
|
const view = this.j;
|
|
13466
13474
|
view.e
|
|
13467
13475
|
.off(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
|
|
13468
|
-
.off(JODIT_EVENTS_ON_HIDE, this.__hide)
|
|
13469
|
-
.off(view.container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13476
|
+
.off(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13470
13477
|
}
|
|
13471
13478
|
__onMouseLeave(e) {
|
|
13472
13479
|
if (this.__currentTarget === e.target) {
|
|
@@ -13543,7 +13550,11 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13543
13550
|
this.__hideTimeout = this.async.setTimeout(this.__hide, this.j.defaultTimeout);
|
|
13544
13551
|
}
|
|
13545
13552
|
destruct() {
|
|
13546
|
-
this.
|
|
13553
|
+
this.__attachedContainers.forEach(container => {
|
|
13554
|
+
this.j.e
|
|
13555
|
+
.off(container, 'mouseenter.tooltip', this.__onMouseEnter)
|
|
13556
|
+
.off(container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13557
|
+
});
|
|
13547
13558
|
this.__hide();
|
|
13548
13559
|
super.destruct();
|
|
13549
13560
|
}
|
|
@@ -15762,17 +15773,18 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15762
15773
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15763
15774
|
/* harmony export */ T: function() { return /* binding */ ViewWithToolbar; }
|
|
15764
15775
|
/* harmony export */ });
|
|
15765
|
-
/* harmony import */ var
|
|
15776
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31635);
|
|
15766
15777
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
|
|
15767
|
-
/* harmony import */ var
|
|
15778
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(26318);
|
|
15768
15779
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
15769
15780
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
15770
15781
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32709);
|
|
15771
|
-
/* harmony import */ var
|
|
15782
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98253);
|
|
15772
15783
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58720);
|
|
15773
|
-
/* harmony import */ var
|
|
15774
|
-
/* harmony import */ var
|
|
15775
|
-
/* harmony import */ var
|
|
15784
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53048);
|
|
15785
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(39611);
|
|
15786
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77782);
|
|
15787
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8809);
|
|
15776
15788
|
/*!
|
|
15777
15789
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
15778
15790
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -15790,13 +15802,14 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15790
15802
|
|
|
15791
15803
|
|
|
15792
15804
|
|
|
15793
|
-
|
|
15805
|
+
|
|
15806
|
+
class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__/* .View */ .S {
|
|
15794
15807
|
/**
|
|
15795
15808
|
* Container for toolbar
|
|
15796
15809
|
*/
|
|
15797
15810
|
get toolbarContainer() {
|
|
15798
15811
|
if (!this.o.fullsize &&
|
|
15799
|
-
((0,
|
|
15812
|
+
((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__/* .isString */ .K)(this.o.toolbar) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(this.o.toolbar))) {
|
|
15800
15813
|
return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__/* .resolveElement */ .tI)(this.o.toolbar, this.o.shadowRoot || this.od);
|
|
15801
15814
|
}
|
|
15802
15815
|
this.o.toolbar &&
|
|
@@ -15868,7 +15881,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15868
15881
|
beforeToolbarBuild(items) {
|
|
15869
15882
|
if (Object.keys(this.groupToButtons).length) {
|
|
15870
15883
|
return items.map(item => {
|
|
15871
|
-
if ((0,
|
|
15884
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item) &&
|
|
15872
15885
|
item.group &&
|
|
15873
15886
|
this.groupToButtons[item.group]) {
|
|
15874
15887
|
return {
|
|
@@ -15886,11 +15899,12 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15886
15899
|
/** @override **/
|
|
15887
15900
|
constructor(options, isJodit = false) {
|
|
15888
15901
|
super(options, isJodit);
|
|
15889
|
-
this.toolbar = (0,
|
|
15902
|
+
this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__/* .makeCollection */ .$K)(this);
|
|
15890
15903
|
this.__defaultToolbarContainer = this.c.div('jodit-toolbar__box');
|
|
15891
15904
|
this.registeredButtons = new Set();
|
|
15892
15905
|
this.groupToButtons = {};
|
|
15893
15906
|
this.isJodit = false;
|
|
15907
|
+
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__/* .UITooltip */ .SB(this);
|
|
15894
15908
|
this.isJodit = isJodit;
|
|
15895
15909
|
this.e.on('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15896
15910
|
}
|
|
@@ -15900,17 +15914,18 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15900
15914
|
}
|
|
15901
15915
|
this.setStatus(jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.beforeDestruct);
|
|
15902
15916
|
this.e.off('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15917
|
+
this.__tooltip.destruct();
|
|
15903
15918
|
this.toolbar.destruct();
|
|
15904
15919
|
// @ts-ignore After destruct, we are not responsible for anything
|
|
15905
15920
|
this.toolbar = undefined;
|
|
15906
15921
|
super.destruct();
|
|
15907
15922
|
}
|
|
15908
15923
|
}
|
|
15909
|
-
(0,
|
|
15924
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15910
15925
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
15911
15926
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
15912
|
-
(0,
|
|
15913
|
-
|
|
15927
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15928
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Ay
|
|
15914
15929
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
15915
15930
|
|
|
15916
15931
|
|
|
@@ -23579,7 +23594,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23579
23594
|
super(jodit);
|
|
23580
23595
|
this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
|
|
23581
23596
|
'selectionchange changeSelection focus afterSetMode touchstart focus blur';
|
|
23582
|
-
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITooltip */ .SB(this.jodit);
|
|
23583
23597
|
}
|
|
23584
23598
|
__initEvents() {
|
|
23585
23599
|
this.j.e
|
|
@@ -23609,8 +23623,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23609
23623
|
if (this.isDestructed) {
|
|
23610
23624
|
return;
|
|
23611
23625
|
}
|
|
23612
|
-
this.__tooltip?.destruct();
|
|
23613
|
-
this.__tooltip = null;
|
|
23614
23626
|
this.j.e
|
|
23615
23627
|
.off(this.__listenEvents, this.update)
|
|
23616
23628
|
.off('afterSetMode focus', this.__immediateUpdate);
|
|
@@ -29137,9 +29149,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('enter
|
|
|
29137
29149
|
*/
|
|
29138
29150
|
function checkBR(fake, jodit, shiftKeyPressed) {
|
|
29139
29151
|
const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['pre', 'blockquote'], jodit.editor));
|
|
29152
|
+
const isCell = !isMultiLineBlock && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['td', 'th'], jodit.editor);
|
|
29140
29153
|
const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
|
|
29141
29154
|
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
29142
29155
|
if (isBRMode ||
|
|
29156
|
+
isCell ||
|
|
29143
29157
|
(shiftKeyPressed && !isMultiLineBlock) ||
|
|
29144
29158
|
(!shiftKeyPressed && isMultiLineBlock)) {
|
|
29145
29159
|
// 2 BR before
|
|
@@ -32616,6 +32630,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('inden
|
|
|
32616
32630
|
|
|
32617
32631
|
|
|
32618
32632
|
|
|
32633
|
+
// import 'jodit/plugins/debug/debug';
|
|
32619
32634
|
|
|
32620
32635
|
|
|
32621
32636
|
|
|
@@ -33245,10 +33260,10 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33245
33260
|
if (!this.j.o.toolbarInlineForSelection) {
|
|
33246
33261
|
return;
|
|
33247
33262
|
}
|
|
33248
|
-
const type = 'selection'
|
|
33249
|
-
|
|
33250
|
-
|
|
33251
|
-
|
|
33263
|
+
const type = 'selection';
|
|
33264
|
+
const sel = this.j.s.sel;
|
|
33265
|
+
const range = this.j.s.range;
|
|
33266
|
+
if (sel?.isCollapsed || this.isSelectedTarget(range)) {
|
|
33252
33267
|
if (this.type === type && this.popup.isOpened) {
|
|
33253
33268
|
this.hidePopup();
|
|
33254
33269
|
}
|
|
@@ -33273,9 +33288,9 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33273
33288
|
/**
|
|
33274
33289
|
* Shortcut for Table module
|
|
33275
33290
|
*/
|
|
33276
|
-
get tableModule() {
|
|
33277
|
-
|
|
33278
|
-
}
|
|
33291
|
+
// private get tableModule(): Table {
|
|
33292
|
+
// return this.j.getInstance<Table>('Table', this.j.o);
|
|
33293
|
+
// }
|
|
33279
33294
|
/** @override **/
|
|
33280
33295
|
beforeDestruct(jodit) {
|
|
33281
33296
|
jodit.e
|