jodit 4.2.24 → 4.2.27

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 (96) hide show
  1. package/CHANGELOG.md +24 -5
  2. package/es2015/jodit.css +4 -2
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +166 -76
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +33 -7
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  13. package/es2018/jodit.css +4 -2
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +2 -2
  16. package/es2018/jodit.js +166 -76
  17. package/es2018/jodit.min.css +1 -1
  18. package/es2018/jodit.min.js +2 -2
  19. package/es2018/plugins/debug/debug.js +1 -1
  20. package/es2018/plugins/debug/debug.min.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.js +33 -7
  23. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  24. package/es2021/jodit.css +4 -2
  25. package/es2021/jodit.fat.min.css +1 -1
  26. package/es2021/jodit.fat.min.js +2 -2
  27. package/es2021/jodit.js +166 -76
  28. package/es2021/jodit.min.css +1 -1
  29. package/es2021/jodit.min.js +2 -2
  30. package/es2021/plugins/debug/debug.js +1 -1
  31. package/es2021/plugins/debug/debug.min.js +1 -1
  32. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.js +33 -7
  34. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  35. package/es2021.en/jodit.css +4 -2
  36. package/es2021.en/jodit.fat.min.css +1 -1
  37. package/es2021.en/jodit.fat.min.js +2 -2
  38. package/es2021.en/jodit.js +101 -57
  39. package/es2021.en/jodit.min.css +1 -1
  40. package/es2021.en/jodit.min.js +2 -2
  41. package/es2021.en/plugins/debug/debug.js +1 -1
  42. package/es2021.en/plugins/debug/debug.min.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.js +3 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  46. package/es5/jodit.css +11 -6
  47. package/es5/jodit.fat.min.css +1 -1
  48. package/es5/jodit.fat.min.js +2 -2
  49. package/es5/jodit.js +167 -76
  50. package/es5/jodit.min.css +3 -3
  51. package/es5/jodit.min.js +2 -2
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +33 -7
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  57. package/esm/core/constants.js +3 -3
  58. package/esm/core/dom/dom.d.ts +2 -1
  59. package/esm/core/dom/dom.js +10 -4
  60. package/esm/core/global.js +4 -1
  61. package/esm/core/helpers/normalize/normalize-key-aliases.js +2 -1
  62. package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
  63. package/esm/core/ui/button/tooltip/tooltip.js +11 -5
  64. package/esm/langs/ua.d.ts +212 -0
  65. package/esm/langs/ua.js +225 -0
  66. package/esm/languages.js +2 -0
  67. package/esm/modules/table/table.d.ts +2 -3
  68. package/esm/modules/table/table.js +27 -34
  69. package/esm/plugins/add-new-line/add-new-line.js +4 -1
  70. package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +9 -1
  71. package/esm/plugins/hotkeys/hotkeys.js +4 -2
  72. package/esm/plugins/line-height/langs/index.d.ts +2 -1
  73. package/esm/plugins/line-height/langs/index.js +2 -1
  74. package/esm/plugins/line-height/langs/ua.d.ts +4 -0
  75. package/esm/plugins/line-height/langs/ua.js +9 -0
  76. package/esm/plugins/select-cells/select-cells.js +1 -1
  77. package/esm/plugins/speech-recognize/langs/index.d.ts +2 -1
  78. package/esm/plugins/speech-recognize/langs/index.js +2 -1
  79. package/esm/plugins/speech-recognize/langs/ua.d.ts +9 -0
  80. package/esm/plugins/speech-recognize/langs/ua.js +14 -0
  81. package/esm/plugins/spellcheck/langs/index.d.ts +2 -1
  82. package/esm/plugins/spellcheck/langs/index.js +2 -1
  83. package/esm/plugins/spellcheck/langs/ua.d.ts +1 -0
  84. package/esm/plugins/spellcheck/langs/ua.js +9 -0
  85. package/esm/plugins/table/config.js +19 -3
  86. package/package.json +1 -1
  87. package/types/core/dom/dom.d.ts +2 -1
  88. package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
  89. package/types/langs/ua.d.ts +212 -0
  90. package/types/modules/table/table.d.ts +2 -3
  91. package/types/plugins/line-height/langs/index.d.ts +2 -1
  92. package/types/plugins/line-height/langs/ua.d.ts +4 -0
  93. package/types/plugins/speech-recognize/langs/index.d.ts +2 -1
  94. package/types/plugins/speech-recognize/langs/ua.d.ts +9 -0
  95. package/types/plugins/spellcheck/langs/index.d.ts +2 -1
  96. package/types/plugins/spellcheck/langs/ua.d.ts +1 -0
