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.
Files changed (99) hide show
  1. package/CHANGELOG.md +51 -9
  2. package/es2015/jodit.css +7 -1
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +85 -54
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.css +53 -0
  9. package/es2015/plugins/debug/debug.js +162 -24
  10. package/es2015/plugins/debug/debug.min.css +1 -0
  11. package/es2015/plugins/debug/debug.min.js +2 -2
  12. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  14. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  15. package/es2018/jodit.css +7 -1
  16. package/es2018/jodit.fat.min.css +1 -1
  17. package/es2018/jodit.fat.min.js +2 -2
  18. package/es2018/jodit.js +85 -54
  19. package/es2018/jodit.min.css +1 -1
  20. package/es2018/jodit.min.js +2 -2
  21. package/es2018/plugins/debug/debug.css +53 -0
  22. package/es2018/plugins/debug/debug.js +162 -24
  23. package/es2018/plugins/debug/debug.min.css +1 -0
  24. package/es2018/plugins/debug/debug.min.js +2 -2
  25. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  26. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  27. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  28. package/es2021/jodit.css +7 -1
  29. package/es2021/jodit.fat.min.css +1 -1
  30. package/es2021/jodit.fat.min.js +2 -2
  31. package/es2021/jodit.js +85 -53
  32. package/es2021/jodit.min.css +1 -1
  33. package/es2021/jodit.min.js +2 -2
  34. package/es2021/plugins/debug/debug.css +53 -0
  35. package/es2021/plugins/debug/debug.js +161 -24
  36. package/es2021/plugins/debug/debug.min.css +1 -0
  37. package/es2021/plugins/debug/debug.min.js +2 -2
  38. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  39. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  40. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  41. package/es2021.en/jodit.css +7 -1
  42. package/es2021.en/jodit.fat.min.css +1 -1
  43. package/es2021.en/jodit.fat.min.js +2 -2
  44. package/es2021.en/jodit.js +85 -53
  45. package/es2021.en/jodit.min.css +1 -1
  46. package/es2021.en/jodit.min.js +2 -2
  47. package/es2021.en/plugins/debug/debug.css +53 -0
  48. package/es2021.en/plugins/debug/debug.js +161 -24
  49. package/es2021.en/plugins/debug/debug.min.css +1 -0
  50. package/es2021.en/plugins/debug/debug.min.js +2 -2
  51. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  52. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  53. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  54. package/es5/164.fat.min.js +1 -1
  55. package/es5/164.min.js +1 -1
  56. package/es5/5.fat.min.js +1 -1
  57. package/es5/5.min.js +1 -1
  58. package/es5/jodit.css +11 -2
  59. package/es5/jodit.fat.min.css +1 -1
  60. package/es5/jodit.fat.min.js +2 -2
  61. package/es5/jodit.js +92 -65
  62. package/es5/jodit.min.css +3 -3
  63. package/es5/jodit.min.js +2 -2
  64. package/es5/plugins/debug/debug.css +53 -0
  65. package/es5/plugins/debug/debug.js +161 -24
  66. package/es5/plugins/debug/debug.min.css +1 -0
  67. package/es5/plugins/debug/debug.min.js +2 -2
  68. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  69. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  70. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  71. package/esm/core/constants.js +1 -1
  72. package/esm/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
  73. package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +7 -3
  74. package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
  75. package/esm/core/ui/button/tooltip/tooltip.js +19 -8
  76. package/esm/core/view/view-with-toolbar.d.ts +1 -0
  77. package/esm/core/view/view-with-toolbar.js +3 -0
  78. package/esm/modules/toolbar/collection/collection.d.ts +0 -1
  79. package/esm/modules/toolbar/collection/collection.js +1 -4
  80. package/esm/plugins/clean-html/config.d.ts +9 -0
  81. package/esm/plugins/debug/debug.d.ts +1 -0
  82. package/esm/plugins/enter/helpers/check-br.js +2 -0
  83. package/esm/plugins/index.js +1 -0
  84. package/esm/plugins/inline-popup/inline-popup.d.ts +0 -1
  85. package/esm/plugins/inline-popup/inline-popup.js +7 -7
  86. package/esm/plugins/link/link.js +6 -2
  87. package/esm/plugins/video/config.d.ts +29 -0
  88. package/esm/plugins/video/config.js +26 -17
  89. package/esm/plugins/wrap-nodes/config.d.ts +5 -1
  90. package/package.json +1 -1
  91. package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
  92. package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
  93. package/types/core/view/view-with-toolbar.d.ts +1 -0
  94. package/types/modules/toolbar/collection/collection.d.ts +0 -1
  95. package/types/plugins/clean-html/config.d.ts +9 -0
  96. package/types/plugins/debug/debug.d.ts +1 -0
  97. package/types/plugins/inline-popup/inline-popup.d.ts +0 -1
  98. package/types/plugins/video/config.d.ts +29 -0
  99. package/types/plugins/wrap-nodes/config.d.ts +5 -1
