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/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
|
|
|
@@ -23598,7 +23617,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23598
23617
|
super(jodit);
|
|
23599
23618
|
this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
|
|
23600
23619
|
'selectionchange changeSelection focus afterSetMode touchstart focus blur';
|
|
23601
|
-
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITooltip */ .SB(this.jodit);
|
|
23602
23620
|
}
|
|
23603
23621
|
__initEvents() {
|
|
23604
23622
|
this.j.e
|
|
@@ -23628,8 +23646,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23628
23646
|
if (this.isDestructed) {
|
|
23629
23647
|
return;
|
|
23630
23648
|
}
|
|
23631
|
-
this.__tooltip?.destruct();
|
|
23632
|
-
this.__tooltip = null;
|
|
23633
23649
|
this.j.e
|
|
23634
23650
|
.off(this.__listenEvents, this.update)
|
|
23635
23651
|
.off('afterSetMode focus', this.__immediateUpdate);
|
|
@@ -29606,9 +29622,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('enter
|
|
|
29606
29622
|
*/
|
|
29607
29623
|
function checkBR(fake, jodit, shiftKeyPressed) {
|
|
29608
29624
|
const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['pre', 'blockquote'], jodit.editor));
|
|
29625
|
+
const isCell = !isMultiLineBlock && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['td', 'th'], jodit.editor);
|
|
29609
29626
|
const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
|
|
29610
29627
|
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
29611
29628
|
if (isBRMode ||
|
|
29629
|
+
isCell ||
|
|
29612
29630
|
(shiftKeyPressed && !isMultiLineBlock) ||
|
|
29613
29631
|
(!shiftKeyPressed && isMultiLineBlock)) {
|
|
29614
29632
|
// 2 BR before
|
|
@@ -33085,6 +33103,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('inden
|
|
|
33085
33103
|
|
|
33086
33104
|
|
|
33087
33105
|
|
|
33106
|
+
// import 'jodit/plugins/debug/debug';
|
|
33088
33107
|
|
|
33089
33108
|
|
|
33090
33109
|
|
|
@@ -33714,10 +33733,10 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33714
33733
|
if (!this.j.o.toolbarInlineForSelection) {
|
|
33715
33734
|
return;
|
|
33716
33735
|
}
|
|
33717
|
-
const type = 'selection'
|
|
33718
|
-
|
|
33719
|
-
|
|
33720
|
-
|
|
33736
|
+
const type = 'selection';
|
|
33737
|
+
const sel = this.j.s.sel;
|
|
33738
|
+
const range = this.j.s.range;
|
|
33739
|
+
if (sel?.isCollapsed || this.isSelectedTarget(range)) {
|
|
33721
33740
|
if (this.type === type && this.popup.isOpened) {
|
|
33722
33741
|
this.hidePopup();
|
|
33723
33742
|
}
|
|
@@ -33742,9 +33761,9 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33742
33761
|
/**
|
|
33743
33762
|
* Shortcut for Table module
|
|
33744
33763
|
*/
|
|
33745
|
-
get tableModule() {
|
|
33746
|
-
|
|
33747
|
-
}
|
|
33764
|
+
// private get tableModule(): Table {
|
|
33765
|
+
// return this.j.getInstance<Table>('Table', this.j.o);
|
|
33766
|
+
// }
|
|
33748
33767
|
/** @override **/
|
|
33749
33768
|
beforeDestruct(jodit) {
|
|
33750
33769
|
jodit.e
|
|
@@ -34885,7 +34904,11 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34885
34904
|
}
|
|
34886
34905
|
jodit.e.stopPropagation('processPaste');
|
|
34887
34906
|
if (jodit.o.link.processVideoLink) {
|
|
34888
|
-
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
34907
|
+
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(jodit.o.video?.parseUrlToVideoEmbed ??
|
|
34908
|
+
jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
|
|
34909
|
+
width: jodit.o.video?.defaultWidth,
|
|
34910
|
+
height: jodit.o.video?.defaultHeight
|
|
34911
|
+
});
|
|
34889
34912
|
if (embed !== html) {
|
|
34890
34913
|
return jodit.createInside.fromHTML(embed);
|
|
34891
34914
|
}
|
|
@@ -42676,12 +42699,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
42676
42699
|
|
|
42677
42700
|
|
|
42678
42701
|
|
|
42702
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
42703
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
42704
|
+
defaultWidth: 400,
|
|
42705
|
+
defaultHeight: 345
|
|
42706
|
+
};
|
|
42679
42707
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
42680
42708
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
42681
|
-
popup: (
|
|
42682
|
-
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42683
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42684
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
42709
|
+
popup: (jodit, current, close) => {
|
|
42710
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42711
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42712
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
42685
42713
|
name: 'url',
|
|
42686
42714
|
required: true,
|
|
42687
42715
|
label: 'URL',
|
|
@@ -42689,26 +42717,26 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42689
42717
|
validators: ['url']
|
|
42690
42718
|
})
|
|
42691
42719
|
]),
|
|
42692
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42693
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42720
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42721
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formLink.submit())
|
|
42694
42722
|
])
|
|
42695
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42696
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42697
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
42723
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42724
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42725
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
42698
42726
|
name: 'code',
|
|
42699
42727
|
required: true,
|
|
42700
42728
|
label: 'Embed code'
|
|
42701
42729
|
})
|
|
42702
42730
|
]),
|
|
42703
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42704
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42731
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42732
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formCode.submit())
|
|
42705
42733
|
])
|
|
42706
42734
|
]), tabs = [], insertCode = (code) => {
|
|
42707
|
-
|
|
42708
|
-
|
|
42735
|
+
jodit.s.restore();
|
|
42736
|
+
jodit.s.insertHTML(code);
|
|
42709
42737
|
close();
|
|
42710
42738
|
};
|
|
42711
|
-
|
|
42739
|
+
jodit.s.save();
|
|
42712
42740
|
tabs.push({
|
|
42713
42741
|
icon: 'link',
|
|
42714
42742
|
name: 'Link',
|
|
@@ -42719,12 +42747,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42719
42747
|
content: formCode.container
|
|
42720
42748
|
});
|
|
42721
42749
|
formLink.onSubmit(data => {
|
|
42722
|
-
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.
|
|
42750
|
+
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.call)(jodit.o.video?.parseUrlToVideoEmbed ??
|
|
42751
|
+
jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
42752
|
+
width: jodit.o.video?.defaultWidth,
|
|
42753
|
+
height: jodit.o.video?.defaultHeight
|
|
42754
|
+
}));
|
|
42723
42755
|
});
|
|
42724
42756
|
formCode.onSubmit(data => {
|
|
42725
42757
|
insertCode(data.code);
|
|
42726
42758
|
});
|
|
42727
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
42759
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
42728
42760
|
},
|
|
42729
42761
|
tags: ['iframe'],
|
|
42730
42762
|
tooltip: 'Insert youtube/vimeo video'
|