@@ -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.24
4
+ * Version: v4.2.27
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1737,7 +1737,7 @@ __webpack_require__.r(__webpack_exports__);
1737
1737
  * Released under MIT see LICENSE.txt in the project root for license information.
1738
1738
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1739
1739
  */
1740
- const APP_VERSION = "4.2.24";
1740
+ const APP_VERSION = "4.2.27";
1741
1741
  // prettier-ignore
1742
1742
  const ES = "es2021";
1743
1743
  const IS_ES_MODERN = true;
@@ -1899,8 +1899,8 @@ const KEY_ALIASES = {
1899
1899
  option: 'alt',
1900
1900
  return: 'enter',
1901
1901
  right: 'arrowright',
1902
- space: ' ',
1903
- spacebar: ' ',
1902
+ space: 'space',
1903
+ spacebar: 'space',
1904
1904
  up: 'arrowup',
1905
1905
  win: 'meta',
1906
1906
  windows: 'meta'
@@ -2858,11 +2858,17 @@ class Dom {
2858
2858
  }
2859
2859
  static replace(elm, newTagName, create, withAttributes = false, notMoveContent = false) {
2860
2860
  if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isHTML */ .AH)(newTagName)) {
2861
+ void 0;
2861
2862
  newTagName = create.fromHTML(newTagName);
2862
2863
  }
2863
- const tag = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)
2864
- ? create.element(newTagName)
2865
- : newTagName;
2864
+ let tag;
2865
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)) {
2866
+ void 0;
2867
+ tag = create.element(newTagName);
2868
+ }
2869
+ else {
2870
+ tag = newTagName;
2871
+ }
2866
2872
  if (!notMoveContent) {
2867
2873
  while (elm.firstChild) {
2868
2874
  tag.appendChild(elm.firstChild);
@@ -4503,7 +4509,8 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4503
4509
  const data = boxes.get(jodit) || {}, key = name + tag;
4504
4510
  const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
4505
4511
  if (!data[key]) {
4506
- let c = view.c, body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4512
+ let c = view.c;
4513
+ let body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4507
4514
  ? jodit.o.shadowRoot
4508
4515
  : jodit.od.body;
4509
4516
  if (createInsideEditor &&
@@ -4523,6 +4530,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4523
4530
  body.appendChild(box);
4524
4531
  data[key] = box;
4525
4532
  jodit.hookStatus('beforeDestruct', () => {
4533
+ view.events.off(box);
4526
4534
  _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(box);
4527
4535
  delete data[key];
4528
4536
  if (Object.keys(data).length) {
@@ -4530,6 +4538,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4530
4538
  }
4531
4539
  });
4532
4540
  boxes.set(jodit, data);
4541
+ view.events.fire('getContainer', box);
4533
4542
  }
4534
4543
  data[key].classList.remove('jodit_theme_default', 'jodit_theme_dark');
4535
4544
  data[key].classList.add(`jodit_theme_${view.o.theme || 'default'}`);
@@ -6329,7 +6338,8 @@ function normalizeKeyAliases(keys) {
6329
6338
  ctrl: 2,
6330
6339
  control: 2,
6331
6340
  alt: 3,
6332
- shift: 4
6341
+ shift: 4,
6342
+ space: 5
6333
6343
  };
6334
6344
  return keys
6335
6345
  .replace(/\+\+/g, '+add')
@@ -13380,15 +13390,21 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
13380
13390
  if (!view.o.textIcons &&
13381
13391
  view.o.showTooltip &&
13382
13392
  !view.o.useNativeTooltip) {
13393
+ this.j.e.on('getContainer', (box) => {
13394
+ this.__onAttach(box);
13395
+ });
13383
13396
  view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, () => {
13384
- // TODO Move it inside __show method. Now it is here because testcase failed with capturing
13385
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
13386
- view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
13387
- capture: true
13388
- });
13397
+ this.__onAttach(this.j.container);
13389
13398
  });
13390
13399
  }
