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/es2018/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 = "es2018";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -7689,11 +7689,12 @@ function ConfigFlatten(obj) {
|
|
|
7689
7689
|
/**
|
|
7690
7690
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7691
7691
|
*/
|
|
7692
|
-
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7692
|
+
const convertMediaUrlToVideoEmbed = (url, { width = 400, height = 345 } = {}) => {
|
|
7693
7693
|
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7694
7694
|
return url;
|
|
7695
7695
|
}
|
|
7696
|
-
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a')
|
|
7696
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
7697
|
+
const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7697
7698
|
parser.href = url;
|
|
7698
7699
|
if (!width) {
|
|
7699
7700
|
width = 400;
|
|
@@ -7720,7 +7721,10 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7720
7721
|
case 'www.youtu.be': {
|
|
7721
7722
|
const query = parser.search
|
|
7722
7723
|
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7723
|
-
: { v: parser.pathname.
|
|
7724
|
+
: { v: parser.pathname.substring(1) };
|
|
7725
|
+
if (/^embed\/.*/.test(query.v)) {
|
|
7726
|
+
query.v = query.v.substring(6);
|
|
7727
|
+
}
|
|
7724
7728
|
return query.v
|
|
7725
7729
|
? '<iframe width="' +
|
|
7726
7730
|
width +
|
|
@@ -13452,6 +13456,7 @@ const JODIT_EVENTS_ON_HIDE = [
|
|
|
13452
13456
|
'changePlace.tooltip',
|
|
13453
13457
|
'afterOpenPopup.tooltip',
|
|
13454
13458
|
'hidePopup.tooltip',
|
|
13459
|
+
'beforePopupClose.tooltip',
|
|
13455
13460
|
'closeAllPopups.tooltip'
|
|
13456
13461
|
];
|
|
13457
13462
|
let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_5__/* .UIElement */ .D {
|
|
@@ -13464,6 +13469,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13464
13469
|
constructor(view) {
|
|
13465
13470
|
super(view);
|
|
13466
13471
|
this.__isOpened = false;
|
|
13472
|
+
this.__attachedContainers = new Set();
|
|
13467
13473
|
this.__listenClose = false;
|
|
13468
13474
|
this.__currentTarget = null;
|
|
13469
13475
|
this.__delayShowTimeout = 0;
|
|
@@ -13482,7 +13488,16 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13482
13488
|
__onAttach(container) {
|
|
13483
13489
|
// TODO Move it inside __show method. Now it is here because testcase failed with capturing
|
|
13484
13490
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13485
|
-
this.
|
|
13491
|
+
this.__attachedContainers.add(container);
|
|
13492
|
+
this.__attachedContainers.add(this.j.container);
|
|
13493
|
+
this.j.e
|
|
13494
|
+
.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13495
|
+
capture: true
|
|
13496
|
+
})
|
|
13497
|
+
.on(container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13498
|
+
capture: true
|
|
13499
|
+
})
|
|
13500
|
+
.on(this.j.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13486
13501
|
capture: true
|
|
13487
13502
|
});
|
|
13488
13503
|
}
|
|
@@ -13494,10 +13509,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13494
13509
|
const view = this.j;
|
|
13495
13510
|
view.e
|
|
13496
13511
|
.on(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
|
|
13497
|
-
.on(JODIT_EVENTS_ON_HIDE, this.__hide)
|
|
13498
|
-
.on(view.container, 'mouseleave.tooltip', this.__onMouseLeave, {
|
|
13499
|
-
capture: true
|
|
13500
|
-
});
|
|
13512
|
+
.on(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13501
13513
|
}
|
|
13502
13514
|
__removeListenersOnLeave() {
|
|
13503
13515
|
if (!this.__listenClose) {
|
|
@@ -13507,8 +13519,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13507
13519
|
const view = this.j;
|
|
13508
13520
|
view.e
|
|
13509
13521
|
.off(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
|
|
13510
|
-
.off(JODIT_EVENTS_ON_HIDE, this.__hide)
|
|
13511
|
-
.off(view.container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13522
|
+
.off(JODIT_EVENTS_ON_HIDE, this.__hide);
|
|
13512
13523
|
}
|
|
13513
13524
|
__onMouseLeave(e) {
|
|
13514
13525
|
if (this.__currentTarget === e.target) {
|
|
@@ -13585,7 +13596,11 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13585
13596
|
this.__hideTimeout = this.async.setTimeout(this.__hide, this.j.defaultTimeout);
|
|
13586
13597
|
}
|
|
13587
13598
|
destruct() {
|
|
13588
|
-
this.
|
|
13599
|
+
this.__attachedContainers.forEach(container => {
|
|
13600
|
+
this.j.e
|
|
13601
|
+
.off(container, 'mouseenter.tooltip', this.__onMouseEnter)
|
|
13602
|
+
.off(container, 'mouseleave.tooltip', this.__onMouseLeave);
|
|
13603
|
+
});
|
|
13589
13604
|
this.__hide();
|
|
13590
13605
|
super.destruct();
|
|
13591
13606
|
}
|
|
@@ -15815,17 +15830,18 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15815
15830
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15816
15831
|
/* harmony export */ T: function() { return /* binding */ ViewWithToolbar; }
|
|
15817
15832
|
/* harmony export */ });
|
|
15818
|
-
/* harmony import */ var
|
|
15833
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31635);
|
|
15819
15834
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
|
|
15820
|
-
/* harmony import */ var
|
|
15835
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(26318);
|
|
15821
15836
|
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
15822
15837
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
|
|
15823
15838
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32709);
|
|
15824
|
-
/* harmony import */ var
|
|
15839
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98253);
|
|
15825
15840
|
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58720);
|
|
15826
|
-
/* harmony import */ var
|
|
15827
|
-
/* harmony import */ var
|
|
15828
|
-
/* harmony import */ var
|
|
15841
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53048);
|
|
15842
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(39611);
|
|
15843
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77782);
|
|
15844
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8809);
|
|
15829
15845
|
/*!
|
|
15830
15846
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
15831
15847
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -15843,13 +15859,14 @@ class ProgressBar extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
15843
15859
|
|
|
15844
15860
|
|
|
15845
15861
|
|
|
15846
|
-
|
|
15862
|
+
|
|
15863
|
+
class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__/* .View */ .S {
|
|
15847
15864
|
/**
|
|
15848
15865
|
* Container for toolbar
|
|
15849
15866
|
*/
|
|
15850
15867
|
get toolbarContainer() {
|
|
15851
15868
|
if (!this.o.fullsize &&
|
|
15852
|
-
((0,
|
|
15869
|
+
((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))) {
|
|
15853
15870
|
return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__/* .resolveElement */ .tI)(this.o.toolbar, this.o.shadowRoot || this.od);
|
|
15854
15871
|
}
|
|
15855
15872
|
this.o.toolbar &&
|
|
@@ -15921,7 +15938,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15921
15938
|
beforeToolbarBuild(items) {
|
|
15922
15939
|
if (Object.keys(this.groupToButtons).length) {
|
|
15923
15940
|
return items.map(item => {
|
|
15924
|
-
if ((0,
|
|
15941
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item) &&
|
|
15925
15942
|
item.group &&
|
|
15926
15943
|
this.groupToButtons[item.group]) {
|
|
15927
15944
|
return {
|
|
@@ -15939,11 +15956,12 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15939
15956
|
/** @override **/
|
|
15940
15957
|
constructor(options, isJodit = false) {
|
|
15941
15958
|
super(options, isJodit);
|
|
15942
|
-
this.toolbar = (0,
|
|
15959
|
+
this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__/* .makeCollection */ .$K)(this);
|
|
15943
15960
|
this.__defaultToolbarContainer = this.c.div('jodit-toolbar__box');
|
|
15944
15961
|
this.registeredButtons = new Set();
|
|
15945
15962
|
this.groupToButtons = {};
|
|
15946
15963
|
this.isJodit = false;
|
|
15964
|
+
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__/* .UITooltip */ .SB(this);
|
|
15947
15965
|
this.isJodit = isJodit;
|
|
15948
15966
|
this.e.on('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15949
15967
|
}
|
|
@@ -15953,17 +15971,18 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15953
15971
|
}
|
|
15954
15972
|
this.setStatus(jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.beforeDestruct);
|
|
15955
15973
|
this.e.off('beforeToolbarBuild', this.beforeToolbarBuild);
|
|
15974
|
+
this.__tooltip.destruct();
|
|
15956
15975
|
this.toolbar.destruct();
|
|
15957
15976
|
// @ts-ignore After destruct, we are not responsible for anything
|
|
15958
15977
|
this.toolbar = undefined;
|
|
15959
15978
|
super.destruct();
|
|
15960
15979
|
}
|
|
15961
15980
|
}
|
|
15962
|
-
(0,
|
|
15981
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15963
15982
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
15964
15983
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
15965
|
-
(0,
|
|
15966
|
-
|
|
15984
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
|
|
15985
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Ay
|
|
15967
15986
|
], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
|
|
15968
15987
|
|
|
15969
15988
|
|
|
@@ -23681,7 +23700,6 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23681
23700
|
super(jodit);
|
|
23682
23701
|
this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
|
|
23683
23702
|
'selectionchange changeSelection focus afterSetMode touchstart focus blur';
|
|
23684
|
-
this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITooltip */ .SB(this.jodit);
|
|
23685
23703
|
}
|
|
23686
23704
|
__initEvents() {
|
|
23687
23705
|
this.j.e
|
|
@@ -23708,12 +23726,9 @@ let ToolbarCollection = class ToolbarCollection extends jodit_core_ui__WEBPACK_I
|
|
|
23708
23726
|
}
|
|
23709
23727
|
/** @override **/
|
|
23710
23728
|
destruct() {
|
|
23711
|
-
var _a;
|
|
23712
23729
|
if (this.isDestructed) {
|
|
23713
23730
|
return;
|
|
23714
23731
|
}
|
|
23715
|
-
(_a = this.__tooltip) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
23716
|
-
this.__tooltip = null;
|
|
23717
23732
|
this.j.e
|
|
23718
23733
|
.off(this.__listenEvents, this.update)
|
|
23719
23734
|
.off('afterSetMode focus', this.__immediateUpdate);
|
|
@@ -29700,9 +29715,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('enter
|
|
|
29700
29715
|
*/
|
|
29701
29716
|
function checkBR(fake, jodit, shiftKeyPressed) {
|
|
29702
29717
|
const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['pre', 'blockquote'], jodit.editor));
|
|
29718
|
+
const isCell = !isMultiLineBlock && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['td', 'th'], jodit.editor);
|
|
29703
29719
|
const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
|
|
29704
29720
|
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
29705
29721
|
if (isBRMode ||
|
|
29722
|
+
isCell ||
|
|
29706
29723
|
(shiftKeyPressed && !isMultiLineBlock) ||
|
|
29707
29724
|
(!shiftKeyPressed && isMultiLineBlock)) {
|
|
29708
29725
|
// 2 BR before
|
|
@@ -33189,6 +33206,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('inden
|
|
|
33189
33206
|
|
|
33190
33207
|
|
|
33191
33208
|
|
|
33209
|
+
// import 'jodit/plugins/debug/debug';
|
|
33192
33210
|
|
|
33193
33211
|
|
|
33194
33212
|
|
|
@@ -33818,10 +33836,10 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33818
33836
|
if (!this.j.o.toolbarInlineForSelection) {
|
|
33819
33837
|
return;
|
|
33820
33838
|
}
|
|
33821
|
-
const type = 'selection'
|
|
33822
|
-
|
|
33823
|
-
|
|
33824
|
-
|
|
33839
|
+
const type = 'selection';
|
|
33840
|
+
const sel = this.j.s.sel;
|
|
33841
|
+
const range = this.j.s.range;
|
|
33842
|
+
if ((sel === null || sel === void 0 ? void 0 : sel.isCollapsed) || this.isSelectedTarget(range)) {
|
|
33825
33843
|
if (this.type === type && this.popup.isOpened) {
|
|
33826
33844
|
this.hidePopup();
|
|
33827
33845
|
}
|
|
@@ -33846,9 +33864,9 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plug
|
|
|
33846
33864
|
/**
|
|
33847
33865
|
* Shortcut for Table module
|
|
33848
33866
|
*/
|
|
33849
|
-
get tableModule() {
|
|
33850
|
-
|
|
33851
|
-
}
|
|
33867
|
+
// private get tableModule(): Table {
|
|
33868
|
+
// return this.j.getInstance<Table>('Table', this.j.o);
|
|
33869
|
+
// }
|
|
33852
33870
|
/** @override **/
|
|
33853
33871
|
beforeDestruct(jodit) {
|
|
33854
33872
|
jodit.e
|
|
@@ -34984,13 +35002,17 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34984
35002
|
}
|
|
34985
35003
|
}
|
|
34986
35004
|
onProcessPasteLink(ignore, html) {
|
|
35005
|
+
var _a, _b, _c, _d;
|
|
34987
35006
|
const { jodit } = this;
|
|
34988
35007
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
34989
35008
|
return;
|
|
34990
35009
|
}
|
|
34991
35010
|
jodit.e.stopPropagation('processPaste');
|
|
34992
35011
|
if (jodit.o.link.processVideoLink) {
|
|
34993
|
-
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
35012
|
+
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, {
|
|
35013
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
35014
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
35015
|
+
});
|
|
34994
35016
|
if (embed !== html) {
|
|
34995
35017
|
return jodit.createInside.fromHTML(embed);
|
|
34996
35018
|
}
|
|
@@ -42810,12 +42832,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
42810
42832
|
|
|
42811
42833
|
|
|
42812
42834
|
|
|
42835
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
42836
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
42837
|
+
defaultWidth: 400,
|
|
42838
|
+
defaultHeight: 345
|
|
42839
|
+
};
|
|
42813
42840
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
42814
42841
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
42815
|
-
popup: (
|
|
42816
|
-
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42817
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42818
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
42842
|
+
popup: (jodit, current, close) => {
|
|
42843
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42844
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42845
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
42819
42846
|
name: 'url',
|
|
42820
42847
|
required: true,
|
|
42821
42848
|
label: 'URL',
|
|
@@ -42823,26 +42850,26 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42823
42850
|
validators: ['url']
|
|
42824
42851
|
})
|
|
42825
42852
|
]),
|
|
42826
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42827
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42853
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42854
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formLink.submit())
|
|
42828
42855
|
])
|
|
42829
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42830
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42831
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
42856
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42857
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42858
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
42832
42859
|
name: 'code',
|
|
42833
42860
|
required: true,
|
|
42834
42861
|
label: 'Embed code'
|
|
42835
42862
|
})
|
|
42836
42863
|
]),
|
|
42837
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42838
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42864
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42865
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formCode.submit())
|
|
42839
42866
|
])
|
|
42840
42867
|
]), tabs = [], insertCode = (code) => {
|
|
42841
|
-
|
|
42842
|
-
|
|
42868
|
+
jodit.s.restore();
|
|
42869
|
+
jodit.s.insertHTML(code);
|
|
42843
42870
|
close();
|
|
42844
42871
|
};
|
|
42845
|
-
|
|
42872
|
+
jodit.s.save();
|
|
42846
42873
|
tabs.push({
|
|
42847
42874
|
icon: 'link',
|
|
42848
42875
|
name: 'Link',
|
|
@@ -42853,12 +42880,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42853
42880
|
content: formCode.container
|
|
42854
42881
|
});
|
|
42855
42882
|
formLink.onSubmit(data => {
|
|
42856
|
-
|
|
42883
|
+
var _a, _b, _c, _d;
|
|
42884
|
+
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, {
|
|
42885
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
42886
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
42887
|
+
}));
|
|
42857
42888
|
});
|
|
42858
42889
|
formCode.onSubmit(data => {
|
|
42859
42890
|
insertCode(data.code);
|
|
42860
42891
|
});
|
|
42861
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
42892
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
42862
42893
|
},
|
|
42863
42894
|
tags: ['iframe'],
|
|
42864
42895
|
tooltip: 'Insert youtube/vimeo video'
|