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/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.41
|
|
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.41";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2021";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -7672,11 +7672,12 @@ function ConfigFlatten(obj) {
|
|
|
7672
7672
|
/**
|
|
7673
7673
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7674
7674
|
*/
|
|
7675
|
-
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7675
|
+
const convertMediaUrlToVideoEmbed = (url, { width = 400, height = 345 } = {}) => {
|
|
7676
7676
|
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7677
7677
|
return url;
|
|
7678
7678
|
}
|
|
7679
|
-
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a')
|
|
7679
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
7680
|
+
const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7680
7681
|
parser.href = url;
|
|
7681
7682
|
if (!width) {
|
|
7682
7683
|
width = 400;
|
|
@@ -7703,7 +7704,10 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7703
7704
|
case 'www.youtu.be': {
|
|
7704
7705
|
const query = parser.search
|
|
7705
7706
|
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7706
|
-
: { v: parser.pathname.
|
|
7707
|
+
: { v: parser.pathname.substring(1) };
|
|
7708
|
+
if (/^embed\/.*/.test(query.v)) {
|
|
7709
|
+
query.v = query.v.substring(6);
|
|
7710
|
+
}
|
|
7707
7711
|
return query.v
|
|
7708
7712
|
? '<iframe width="' +
|
|
7709
7713
|
width +
|
|
@@ -13410,6 +13414,7 @@ const JODIT_EVENTS_ON_HIDE = [
|
|
|
13410
13414
|
'changePlace.tooltip',
|
|
13411
13415
|
'afterOpenPopup.tooltip',
|
|
13412
13416
|
'hidePopup.tooltip',
|
|
13417
|
+
'beforePopupClose.tooltip',
|
|
13413
13418
|
'closeAllPopups.tooltip'
|
|
13414
13419
|
];
|
|
13415
13420
|
let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_5__/* .UIElement */ .D {
|
|
@@ -13422,6 +13427,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13422
13427
|
constructor(view) {
|
|
13423
13428
|
super(view);
|
|
13424
13429
|
this.__isOpened = false;
|
|
13430
|
+
this.__attachedContainers = new Set();
|
|
13425
13431
|
this.__listenClose = false;
|
|
13426
13432
|
this.__currentTarget = null;
|
|
13427
13433
|
this.__delayShowTimeout = 0;
|
|
@@ -13440,7 +13446,16 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13440
13446
|
__onAttach(container) {
|
|
13441
13447
|
// TODO Move it inside __show method. Now it is here because testcase failed with capturing
|
|
13442
13448
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13443
|
-
this.
|
|
13449
|
+
this.__attachedContainers.add(container);
|
|
13450
|
+
this.__attachedContainers.add(this.j.container);
|
|
13451
|
+
this.j.e
|
|
13452
|
+
.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13453
|
+
capture: true
|
|
13454
|
+
})
|
|
13455
|
+
.on(container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13456
|
+
capture: true
|
|
13457
|
+
})
|
|
13458
|
+
.on(this.j.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13444
13459
|
capture: true
|
|
13445
13460
|
});
|
|
13446
13461
|
}
|
|
@@ -13452,10 +13467,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13452
13467
|
const view = this.j;
|
|
13453
13468
|
view.e
|
|
13454
13469
|
.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
|
-
});
|
|
13470
|
+
.on(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13459
13471
|
}
|
|
13460
13472
|
__removeListenersOnLeave() {
|
|
13461
13473
|
if (!this.__listenClose) {
|
|
@@ -13465,8 +13477,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13465
13477
|
const view = this.j;
|
|
13466
13478
|
view.e
|
|
13467
13479
|
.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);
|
|
13480
|
+
.off(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13470
13481
|
}
|
|
13471
13482
|
__onMouseLeave(e) {
|
|
13472
13483
|
if (this.__currentTarget === e.target) {
|
|
@@ -13543,7 +13554,11 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13543
13554
|
this.__hideTimeout = this.async.setTimeout(this.__hide, this.j.defaultTimeout);
|
|
13544
13555
|
}
|
|
13545
13556
|
destruct() {
|
|
13546
|
-
this.
|
|
13557
|
+
this.__attachedContainers.forEach(container => {
|
|
13558
|
+
this.j.e
|
|
13559
|
+
.off(container, 'mouseenter.tooltip', this.__onMouseEnter)
|
|
13560
|
+
.off(container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13561
|
+
});
|
|
13547
13562
|
this.__hide();
|
|
13548
13563
|
super.destruct();
|
|
13549
13564
|
}
|
|
@@ -15762,17 +15777,18 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15762
15777
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15763
15778
|
/* harmony export */ T: function() { return /* binding */ ViewWithToolbar; }
|
|
15764
15779
|
/* harmony export */ });
|
|
15765
|
-
/* harmony import */ var
|
|
15780
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31635);
|
|
15766
15781
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
|
|
15767
|
-
/* harmony import */ var
|
|
15782
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(26318);
|
|
15768
15783
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
15769
15784
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
15770
15785
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32709);
|
|
15771
|
-
/* harmony import */ var
|
|
15786
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98253);
|
|
15772
15787
|
/* 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
|
|
15788
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53048);
|
|
15789
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(39611);
|
|
15790
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77782);
|
|
15791
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8809);
|
|
15776
15792
|
/*!
|
|
15777
15793
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
15778
15794
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -15790,13 +15806,14 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15790
15806
|
|
|
15791
15807
|
|
|
15792
15808
|
|
|
15793
|
-
|
|
15809
|
+
|
|
15810
|
+
class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__/* .View */ .S {
|
|
15794
15811
|
/**
|
|
15795
15812
|
* Container for toolbar
|
|
15796
15813
|
*/
|
|
15797
15814
|
get toolbarContainer() {
|
|
15798
15815
|
if (!this.o.fullsize &&
|
|
15799
|
-
((0,
|
|
15816
|
+
((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
15817
|
return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__/* .resolveElement */ .tI)(this.o.toolbar, this.o.shadowRoot || this.od);
|
|
15801
15818
|
}
|
|
15802
15819
|
this.o.toolbar &&
|
|
@@ -15868,7 +15885,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15868
15885
|
beforeToolbarBuild(items) {
|
|
15869
15886
|
if (Object.keys(this.groupToButtons).length) {
|
|
15870
15887
|
return items.map(item => {
|
|
15871
|
-
if ((0,
|
|
15888
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item) &&
|
|
15872
15889
|
item.group &&
|
|
15873
15890
|
this.groupToButtons[item.group]) {
|
|
15874
15891
|
return {
|
|
@@ -15886,11 +15903,12 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15886
15903
|
/** @override **/
|
|
15887
15904
|
constructor(options, isJodit = false) {
|
|
15888
15905
|
super(options, isJodit);
|
|
15889
|
-
this.toolbar = (0,
|
|
15906
|
+
this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__/* .makeCollection */ .$K)(this);
|
|
15890
15907
|
this.__defaultToolbarContainer = this.c.div('jodit-toolbar__box');
|
|
15891
15908
|
this.registeredButtons = new Set();
|
|
15892
15909
|
this.groupToButtons = {};
|
|
15893
15910
|
this.isJodit = false;
|
|
15911
|
+
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__/* .UITooltip */ .SB(this);
|
|
15894
15912
|
this.isJodit = isJodit;
|
|
15895
15913
|
this.e.on('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15896
15914
|
}
|
|
@@ -15900,17 +15918,18 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15900
15918
|
}
|
|
15901
15919
|
this.setStatus(jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.beforeDestruct);
|
|
15902
15920
|
this.e.off('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15921
|
+
this.__tooltip.destruct();
|
|
15903
15922
|
this.toolbar.destruct();
|
|
15904
15923
|
// @ts-ignore After destruct, we are not responsible for anything
|
|
15905
15924
|
this.toolbar = undefined;
|
|
15906
15925
|
super.destruct();
|
|
15907
15926
|
}
|
|
15908
15927
|
}
|
|
15909
|
-
(0,
|
|
15928
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15910
15929
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
15911
15930
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
15912
|
-
(0,
|
|
15913
|
-
|
|
15931
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15932
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Ay
|
|
15914
15933
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
15915
15934
|
|
|
15916
15935
|
|
|
@@ -23579,7 +23598,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23579
23598
|
super(jodit);
|
|
23580
23599
|
this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
|
|
23581
23600
|
'selectionchange changeSelection focus afterSetMode touchstart focus blur';
|
|
23582
|
-
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITooltip */ .SB(this.jodit);
|
|
23583
23601
|
}
|
|
23584
23602
|
__initEvents() {
|
|
23585
23603
|
this.j.e
|
|
@@ -23609,8 +23627,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23609
23627
|
if (this.isDestructed) {
|
|
23610
23628
|
return;
|
|
23611
23629
|
}
|
|
23612
|
-
this.__tooltip?.destruct();
|
|
23613
|
-
this.__tooltip = null;
|
|
23614
23630
|
this.j.e
|
|
23615
23631
|
.off(this.__listenEvents, this.update)
|
|
23616
23632
|
.off('afterSetMode focus', this.__immediateUpdate);
|
|
@@ -29137,9 +29153,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('enter
|
|
|
29137
29153
|
*/
|
|
29138
29154
|
function checkBR(fake, jodit, shiftKeyPressed) {
|
|
29139
29155
|
const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['pre', 'blockquote'], jodit.editor));
|
|
29156
|
+
const isCell = !isMultiLineBlock && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['td', 'th'], jodit.editor);
|
|
29140
29157
|
const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
|
|
29141
29158
|
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
29142
29159
|
if (isBRMode ||
|
|
29160
|
+
isCell ||
|
|
29143
29161
|
(shiftKeyPressed && !isMultiLineBlock) ||
|
|
29144
29162
|
(!shiftKeyPressed && isMultiLineBlock)) {
|
|
29145
29163
|
// 2 BR before
|
|
@@ -32616,6 +32634,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('inden
|
|
|
32616
32634
|
|
|
32617
32635
|
|
|
32618
32636
|
|
|
32637
|
+
// import 'jodit/plugins/debug/debug';
|
|
32619
32638
|
|
|
32620
32639
|
|
|
32621
32640
|
|
|
@@ -33245,10 +33264,10 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33245
33264
|
if (!this.j.o.toolbarInlineForSelection) {
|
|
33246
33265
|
return;
|
|
33247
33266
|
}
|
|
33248
|
-
const type = 'selection'
|
|
33249
|
-
|
|
33250
|
-
|
|
33251
|
-
|
|
33267
|
+
const type = 'selection';
|
|
33268
|
+
const sel = this.j.s.sel;
|
|
33269
|
+
const range = this.j.s.range;
|
|
33270
|
+
if (sel?.isCollapsed || this.isSelectedTarget(range)) {
|
|
33252
33271
|
if (this.type === type && this.popup.isOpened) {
|
|
33253
33272
|
this.hidePopup();
|
|
33254
33273
|
}
|
|
@@ -33273,9 +33292,9 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33273
33292
|
/**
|
|
33274
33293
|
* Shortcut for Table module
|
|
33275
33294
|
*/
|
|
33276
|
-
get tableModule() {
|
|
33277
|
-
|
|
33278
|
-
}
|
|
33295
|
+
// private get tableModule(): Table {
|
|
33296
|
+
// return this.j.getInstance<Table>('Table', this.j.o);
|
|
33297
|
+
// }
|
|
33279
33298
|
/** @override **/
|
|
33280
33299
|
beforeDestruct(jodit) {
|
|
33281
33300
|
jodit.e
|
|
@@ -34000,7 +34019,11 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34000
34019
|
}
|
|
34001
34020
|
jodit.e.stopPropagation('processPaste');
|
|
34002
34021
|
if (jodit.o.link.processVideoLink) {
|
|
34003
|
-
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
34022
|
+
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(jodit.o.video?.parseUrlToVideoEmbed ??
|
|
34023
|
+
jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
|
|
34024
|
+
width: jodit.o.video?.defaultWidth,
|
|
34025
|
+
height: jodit.o.video?.defaultHeight
|
|
34026
|
+
});
|
|
34004
34027
|
if (embed !== html) {
|
|
34005
34028
|
return jodit.createInside.fromHTML(embed);
|
|
34006
34029
|
}
|
|
@@ -40959,12 +40982,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
40959
40982
|
|
|
40960
40983
|
|
|
40961
40984
|
|
|
40985
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
40986
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
40987
|
+
defaultWidth: 400,
|
|
40988
|
+
defaultHeight: 345
|
|
40989
|
+
};
|
|
40962
40990
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
40963
40991
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
40964
|
-
popup: (
|
|
40965
|
-
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
40966
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
40967
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
40992
|
+
popup: (jodit, current, close) => {
|
|
40993
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
40994
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
40995
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
40968
40996
|
name: 'url',
|
|
40969
40997
|
required: true,
|
|
40970
40998
|
label: 'URL',
|
|
@@ -40972,26 +41000,26 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
40972
41000
|
validators: ['url']
|
|
40973
41001
|
})
|
|
40974
41002
|
]),
|
|
40975
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
40976
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
41003
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
41004
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formLink.submit())
|
|
40977
41005
|
])
|
|
40978
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
40979
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
40980
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
41006
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
41007
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
41008
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
40981
41009
|
name: 'code',
|
|
40982
41010
|
required: true,
|
|
40983
41011
|
label: 'Embed code'
|
|
40984
41012
|
})
|
|
40985
41013
|
]),
|
|
40986
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
40987
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
41014
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
41015
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formCode.submit())
|
|
40988
41016
|
])
|
|
40989
41017
|
]), tabs = [], insertCode = (code) => {
|
|
40990
|
-
|
|
40991
|
-
|
|
41018
|
+
jodit.s.restore();
|
|
41019
|
+
jodit.s.insertHTML(code);
|
|
40992
41020
|
close();
|
|
40993
41021
|
};
|
|
40994
|
-
|
|
41022
|
+
jodit.s.save();
|
|
40995
41023
|
tabs.push({
|
|
40996
41024
|
icon: 'link',
|
|
40997
41025
|
name: 'Link',
|
|
@@ -41002,12 +41030,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
41002
41030
|
content: formCode.container
|
|
41003
41031
|
});
|
|
41004
41032
|
formLink.onSubmit(data => {
|
|
41005
|
-
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.
|
|
41033
|
+
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.call)(jodit.o.video?.parseUrlToVideoEmbed ??
|
|
41034
|
+
jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
41035
|
+
width: jodit.o.video?.defaultWidth,
|
|
41036
|
+
height: jodit.o.video?.defaultHeight
|
|
41037
|
+
}));
|
|
41006
41038
|
});
|
|
41007
41039
|
formCode.onSubmit(data => {
|
|
41008
41040
|
insertCode(data.code);
|
|
41009
41041
|
});
|
|
41010
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
41042
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
41011
41043
|
},
|
|
41012
41044
|
tags: ['iframe'],
|
|
41013
41045
|
tooltip: 'Insert youtube/vimeo video'
|