13391
13400
  }
13401
+ __onAttach(container) {
13402
+ // TODO Move it inside __show method. Now it is here because testcase failed with capturing
13403
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
13404
+ this.j.e.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
13405
+ capture: true
13406
+ });
13407
+ }
13392
13408
  __addListenersOnEnter() {
13393
13409
  if (this.__listenClose) {
13394
13410
  return;
@@ -17482,6 +17498,7 @@ function addClassNames(className, elm) {
17482
17498
 
17483
17499
 
17484
17500
 
17501
+
17485
17502
 
17486
17503
 
17487
17504
  let exp = {};
@@ -17505,6 +17522,7 @@ exp = {
17505
17522
  pt_br: (jodit_langs_ar__WEBPACK_IMPORTED_MODULE_0___default()),
17506
17523
  ru: (jodit_langs_ar__WEBPACK_IMPORTED_MODULE_0___default()),
17507
17524
  tr: (jodit_langs_ar__WEBPACK_IMPORTED_MODULE_0___default()),
17525
+ ua: (jodit_langs_ar__WEBPACK_IMPORTED_MODULE_0___default()),
17508
17526
  zh_cn: (jodit_langs_ar__WEBPACK_IMPORTED_MODULE_0___default()),
17509
17527
  zh_tw: (jodit_langs_ar__WEBPACK_IMPORTED_MODULE_0___default())
17510
17528
  };
@@ -22439,46 +22457,39 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22439
22457
  removeRow(table, rowIndex) {
22440
22458
  return Table.__removeRow(table, rowIndex);
22441
22459
  }
22442
- static __appendColumn(table, j, after, create) {
22460
+ /**
22461
+ * Insert column before / after all the columns containing the selected cells
22462
+ */
22463
+ appendColumn(table, selectedCell, insertAfter = true) {
22443
22464
  const box = Table.__formalMatrix(table);
22444
- let i;
22445
- if (j === undefined || j < 0) {
22446
- j = Table.__getColumnsCount(table) - 1;
22447
- }
22448
- for (i = 0; i < box.length; i += 1) {
22449
- const cell = create.element('td');
22450
- const td = box[i][j];
22451
- let added = false;
22452
- if (after) {
22453
- if ((box[i] && td && j + 1 >= box[i].length) ||
22454
- td !== box[i][j + 1]) {
22455
- if (td.nextSibling) {
22456
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(td.nextSibling, cell);
22457
- }
22458
- else {
22459
- td.parentNode && td.parentNode.appendChild(cell);
22460
- }
22461
- added = true;
22465
+ if (!insertAfter && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.isCell(selectedCell.previousElementSibling)) {
22466
+ return this.appendColumn(table, selectedCell.previousElementSibling, true);
22467
+ }
22468
+ const columnIndex = insertAfter
22469
+ ? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
22470
+ : selectedCell.cellIndex;
22471
+ const newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
22472
+ for (let i = 0; i < box.length;) {
22473
+ const cells = box[i];
22474
+ if (cells[columnIndex] !== cells[newColumnIndex] ||
22475
+ columnIndex === newColumnIndex) {
22476
+ const cell = this.j.createInside.element('td');
22477
+ if (insertAfter) {
22478
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.after(cells[columnIndex], cell);
22462
22479
  }
22463
- }
22464
- else {
22465
- if (j - 1 < 0 ||
22466
- (box[i][j] !== box[i][j - 1] && box[i][j].parentNode)) {
22467
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(box[i][j], cell);
22468
- added = true;
22480
+ else {
22481
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(cells[columnIndex], cell);
22482
+ }
22483
+ if (cells[columnIndex].rowSpan > 1) {
22484
+ cell.rowSpan = cells[columnIndex].rowSpan;
22469
22485
  }
22470
22486
  }
22471
- if (!added) {
22472
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', parseInt((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan') || '1', 10) + 1);
22487
+ else {
22488
+ cells[columnIndex].colSpan += 1;
22473
22489
  }
22490
+ i += cells[columnIndex].rowSpan || 1;
22474
22491
  }
22475
22492
  }
22476
- /**
22477
- * Insert column before / after all the columns containing the selected cells
22478
- */
22479
- appendColumn(table, j, after) {
22480
- return Table.__appendColumn(table, j, after, this.j.createInside);
22481
- }
22482
22493
  static __removeColumn(table, j) {
22483
22494
  const box = Table.__formalMatrix(table);
22484
22495
  let dec;
@@ -22696,7 +22707,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22696
22707
  alreadyMerged.delete(first);
22697
22708
  Table.__unmark(__marked);
22698
22709
  Table.__normalizeTable(table);
22699
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach((tr, index) => {
22710
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(tr => {
22700
22711
  if (!tr.cells.length) {
22701
22712
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(tr);
22702
22713
  }
@@ -22705,7 +22716,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22705
22716
  }
22706
22717
  }
22707
22718
  /**
22708
- * It combines all of the selected cells into one. The contents of the cells will also be combined
22719
+ * It combines all the selected cells into one. The contents of the cells will also be combined
22709
22720
  */
22710
22721
  mergeSelected(table) {
22711
22722
  return Table.__mergeSelected(table, this.j);
@@ -25047,7 +25058,9 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25047
25058
  editor.e
25048
25059
  .off(editor.editor, '.' + ns)
25049
25060
  .off(editor.container, '.' + ns)
25061
+ .off('.' + ns)
25050
25062
  .on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
25063
+ .on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
25051
25064
  .on(editor.editor, 'click' + '.' + ns, this.__hide)
25052
25065
  .on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
25053
25066
  .on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
@@ -25135,7 +25148,8 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25135
25148
  jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(this.__line);
25136
25149
  this.j.e
25137
25150
  .off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
25138
- .off(this.j.container, '.' + ns);
25151
+ .off(this.j.container, '.' + ns)
25152
+ .off('.' + ns);
25139
25153
  }
25140
25154
  }
25141
25155
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
@@ -27264,13 +27278,21 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
27264
27278
  */
27265
27279
 
27266
27280
 
27281
+ const TABLE_CONTAINER_TAGS = new Set([
27282
+ 'table',
27283
+ 'tbody',
27284
+ 'thead',
27285
+ 'tfoot',
27286
+ 'tr'
27287
+ ]);
27267
27288
  /**
27268
27289
  * @private
27269
27290
  */
27270
27291
  function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
27271
27292
  if (jodit.o.cleanHTML.fillEmptyParagraph &&
27272
27293
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(nodeElm) &&
27273
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
27294
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) &&
27295
+ !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
27274
27296
  const br = jodit.createInside.element('br');
27275
27297
  nodeElm.appendChild(br);
27276
27298
  return true;
@@ -30092,7 +30114,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
30092
30114
  constructor() {
30093
30115
  super(...arguments);
30094
30116
  this.onKeyPress = (event) => {
30095
- const special = this.specialKeys[event.which], character = (event.key || String.fromCharCode(event.which)).toLowerCase();
30117
+ const special = this.specialKeys[event.which];
30118
+ const character = (event.key || String.fromCharCode(event.which)).toLowerCase();
30096
30119
  const modif = [special || character];
30097
30120
  ['alt', 'ctrl', 'shift', 'meta'].forEach(specialKey => {
30098
30121
  if (event[specialKey + 'Key'] && special !== specialKey) {
@@ -30186,7 +30209,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
30186
30209
  }
30187
30210
  })
30188
30211
  .on('keydown.hotkeys', (event) => {
30189
- const shortcut = this.onKeyPress(event), stop = {
30212
+ const shortcut = this.onKeyPress(event);
30213
+ const stop = {
30190
30214
  shouldStop: true
30191
30215
  };
30192
30216
  const resultOfFire = this.j.e.fire(shortcut + '.hotkey', event.type, stop);
@@ -33634,6 +33658,7 @@ __webpack_require__.r(__webpack_exports__);
33634
33658
  /* harmony export */ pt_br: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
33635
33659
  /* harmony export */ ru: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
33636
33660
  /* harmony export */ tr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
33661
+ /* harmony export */ ua: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
33637
33662
  /* harmony export */ zh_cn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
33638
33663
  /* harmony export */ zh_tw: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; }
33639
33664
  /* harmony export */ });
@@ -33666,6 +33691,7 @@ __webpack_require__.r(__webpack_exports__);
33666
33691
 
33667
33692
 
33668
33693
 
33694
+
33669
33695
 
33670
33696
 
33671
33697
  /***/ }),
@@ -38099,7 +38125,7 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
38099
38125
  break;
38100
38126
  case 'addcolumnafter':
38101
38127
  case 'addcolumnbefore':
38102
- this.__tableModule.appendColumn(table, cell.cellIndex, command === 'addcolumnafter');
38128
+ this.__tableModule.appendColumn(table, cell, command === 'addcolumnafter');
38103
38129
  break;
38104
38130
  case 'addrowafter':
38105
38131
  case 'addrowbefore':
@@ -39436,6 +39462,7 @@ __webpack_require__.r(__webpack_exports__);
39436
39462
  /* harmony export */ pt_br: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
39437
39463
  /* harmony export */ ru: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
39438
39464
  /* harmony export */ tr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
39465
+ /* harmony export */ ua: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
39439
39466
  /* harmony export */ zh_cn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
39440
39467
  /* harmony export */ zh_tw: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; }
39441
39468
  /* harmony export */ });
@@ -39468,6 +39495,7 @@ __webpack_require__.r(__webpack_exports__);
39468
39495
 
39469
39496
 
39470
39497
 
39498
+
39471
39499
 
39472
39500
 
39473
39501
  /***/ }),
@@ -40627,6 +40655,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
40627
40655
  }
40628
40656
  },
40629
40657
  popup: (editor, current, close, button) => {
40658
+ editor.editor.normalize();
40659
+ const snapshot = editor.history.snapshot.make();
40630
40660
  const control = button.control;
40631
40661
  const default_rows_count = control.data && control.data.rows ? control.data.rows : 10, default_cols_count = control.data && control.data.cols ? control.data.cols : 10;
40632
40662
  const generateExtraClasses = () => {
@@ -40719,10 +40749,24 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
40719
40749
  table.classList.add(className);
40720
40750
  });
40721
40751
  });
40722
- if (editor.editor.firstChild) {
40723
- editor.s.insertNode(crt.text('\n'), false, false);
40752
+ editor.s.restore();
40753
+ editor.s.removeMarkers();
40754
+ editor.editor.normalize();
40755
+ editor.history.snapshot.restore(snapshot);
40756
+ const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.furthest(editor.s.current(), jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, editor.editor);
40757
+ if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isEmpty(block)) {
40758
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(block, table, undefined, false, true);
40759
+ }
40760
+ else {
40761
+ if (block) {
40762
+ const fake = crt.text('\n');
40763
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(block, fake);
40764
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(fake, table);
40765
+ }
40766
+ else {
40767
+ editor.s.insertNode(table, false);
40768
+ }
40724
40769
  }
40725
- editor.s.insertNode(table, false);
40726
40770
  if (first_td) {
40727
40771
  editor.s.setCursorIn(first_td);
40728
40772
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(first_td, editor.editor, editor.ed);