jodit 4.2.39 → 4.2.41
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 +51 -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 +85 -54
- 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 +85 -54
- 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 +85 -53
- 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 +85 -53
- 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 +92 -65
- 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/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +7 -3
- 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/clean-html/config.d.ts +9 -0
- 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/esm/plugins/link/link.js +6 -2
- package/esm/plugins/video/config.d.ts +29 -0
- package/esm/plugins/video/config.js +26 -17
- package/esm/plugins/wrap-nodes/config.d.ts +5 -1
- package/package.json +1 -1
- package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -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/clean-html/config.d.ts +9 -0
- package/types/plugins/debug/debug.d.ts +1 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +0 -1
- package/types/plugins/video/config.d.ts +29 -0
- package/types/plugins/wrap-nodes/config.d.ts +5 -1
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.2.
|
|
4
|
+
* Version: v4.2.41
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1735,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1735
1735
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1736
1736
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1737
1737
|
*/
|
|
1738
|
-
const APP_VERSION = "4.2.
|
|
1738
|
+
const APP_VERSION = "4.2.41";
|
|
1739
1739
|
// prettier-ignore
|
|
1740
1740
|
const ES = "es2015";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -7691,11 +7691,12 @@ function ConfigFlatten(obj) {
|
|
|
7691
7691
|
/**
|
|
7692
7692
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7693
7693
|
*/
|
|
7694
|
-
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7694
|
+
const convertMediaUrlToVideoEmbed = (url, { width = 400, height = 345 } = {}) => {
|
|
7695
7695
|
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7696
7696
|
return url;
|
|
7697
7697
|
}
|
|
7698
|
-
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a')
|
|
7698
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
7699
|
+
const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7699
7700
|
parser.href = url;
|
|
7700
7701
|
if (!width) {
|
|
7701
7702
|
width = 400;
|
|
@@ -7722,7 +7723,10 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7722
7723
|
case 'www.youtu.be': {
|
|
7723
7724
|
const query = parser.search
|
|
7724
7725
|
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7725
|
-
: { v: parser.pathname.
|
|
7726
|
+
: { v: parser.pathname.substring(1) };
|
|
7727
|
+
if (/^embed\/.*/.test(query.v)) {
|
|
7728
|
+
query.v = query.v.substring(6);
|
|
7729
|
+
}
|
|
7726
7730
|
return query.v
|
|
7727
7731
|
? '<iframe width="' +
|
|
7728
7732
|
width +
|
|
@@ -13427,6 +13431,7 @@ const JODIT_EVENTS_ON_HIDE = [
|
|
|
13427
13431
|
'changePlace.tooltip',
|
|
13428
13432
|
'afterOpenPopup.tooltip',
|
|
13429
13433
|
'hidePopup.tooltip',
|
|
13434
|
+
'beforePopupClose.tooltip',
|
|
13430
13435
|
'closeAllPopups.tooltip'
|
|
13431
13436
|
];
|
|
13432
13437
|
let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_5__/* .UIElement */ .D {
|
|
@@ -13439,6 +13444,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13439
13444
|
constructor(view) {
|
|
13440
13445
|
super(view);
|
|
13441
13446
|
this.__isOpened = false;
|
|
13447
|
+
this.__attachedContainers = new Set();
|
|
13442
13448
|
this.__listenClose = false;
|
|
13443
13449
|
this.__currentTarget = null;
|
|
13444
13450
|
this.__delayShowTimeout = 0;
|
|
@@ -13457,7 +13463,16 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13457
13463
|
__onAttach(container) {
|
|
13458
13464
|
// TODO Move it inside __show method. Now it is here because testcase failed with capturing
|
|
13459
13465
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13460
|
-
this.
|
|
13466
|
+
this.__attachedContainers.add(container);
|
|
13467
|
+
this.__attachedContainers.add(this.j.container);
|
|
13468
|
+
this.j.e
|
|
13469
|
+
.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13470
|
+
capture: true
|
|
13471
|
+
})
|
|
13472
|
+
.on(container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13473
|
+
capture: true
|
|
13474
|
+
})
|
|
13475
|
+
.on(this.j.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13461
13476
|
capture: true
|
|
13462
13477
|
});
|
|
13463
13478
|
}
|
|
@@ -13469,10 +13484,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13469
13484
|
const view = this.j;
|
|
13470
13485
|
view.e
|
|
13471
13486
|
.on(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
|
|
13472
|
-
.on(JODIT_EVENTS_ON_HIDE, this.__hide)
|
|
13473
|
-
.on(view.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13474
|
-
capture: true
|
|
13475
|
-
});
|
|
13487
|
+
.on(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13476
13488
|
}
|
|
13477
13489
|
__removeListenersOnLeave() {
|
|
13478
13490
|
if (!this.__listenClose) {
|
|
@@ -13482,8 +13494,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13482
13494
|
const view = this.j;
|
|
13483
13495
|
view.e
|
|
13484
13496
|
.off(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
|
|
13485
|
-
.off(JODIT_EVENTS_ON_HIDE, this.__hide)
|
|
13486
|
-
.off(view.container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13497
|
+
.off(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13487
13498
|
}
|
|
13488
13499
|
__onMouseLeave(e) {
|
|
13489
13500
|
if (this.__currentTarget === e.target) {
|
|
@@ -13560,7 +13571,11 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13560
13571
|
this.__hideTimeout = this.async.setTimeout(this.__hide, this.j.defaultTimeout);
|
|
13561
13572
|
}
|
|
13562
13573
|
destruct() {
|
|
13563
|
-
this.
|
|
13574
|
+
this.__attachedContainers.forEach(container => {
|
|
13575
|
+
this.j.e
|
|
13576
|
+
.off(container, 'mouseenter.tooltip', this.__onMouseEnter)
|
|
13577
|
+
.off(container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13578
|
+
});
|
|
13564
13579
|
this.__hide();
|
|
13565
13580
|
super.destruct();
|
|
13566
13581
|
}
|
|
@@ -15760,17 +15775,18 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15760
15775
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15761
15776
|
/* harmony export */ T: function() { return /* binding */ ViewWithToolbar; }
|
|
15762
15777
|
/* harmony export */ });
|
|
15763
|
-
/* harmony import */ var
|
|
15778
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31635);
|
|
15764
15779
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
|
|
15765
|
-
/* harmony import */ var
|
|
15780
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(26318);
|
|
15766
15781
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
15767
15782
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
15768
15783
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32709);
|
|
15769
|
-
/* harmony import */ var
|
|
15784
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98253);
|
|
15770
15785
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58720);
|
|
15771
|
-
/* harmony import */ var
|
|
15772
|
-
/* harmony import */ var
|
|
15773
|
-
/* harmony import */ var
|
|
15786
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53048);
|
|
15787
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(39611);
|
|
15788
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77782);
|
|
15789
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8809);
|
|
15774
15790
|
/*!
|
|
15775
15791
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
15776
15792
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -15788,13 +15804,14 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15788
15804
|
|
|
15789
15805
|
|
|
15790
15806
|
|
|
15791
|
-
|
|
15807
|
+
|
|
15808
|
+
class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__/* .View */ .S {
|
|
15792
15809
|
/**
|
|
15793
15810
|
* Container for toolbar
|
|
15794
15811
|
*/
|
|
15795
15812
|
get toolbarContainer() {
|
|
15796
15813
|
if (!this.o.fullsize &&
|
|
15797
|
-
((0,
|
|
15814
|
+
((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))) {
|
|
15798
15815
|
return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__/* .resolveElement */ .tI)(this.o.toolbar, this.o.shadowRoot || this.od);
|
|
15799
15816
|
}
|
|
15800
15817
|
this.o.toolbar &&
|
|
@@ -15866,7 +15883,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15866
15883
|
beforeToolbarBuild(items) {
|
|
15867
15884
|
if (Object.keys(this.groupToButtons).length) {
|
|
15868
15885
|
return items.map(item => {
|
|
15869
|
-
if ((0,
|
|
15886
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item) &&
|
|
15870
15887
|
item.group &&
|
|
15871
15888
|
this.groupToButtons[item.group]) {
|
|
15872
15889
|
return {
|
|
@@ -15884,11 +15901,12 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15884
15901
|
/** @override **/
|
|
15885
15902
|
constructor(options, isJodit = false) {
|
|
15886
15903
|
super(options, isJodit);
|
|
15887
|
-
this.toolbar = (0,
|
|
15904
|
+
this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__/* .makeCollection */ .$K)(this);
|
|
15888
15905
|
this.__defaultToolbarContainer = this.c.div('jodit-toolbar__box');
|
|
15889
15906
|
this.registeredButtons = new Set();
|
|
15890
15907
|
this.groupToButtons = {};
|
|
15891
15908
|
this.isJodit = false;
|
|
15909
|
+
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__/* .UITooltip */ .SB(this);
|
|
15892
15910
|
this.isJodit = isJodit;
|
|
15893
15911
|
this.e.on('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15894
15912
|
}
|
|
@@ -15898,17 +15916,18 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15898
15916
|
}
|
|
15899
15917
|
this.setStatus(jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.beforeDestruct);
|
|
15900
15918
|
this.e.off('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15919
|
+
this.__tooltip.destruct();
|
|
15901
15920
|
this.toolbar.destruct();
|
|
15902
15921
|
// @ts-ignore After destruct, we are not responsible for anything
|
|
15903
15922
|
this.toolbar = undefined;
|
|
15904
15923
|
super.destruct();
|
|
15905
15924
|
}
|
|
15906
15925
|
}
|
|
15907
|
-
(0,
|
|
15926
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15908
15927
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
15909
15928
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
15910
|
-
(0,
|
|
15911
|
-
|
|
15929
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15930
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Ay
|
|
15912
15931
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
15913
15932
|
|
|
15914
15933
|
|
|
@@ -23600,7 +23619,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23600
23619
|
super(jodit);
|
|
23601
23620
|
this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
|
|
23602
23621
|
'selectionchange changeSelection focus afterSetMode touchstart focus blur';
|
|
23603
|
-
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITooltip */ .SB(this.jodit);
|
|
23604
23622
|
}
|
|
23605
23623
|
__initEvents() {
|
|
23606
23624
|
this.j.e
|
|
@@ -23627,12 +23645,9 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23627
23645
|
}
|
|
23628
23646
|
/** @override **/
|
|
23629
23647
|
destruct() {
|
|
23630
|
-
var _a;
|
|
23631
23648
|
if (this.isDestructed) {
|
|
23632
23649
|
return;
|
|
23633
23650
|
}
|
|
23634
|
-
(_a = this.__tooltip) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
23635
|
-
this.__tooltip = null;
|
|
23636
23651
|
this.j.e
|
|
23637
23652
|
.off(this.__listenEvents, this.update)
|
|
23638
23653
|
.off('afterSetMode focus', this.__immediateUpdate);
|
|
@@ -29617,9 +29632,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('enter
|
|
|
29617
29632
|
*/
|
|
29618
29633
|
function checkBR(fake, jodit, shiftKeyPressed) {
|
|
29619
29634
|
const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['pre', 'blockquote'], jodit.editor));
|
|
29635
|
+
const isCell = !isMultiLineBlock && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['td', 'th'], jodit.editor);
|
|
29620
29636
|
const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
|
|
29621
29637
|
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
29622
29638
|
if (isBRMode ||
|
|
29639
|
+
isCell ||
|
|
29623
29640
|
(shiftKeyPressed && !isMultiLineBlock) ||
|
|
29624
29641
|
(!shiftKeyPressed && isMultiLineBlock)) {
|
|
29625
29642
|
// 2 BR before
|
|
@@ -33116,6 +33133,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('inden
|
|
|
33116
33133
|
|
|
33117
33134
|
|
|
33118
33135
|
|
|
33136
|
+
// import 'jodit/plugins/debug/debug';
|
|
33119
33137
|
|
|
33120
33138
|
|
|
33121
33139
|
|
|
@@ -33745,10 +33763,10 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33745
33763
|
if (!this.j.o.toolbarInlineForSelection) {
|
|
33746
33764
|
return;
|
|
33747
33765
|
}
|
|
33748
|
-
const type = 'selection'
|
|
33749
|
-
|
|
33750
|
-
|
|
33751
|
-
|
|
33766
|
+
const type = 'selection';
|
|
33767
|
+
const sel = this.j.s.sel;
|
|
33768
|
+
const range = this.j.s.range;
|
|
33769
|
+
if ((sel === null || sel === void 0 ? void 0 : sel.isCollapsed) || this.isSelectedTarget(range)) {
|
|
33752
33770
|
if (this.type === type && this.popup.isOpened) {
|
|
33753
33771
|
this.hidePopup();
|
|
33754
33772
|
}
|
|
@@ -33773,9 +33791,9 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33773
33791
|
/**
|
|
33774
33792
|
* Shortcut for Table module
|
|
33775
33793
|
*/
|
|
33776
|
-
get tableModule() {
|
|
33777
|
-
|
|
33778
|
-
}
|
|
33794
|
+
// private get tableModule(): Table {
|
|
33795
|
+
// return this.j.getInstance<Table>('Table', this.j.o);
|
|
33796
|
+
// }
|
|
33779
33797
|
/** @override **/
|
|
33780
33798
|
beforeDestruct(jodit) {
|
|
33781
33799
|
jodit.e
|
|
@@ -34911,13 +34929,17 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34911
34929
|
}
|
|
34912
34930
|
}
|
|
34913
34931
|
onProcessPasteLink(ignore, html) {
|
|
34932
|
+
var _a, _b, _c, _d;
|
|
34914
34933
|
const { jodit } = this;
|
|
34915
34934
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
34916
34935
|
return;
|
|
34917
34936
|
}
|
|
34918
34937
|
jodit.e.stopPropagation('processPaste');
|
|
34919
34938
|
if (jodit.o.link.processVideoLink) {
|
|
34920
|
-
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
34939
|
+
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
|
|
34940
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
34941
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
34942
|
+
});
|
|
34921
34943
|
if (embed !== html) {
|
|
34922
34944
|
return jodit.createInside.fromHTML(embed);
|
|
34923
34945
|
}
|
|
@@ -42755,12 +42777,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
42755
42777
|
|
|
42756
42778
|
|
|
42757
42779
|
|
|
42780
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
42781
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
42782
|
+
defaultWidth: 400,
|
|
42783
|
+
defaultHeight: 345
|
|
42784
|
+
};
|
|
42758
42785
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
42759
42786
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
42760
|
-
popup: (
|
|
42761
|
-
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42762
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42763
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
42787
|
+
popup: (jodit, current, close) => {
|
|
42788
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42789
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42790
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
42764
42791
|
name: 'url',
|
|
42765
42792
|
required: true,
|
|
42766
42793
|
label: 'URL',
|
|
@@ -42768,26 +42795,26 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42768
42795
|
validators: ['url']
|
|
42769
42796
|
})
|
|
42770
42797
|
]),
|
|
42771
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42772
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42798
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42799
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formLink.submit())
|
|
42773
42800
|
])
|
|
42774
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42775
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42776
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
42801
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42802
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42803
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
42777
42804
|
name: 'code',
|
|
42778
42805
|
required: true,
|
|
42779
42806
|
label: 'Embed code'
|
|
42780
42807
|
})
|
|
42781
42808
|
]),
|
|
42782
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42783
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42809
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42810
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formCode.submit())
|
|
42784
42811
|
])
|
|
42785
42812
|
]), tabs = [], insertCode = (code) => {
|
|
42786
|
-
|
|
42787
|
-
|
|
42813
|
+
jodit.s.restore();
|
|
42814
|
+
jodit.s.insertHTML(code);
|
|
42788
42815
|
close();
|
|
42789
42816
|
};
|
|
42790
|
-
|
|
42817
|
+
jodit.s.save();
|
|
42791
42818
|
tabs.push({
|
|
42792
42819
|
icon: 'link',
|
|
42793
42820
|
name: 'Link',
|
|
@@ -42798,12 +42825,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42798
42825
|
content: formCode.container
|
|
42799
42826
|
});
|
|
42800
42827
|
formLink.onSubmit(data => {
|
|
42801
|
-
|
|
42828
|
+
var _a, _b, _c, _d;
|
|
42829
|
+
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
42830
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
42831
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
42832
|
+
}));
|
|
42802
42833
|
});
|
|
42803
42834
|
formCode.onSubmit(data => {
|
|
42804
42835
|
insertCode(data.code);
|
|
42805
42836
|
});
|
|
42806
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
42837
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
42807
42838
|
},
|
|
42808
42839
|
tags: ['iframe'],
|
|
42809
42840
|
tooltip: 'Insert youtube/vimeo video'
|