package/es5/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.39
4
+ * Version: v4.2.41
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1838,7 +1838,7 @@ __webpack_require__.r(__webpack_exports__);
1838
1838
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1839
1839
  */
1840
1840
 
1841
- var APP_VERSION = "4.2.39";
1841
+ var APP_VERSION = "4.2.41";
1842
1842
  // prettier-ignore
1843
1843
  var ES = "es5";
1844
1844
  var IS_ES_MODERN = false;
@@ -8028,13 +8028,13 @@ function ConfigFlatten(obj) {
8028
8028
  /**
8029
8029
  * Javascript url pattern converter replace youtube/vimeo url in embed code.
8030
8030
  */
8031
- var convertMediaUrlToVideoEmbed = function (url, width, height) {
8032
- if (width === void 0) { width = 400; }
8033
- if (height === void 0) { height = 345; }
8031
+ var convertMediaUrlToVideoEmbed = function (url, _a) {
8032
+ var _b = _a === void 0 ? {} : _a, _c = _b.width, width = _c === void 0 ? 400 : _c, _d = _b.height, height = _d === void 0 ? 345 : _d;
8034
8033
  if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
8035
8034
  return url;
8036
8035
  }
8037
- var parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
8036
+ var parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
8037
+ var pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
8038
8038
  parser.href = url;
8039
8039
  if (!width) {
8040
8040
  width = 400;
@@ -8061,7 +8061,10 @@ var convertMediaUrlToVideoEmbed = function (url, width, height) {
8061
8061
  case 'www.youtu.be': {
8062
8062
  var query = parser.search
8063
8063
  ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
8064
- : { v: parser.pathname.substr(1) };
8064
+ : { v: parser.pathname.substring(1) };
8065
+ if (/^embed\/.*/.test(query.v)) {
8066
+ query.v = query.v.substring(6);
8067
+ }
8065
8068
  return query.v
8066
8069
  ? '<iframe width="' +
8067
8070
  width +
@@ -14057,6 +14060,7 @@ var JODIT_EVENTS_ON_HIDE = [
14057
14060
  'changePlace.tooltip',
14058
14061
  'afterOpenPopup.tooltip',
14059
14062
  'hidePopup.tooltip',
14063
+ 'beforePopupClose.tooltip',
14060
14064
  'closeAllPopups.tooltip'
14061
14065
  ];
14062
14066
  var UITooltip = /** @class */ (function (_super) {
@@ -14064,6 +14068,7 @@ var UITooltip = /** @class */ (function (_super) {
14064
14068
  function UITooltip(view) {
14065
14069
  var _this = _super.call(this, view) || this;
14066
14070
  _this.__isOpened = false;
14071
+ _this.__attachedContainers = new Set();
14067
14072
  _this.__listenClose = false;
14068
14073
  _this.__currentTarget = null;
14069
14074
  _this.__delayShowTimeout = 0;
@@ -14090,7 +14095,16 @@ var UITooltip = /** @class */ (function (_super) {
14090
14095
  UITooltip.prototype.__onAttach = function (container) {
14091
14096
  // TODO Move it inside __show method. Now it is here because testcase failed with capturing
14092
14097
  (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
14093
- this.j.e.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
14098
+ this.__attachedContainers.add(container);
14099
+ this.__attachedContainers.add(this.j.container);
14100
+ this.j.e
14101
+ .on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
14102
+ capture: true
14103
+ })
14104
+ .on(container, 'mouseleave.tooltip', this.__onMouseLeave, {
14105
+ capture: true
14106
+ })
14107
+ .on(this.j.container, 'mouseleave.tooltip', this.__onMouseLeave, {
14094
14108
  capture: true
14095
14109
  });
14096
14110
  };
@@ -14102,10 +14116,7 @@ var UITooltip = /** @class */ (function (_super) {
14102
14116
  var view = this.j;
14103
14117
  view.e
14104
14118
  .on(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
14105
- .on(JODIT_EVENTS_ON_HIDE, this.__hide)
14106
- .on(view.container, 'mouseleave.tooltip', this.__onMouseLeave, {
14107
- capture: true
14108
- });
14119
+ .on(JODIT_EVENTS_ON_HIDE, this.__hide);
14109
14120
  };
14110
14121
  UITooltip.prototype.__removeListenersOnLeave = function () {
14111
14122
  if (!this.__listenClose) {
@@ -14115,8 +14126,7 @@ var UITooltip = /** @class */ (function (_super) {
14115
14126
  var view = this.j;
14116
14127
  view.e
14117
14128
  .off(view.ow, WINDOW_EVENTS_ON_HIDE, this.__hide)
14118
- .off(JODIT_EVENTS_ON_HIDE, this.__hide)
14119
- .off(view.container, 'mouseleave.tooltip', this.__onMouseLeave);
14129
+ .off(JODIT_EVENTS_ON_HIDE, this.__hide);
14120
14130
  };
14121
14131
  UITooltip.prototype.__onMouseLeave = function (e) {
14122
14132
  if (this.__currentTarget === e.target) {
@@ -14194,7 +14204,12 @@ var UITooltip = /** @class */ (function (_super) {
14194
14204
  this.__hideTimeout = this.async.setTimeout(this.__hide, this.j.defaultTimeout);
14195
14205
  };
14196
14206
  UITooltip.prototype.destruct = function () {
14197
- this.j.e.off(this.j.container, 'mouseenter.tooltip', this.__onMouseEnter);
14207
+ var _this = this;
14208
+ this.__attachedContainers.forEach(function (container) {
14209
+ _this.j.e
14210
+ .off(container, 'mouseenter.tooltip', _this.__onMouseEnter)
14211
+ .off(container, 'mouseleave.tooltip', _this.__onMouseLeave);
14212
+ });
14198
14213
  this.__hide();
14199
14214
  _super.prototype.destruct.call(this);
14200
14215
  };
@@ -16530,17 +16545,18 @@ var ProgressBar = /** @class */ (function (_super) {
16530
16545
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16531
16546
  /* harmony export */ T: function() { return /* binding */ ViewWithToolbar; }
16532
16547
  /* harmony export */ });
16533
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
16548
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
16534
16549
  /* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
16535
- /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(26318);
16550
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(26318);
16536
16551
  /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
16537
16552
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
16538
16553
  /* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32709);
16539
- /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98253);
16554
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98253);
16540
16555
  /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58720);
16541
- /* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(39611);
16542
- /* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77782);
16543
- /* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8809);
16556
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53048);
16557
+ /* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(39611);
16558
+ /* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77782);
16559
+ /* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8809);
16544
16560
  /*!
16545
16561
  * Jodit Editor (https://xdsoft.net/jodit/)
16546
16562
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -16558,17 +16574,19 @@ var ProgressBar = /** @class */ (function (_super) {
16558
16574
 
16559
16575
 
16560
16576
 
16577
+
16561
16578
  var ViewWithToolbar = /** @class */ (function (_super) {
16562
- (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__extends */ .C6)(ViewWithToolbar, _super);
16579
+ (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__extends */ .C6)(ViewWithToolbar, _super);
16563
16580
  /** @override **/
16564
16581
  function ViewWithToolbar(options, isJodit) {
16565
16582
  if (isJodit === void 0) { isJodit = false; }
16566
16583
  var _this = _super.call(this, options, isJodit) || this;
16567
- _this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_6__/* .makeCollection */ .$K)(_this);
16584
+ _this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_7__/* .makeCollection */ .$K)(_this);
16568
16585
  _this.__defaultToolbarContainer = _this.c.div('jodit-toolbar__box');
16569
16586
  _this.registeredButtons = new Set();
16570
16587
  _this.groupToButtons = {};
16571
16588
  _this.isJodit = false;
16589
+ _this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_5__/* .UITooltip */ .SB(_this);
16572
16590
  _this.isJodit = isJodit;
16573
16591
  _this.e.on('beforeToolbarBuild', _this.beforeToolbarBuild);
16574
16592
  return _this;
@@ -16579,7 +16597,7 @@ var ViewWithToolbar = /** @class */ (function (_super) {
16579
16597
  */
16580
16598
  get: function () {
16581
16599
  if (!this.o.fullsize &&
16582
- ((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))) {
16600
+ ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_9__/* .isString */ .K)(this.o.toolbar) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(this.o.toolbar))) {
16583
16601
  return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_4__/* .resolveElement */ .tI)(this.o.toolbar, this.o.shadowRoot || this.od);
16584
16602
  }
16585
16603
  this.o.toolbar &&
@@ -16655,12 +16673,12 @@ var ViewWithToolbar = /** @class */ (function (_super) {
16655
16673
  var _this = this;
16656
16674
  if (Object.keys(this.groupToButtons).length) {
16657
16675
  return items.map(function (item) {
16658
- if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item) &&
16676
+ if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_10__/* .isButtonGroup */ .i)(item) &&
16659
16677
  item.group &&
16660
16678
  _this.groupToButtons[item.group]) {
16661
16679
  return {
16662
16680
  group: item.group,
16663
- buttons: (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__read */ .zs)(item.buttons), false), (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__read */ .zs)(_this.groupToButtons[item.group]), false)
16681
+ buttons: (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__read */ .zs)(item.buttons), false), (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__read */ .zs)(_this.groupToButtons[item.group]), false)
16664
16682
  };
16665
16683
  }
16666
16684
  return item;
@@ -16673,19 +16691,20 @@ var ViewWithToolbar = /** @class */ (function (_super) {
16673
16691
  }
16674
16692
  this.setStatus(jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.beforeDestruct);
16675
16693
  this.e.off('beforeToolbarBuild', this.beforeToolbarBuild);
16694
+ this.__tooltip.destruct();
16676
16695
  this.toolbar.destruct();
16677
16696
  // @ts-ignore After destruct, we are not responsible for anything
16678
16697
  this.toolbar = undefined;
16679
16698
  _super.prototype.destruct.call(this);
16680
16699
  };
16681
- (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
16700
+ (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
16682
16701
  (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
16683
16702
  ], ViewWithToolbar.prototype, "buildToolbar", null);
16684
- (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
16685
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Ay
16703
+ (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
16704
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Ay
16686
16705
  ], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
16687
16706
  return ViewWithToolbar;
16688
- }(jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/* .View */ .S));
16707
+ }(jodit_core_view_view__WEBPACK_IMPORTED_MODULE_6__/* .View */ .S));
16689
16708
 
16690
16709
 
16691
16710
 
@@ -24698,7 +24717,6 @@ var ToolbarCollection = /** @class */ (function (_super) {
24698
24717
  var _this = _super.call(this, jodit) || this;
24699
24718
  _this.__listenEvents = 'updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
24700
24719
  'selectionchange changeSelection focus afterSetMode touchstart focus blur';
24701
- _this.__tooltip = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITooltip */ .SB(_this.jodit);
24702
24720
  return _this;
24703
24721
  }
24704
24722
  /** @override */
@@ -24785,12 +24803,9 @@ var ToolbarCollection = /** @class */ (function (_super) {
24785
24803
  };
24786
24804
  /** @override **/
24787
24805
  ToolbarCollection.prototype.destruct = function () {
24788
- var _a;
24789
24806
  if (this.isDestructed) {
24790
24807
  return;
24791
24808
  }
24792
- (_a = this.__tooltip) === null || _a === void 0 ? void 0 : _a.destruct();
24793
- this.__tooltip = null;
24794
24809
  this.j.e
24795
24810
  .off(this.__listenEvents, this.update)
24796
24811
  .off('afterSetMode focus', this.__immediateUpdate);
@@ -30924,9 +30939,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('enter
30924
30939
  */
30925
30940
  function checkBR(fake, jodit, shiftKeyPressed) {
30926
30941
  var isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['pre', 'blockquote'], jodit.editor));
30942
+ var isCell = !isMultiLineBlock && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(fake, ['td', 'th'], jodit.editor);
30927
30943
  var isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
30928
30944
  // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
30929
30945
  if (isBRMode ||
30946
+ isCell ||
30930
30947
  (shiftKeyPressed && !isMultiLineBlock) ||
30931
30948
  (!shiftKeyPressed && isMultiLineBlock)) {
30932
30949
  // 2 BR before
@@ -34497,6 +34514,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('inden
34497
34514
 
34498
34515
 
34499
34516
 
34517
+ // import 'jodit/plugins/debug/debug';
34500
34518
 
34501
34519
 
34502
34520
 
@@ -35148,10 +35166,10 @@ var inlinePopup = /** @class */ (function (_super) {
35148
35166
  if (!this.j.o.toolbarInlineForSelection) {
35149
35167
  return;
35150
35168
  }
35151
- var type = 'selection', sel = this.j.s.sel, range = this.j.s.range;
35152
- if ((sel === null || sel === void 0 ? void 0 : sel.isCollapsed) ||
35153
- this.isSelectedTarget(range) ||
35154
- this.tableModule.getAllSelectedCells().length) {
35169
+ var type = 'selection';
35170
+ var sel = this.j.s.sel;
35171
+ var range = this.j.s.range;
35172
+ if ((sel === null || sel === void 0 ? void 0 : sel.isCollapsed) || this.isSelectedTarget(range)) {
35155
35173
  if (this.type === type && this.popup.isOpened) {
35156
35174
  this.hidePopup();
35157
35175
  }
@@ -35173,16 +35191,12 @@ var inlinePopup = /** @class */ (function (_super) {
35173
35191
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(sc.childNodes[r.startOffset], new Set((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.keys)(this.j.o.popup, false))) &&
35174
35192
  r.startOffset === r.endOffset - 1);
35175
35193
  };
35176
- Object.defineProperty(inlinePopup.prototype, "tableModule", {
35177
- /**
35178
- * Shortcut for Table module
35179
- */
35180
- get: function () {
35181
- return this.j.getInstance('Table', this.j.o);
35182
- },
35183
- enumerable: false,
35184
- configurable: true
35185
- });
35194
+ /**
35195
+ * Shortcut for Table module
35196
+ */
35197
+ // private get tableModule(): Table {
35198
+ // return this.j.getInstance<Table>('Table', this.j.o);
35199
+ // }
35186
35200
  /** @override **/
35187
35201
  inlinePopup.prototype.beforeDestruct = function (jodit) {
35188
35202
  jodit.e
@@ -36344,13 +36358,17 @@ var link = /** @class */ (function (_super) {
36344
36358
  }
36345
36359
  };
36346
36360
  link.prototype.onProcessPasteLink = function (ignore, html) {
36361
+ var _a, _b, _c, _d;
36347
36362
  var jodit = this.jodit;
36348
36363
  if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
36349
36364
  return;
36350
36365
  }
36351
36366
  jodit.e.stopPropagation('processPaste');
36352
36367
  if (jodit.o.link.processVideoLink) {
36353
- var embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed)(html);
36368
+ var 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, {
36369
+ width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
36370
+ height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
36371
+ });
36354
36372
  if (embed !== html) {
36355
36373
  return jodit.createInside.fromHTML(embed);
36356
36374
  }
@@ -44494,12 +44512,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
44494
44512
 
44495
44513
 
44496
44514
 
44515
+ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
44516
+ parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
44517
+ defaultWidth: 400,
44518
+ defaultHeight: 345
44519
+ };
44497
44520
  jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
44498
44521
  jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
44499
- popup: function (editor, current, close) {
44500
- var formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(editor, [
44501
- new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(editor, [
44502
- new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(editor, {
44522
+ popup: function (jodit, current, close) {
44523
+ var formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
44524
+ new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
44525
+ new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
44503
44526
  name: 'url',
44504
44527
  required: true,
44505
44528
  label: 'URL',
@@ -44507,30 +44530,30 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
44507
44530
  validators: ['url']
44508
44531
  })
44509
44532
  ]),
44510
- new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(editor, [
44511
- (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(editor, '', 'Insert', 'primary').onAction(function () {
44533
+ new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
44534
+ (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(function () {
44512
44535
  return formLink.submit();
44513
44536
  })
44514
44537
  ])
44515
- ]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(editor, [
44516
- new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(editor, [
44517
- new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(editor, {
44538
+ ]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
44539
+ new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
44540
+ new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
44518
44541
  name: 'code',
44519
44542
  required: true,
44520
44543
  label: 'Embed code'
44521
44544
  })
44522
44545
  ]),
44523
- new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(editor, [
44524
- (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(editor, '', 'Insert', 'primary').onAction(function () {
44546
+ new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
44547
+ (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(function () {
44525
44548
  return formCode.submit();
44526
44549
  })
44527
44550
  ])
44528
44551
  ]), tabs = [], insertCode = function (code) {
44529
- editor.s.restore();
44530
- editor.s.insertHTML(code);
44552
+ jodit.s.restore();
44553
+ jodit.s.insertHTML(code);
44531
44554
  close();
44532
44555
  };
44533
- editor.s.save();
44556
+ jodit.s.save();
44534
44557
  tabs.push({
44535
44558
  icon: 'link',
44536
44559
  name: 'Link',
@@ -44541,12 +44564,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
44541
44564
  content: formCode.container
44542
44565
  });
44543
44566
  formLink.onSubmit(function (data) {
44544
- insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed)(data.url));
44567
+ var _a, _b, _c, _d;
44568
+ 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, {
44569
+ width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
44570
+ height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
44571
+ }));
44545
44572
  });
44546
44573
  formCode.onSubmit(function (data) {
44547
44574
  insertCode(data.code);
44548
44575
  });
44549
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(editor, tabs);
44576
+ return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
44550
44577
  },
44551
44578
  tags: ['iframe'],
44552
44579
  tooltip: 'Insert youtube/vimeo video'