jodit 4.2.25 → 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.
- package/CHANGELOG.md +20 -5
- package/es2015/jodit.css +4 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +95 -57
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- 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 +4 -2
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +95 -57
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- 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 +4 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +95 -57
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- 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 +4 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +95 -57
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- 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/jodit.css +11 -6
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +96 -57
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- 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 +3 -3
- package/esm/core/dom/dom.d.ts +2 -1
- package/esm/core/dom/dom.js +10 -4
- package/esm/core/global.js +4 -1
- package/esm/core/helpers/normalize/normalize-key-aliases.js +2 -1
- package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
- package/esm/core/ui/button/tooltip/tooltip.js +11 -5
- package/esm/modules/table/table.d.ts +2 -3
- package/esm/modules/table/table.js +27 -34
- package/esm/plugins/add-new-line/add-new-line.js +4 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +9 -1
- package/esm/plugins/hotkeys/hotkeys.js +4 -2
- package/esm/plugins/select-cells/select-cells.js +1 -1
- package/esm/plugins/table/config.js +19 -3
- package/package.json +1 -1
- package/types/core/dom/dom.d.ts +2 -1
- package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
- package/types/modules/table/table.d.ts +2 -3
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.
|
|
4
|
+
* Version: v4.2.27
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -3127,7 +3127,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3127
3127
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
3128
3128
|
*/
|
|
3129
3129
|
|
|
3130
|
-
var APP_VERSION = "4.2.
|
|
3130
|
+
var APP_VERSION = "4.2.27";
|
|
3131
3131
|
// prettier-ignore
|
|
3132
3132
|
var ES = "es5";
|
|
3133
3133
|
var IS_ES_MODERN = false;
|
|
@@ -3288,8 +3288,8 @@ var KEY_ALIASES = {
|
|
|
3288
3288
|
option: 'alt',
|
|
3289
3289
|
return: 'enter',
|
|
3290
3290
|
right: 'arrowright',
|
|
3291
|
-
space: '
|
|
3292
|
-
spacebar: '
|
|
3291
|
+
space: 'space',
|
|
3292
|
+
spacebar: 'space',
|
|
3293
3293
|
up: 'arrowup',
|
|
3294
3294
|
win: 'meta',
|
|
3295
3295
|
windows: 'meta'
|
|
@@ -4315,11 +4315,17 @@ var Dom = /** @class */ (function () {
|
|
|
4315
4315
|
if (withAttributes === void 0) { withAttributes = false; }
|
|
4316
4316
|
if (notMoveContent === void 0) { notMoveContent = false; }
|
|
4317
4317
|
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isHTML */ .AH)(newTagName)) {
|
|
4318
|
+
void 0;
|
|
4318
4319
|
newTagName = create.fromHTML(newTagName);
|
|
4319
4320
|
}
|
|
4320
|
-
var tag
|
|
4321
|
-
|
|
4322
|
-
|
|
4321
|
+
var tag;
|
|
4322
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)) {
|
|
4323
|
+
void 0;
|
|
4324
|
+
tag = create.element(newTagName);
|
|
4325
|
+
}
|
|
4326
|
+
else {
|
|
4327
|
+
tag = newTagName;
|
|
4328
|
+
}
|
|
4323
4329
|
if (!notMoveContent) {
|
|
4324
4330
|
while (elm.firstChild) {
|
|
4325
4331
|
tag.appendChild(elm.firstChild);
|
|
@@ -6090,7 +6096,8 @@ function getContainer(jodit, classFunc, tag, createInsideEditor) {
|
|
|
6090
6096
|
var data = boxes.get(jodit) || {}, key = name + tag;
|
|
6091
6097
|
var view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
|
|
6092
6098
|
if (!data[key]) {
|
|
6093
|
-
var c = view.c
|
|
6099
|
+
var c = view.c;
|
|
6100
|
+
var body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
|
|
6094
6101
|
? jodit.o.shadowRoot
|
|
6095
6102
|
: jodit.od.body;
|
|
6096
6103
|
if (createInsideEditor &&
|
|
@@ -6110,6 +6117,7 @@ function getContainer(jodit, classFunc, tag, createInsideEditor) {
|
|
|
6110
6117
|
body.appendChild(box_1);
|
|
6111
6118
|
data[key] = box_1;
|
|
6112
6119
|
jodit.hookStatus('beforeDestruct', function () {
|
|
6120
|
+
view.events.off(box_1);
|
|
6113
6121
|
_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(box_1);
|
|
6114
6122
|
delete data[key];
|
|
6115
6123
|
if (Object.keys(data).length) {
|
|
@@ -6117,6 +6125,7 @@ function getContainer(jodit, classFunc, tag, createInsideEditor) {
|
|
|
6117
6125
|
}
|
|
6118
6126
|
});
|
|
6119
6127
|
boxes.set(jodit, data);
|
|
6128
|
+
view.events.fire('getContainer', box_1);
|
|
6120
6129
|
}
|
|
6121
6130
|
data[key].classList.remove('jodit_theme_default', 'jodit_theme_dark');
|
|
6122
6131
|
data[key].classList.add("jodit_theme_".concat(view.o.theme || 'default'));
|
|
@@ -7942,7 +7951,8 @@ function normalizeKeyAliases(keys) {
|
|
|
7942
7951
|
ctrl: 2,
|
|
7943
7952
|
control: 2,
|
|
7944
7953
|
alt: 3,
|
|
7945
|
-
shift: 4
|
|
7954
|
+
shift: 4,
|
|
7955
|
+
space: 5
|
|
7946
7956
|
};
|
|
7947
7957
|
return keys
|
|
7948
7958
|
.replace(/\+\+/g, '+add')
|
|
@@ -15310,12 +15320,11 @@ var UITooltip = /** @class */ (function (_super) {
|
|
|
15310
15320
|
if (!view.o.textIcons &&
|
|
15311
15321
|
view.o.showTooltip &&
|
|
15312
15322
|
!view.o.useNativeTooltip) {
|
|
15323
|
+
_this.j.e.on('getContainer', function (box) {
|
|
15324
|
+
_this.__onAttach(box);
|
|
15325
|
+
});
|
|
15313
15326
|
view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, function () {
|
|
15314
|
-
|
|
15315
|
-
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(_this.j, UITooltip_1).appendChild(_this.container);
|
|
15316
|
-
view.e.on(view.container, 'mouseenter.tooltip', _this.__onMouseEnter, {
|
|
15317
|
-
capture: true
|
|
15318
|
-
});
|
|
15327
|
+
_this.__onAttach(_this.j.container);
|
|
15319
15328
|
});
|
|
15320
15329
|
}
|
|
15321
15330
|
return _this;
|
|
@@ -15327,6 +15336,13 @@ var UITooltip = /** @class */ (function (_super) {
|
|
|
15327
15336
|
UITooltip.prototype.render = function () {
|
|
15328
15337
|
return '<div><div class="&__content"></div></div>';
|
|
15329
15338
|
};
|
|
15339
|
+
UITooltip.prototype.__onAttach = function (container) {
|
|
15340
|
+
// TODO Move it inside __show method. Now it is here because testcase failed with capturing
|
|
15341
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
15342
|
+
this.j.e.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
15343
|
+
capture: true
|
|
15344
|
+
});
|
|
15345
|
+
};
|
|
15330
15346
|
UITooltip.prototype.__addListenersOnEnter = function () {
|
|
15331
15347
|
if (this.__listenClose) {
|
|
15332
15348
|
return;
|
|
@@ -24868,46 +24884,40 @@ var Table = /** @class */ (function (_super) {
|
|
|
24868
24884
|
Table.prototype.removeRow = function (table, rowIndex) {
|
|
24869
24885
|
return Table.__removeRow(table, rowIndex);
|
|
24870
24886
|
};
|
|
24871
|
-
|
|
24887
|
+
/**
|
|
24888
|
+
* Insert column before / after all the columns containing the selected cells
|
|
24889
|
+
*/
|
|
24890
|
+
Table.prototype.appendColumn = function (table, selectedCell, insertAfter) {
|
|
24891
|
+
if (insertAfter === void 0) { insertAfter = true; }
|
|
24872
24892
|
var box = Table.__formalMatrix(table);
|
|
24873
|
-
|
|
24874
|
-
|
|
24875
|
-
|
|
24876
|
-
|
|
24877
|
-
|
|
24878
|
-
|
|
24879
|
-
|
|
24880
|
-
|
|
24881
|
-
|
|
24882
|
-
|
|
24883
|
-
|
|
24884
|
-
|
|
24885
|
-
|
|
24886
|
-
|
|
24887
|
-
else {
|
|
24888
|
-
td.parentNode && td.parentNode.appendChild(cell);
|
|
24889
|
-
}
|
|
24890
|
-
added = true;
|
|
24893
|
+
if (!insertAfter && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.isCell(selectedCell.previousElementSibling)) {
|
|
24894
|
+
return this.appendColumn(table, selectedCell.previousElementSibling, true);
|
|
24895
|
+
}
|
|
24896
|
+
var columnIndex = insertAfter
|
|
24897
|
+
? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
|
|
24898
|
+
: selectedCell.cellIndex;
|
|
24899
|
+
var newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
|
|
24900
|
+
for (var i = 0; i < box.length;) {
|
|
24901
|
+
var cells = box[i];
|
|
24902
|
+
if (cells[columnIndex] !== cells[newColumnIndex] ||
|
|
24903
|
+
columnIndex === newColumnIndex) {
|
|
24904
|
+
var cell = this.j.createInside.element('td');
|
|
24905
|
+
if (insertAfter) {
|
|
24906
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.after(cells[columnIndex], cell);
|
|
24891
24907
|
}
|
|
24892
|
-
|
|
24893
|
-
|
|
24894
|
-
|
|
24895
|
-
|
|
24896
|
-
|
|
24897
|
-
added = true;
|
|
24908
|
+
else {
|
|
24909
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(cells[columnIndex], cell);
|
|
24910
|
+
}
|
|
24911
|
+
if (cells[columnIndex].rowSpan > 1) {
|
|
24912
|
+
cell.rowSpan = cells[columnIndex].rowSpan;
|
|
24898
24913
|
}
|
|
24899
24914
|
}
|
|
24900
|
-
|
|
24901
|
-
|
|
24915
|
+
else {
|
|
24916
|
+
cells[columnIndex].colSpan += 1;
|
|
24902
24917
|
}
|
|
24918
|
+
i += cells[columnIndex].rowSpan || 1;
|
|
24903
24919
|
}
|
|
24904
24920
|
};
|
|
24905
|
-
/**
|
|
24906
|
-
* Insert column before / after all the columns containing the selected cells
|
|
24907
|
-
*/
|
|
24908
|
-
Table.prototype.appendColumn = function (table, j, after) {
|
|
24909
|
-
return Table.__appendColumn(table, j, after, this.j.createInside);
|
|
24910
|
-
};
|
|
24911
24921
|
Table.__removeColumn = function (table, j) {
|
|
24912
24922
|
var box = Table.__formalMatrix(table);
|
|
24913
24923
|
var dec;
|
|
@@ -25125,7 +25135,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
25125
25135
|
alreadyMerged.delete(first);
|
|
25126
25136
|
Table.__unmark(__marked);
|
|
25127
25137
|
Table.__normalizeTable(table);
|
|
25128
|
-
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(function (tr
|
|
25138
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(function (tr) {
|
|
25129
25139
|
if (!tr.cells.length) {
|
|
25130
25140
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(tr);
|
|
25131
25141
|
}
|
|
@@ -25134,7 +25144,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
25134
25144
|
}
|
|
25135
25145
|
};
|
|
25136
25146
|
/**
|
|
25137
|
-
* It combines all
|
|
25147
|
+
* It combines all the selected cells into one. The contents of the cells will also be combined
|
|
25138
25148
|
*/
|
|
25139
25149
|
Table.prototype.mergeSelected = function (table) {
|
|
25140
25150
|
return Table.__mergeSelected(table, this.j);
|
|
@@ -27544,7 +27554,9 @@ var addNewLine = /** @class */ (function (_super) {
|
|
|
27544
27554
|
editor.e
|
|
27545
27555
|
.off(editor.editor, '.' + ns)
|
|
27546
27556
|
.off(editor.container, '.' + ns)
|
|
27557
|
+
.off('.' + ns)
|
|
27547
27558
|
.on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
|
|
27559
|
+
.on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
|
|
27548
27560
|
.on(editor.editor, 'click' + '.' + ns, this.__hide)
|
|
27549
27561
|
.on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
|
|
27550
27562
|
.on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
|
|
@@ -27632,7 +27644,8 @@ var addNewLine = /** @class */ (function (_super) {
|
|
|
27632
27644
|
jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(this.__line);
|
|
27633
27645
|
this.j.e
|
|
27634
27646
|
.off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
|
|
27635
|
-
.off(this.j.container, '.' + ns)
|
|
27647
|
+
.off(this.j.container, '.' + ns)
|
|
27648
|
+
.off('.' + ns);
|
|
27636
27649
|
};
|
|
27637
27650
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
27638
27651
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)(':lock')
|
|
@@ -29877,13 +29890,21 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
|
29877
29890
|
*/
|
|
29878
29891
|
|
|
29879
29892
|
|
|
29893
|
+
var TABLE_CONTAINER_TAGS = new Set([
|
|
29894
|
+
'table',
|
|
29895
|
+
'tbody',
|
|
29896
|
+
'thead',
|
|
29897
|
+
'tfoot',
|
|
29898
|
+
'tr'
|
|
29899
|
+
]);
|
|
29880
29900
|
/**
|
|
29881
29901
|
* @private
|
|
29882
29902
|
*/
|
|
29883
29903
|
function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
|
|
29884
29904
|
if (jodit.o.cleanHTML.fillEmptyParagraph &&
|
|
29885
29905
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(nodeElm) &&
|
|
29886
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)
|
|
29906
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) &&
|
|
29907
|
+
!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
|
|
29887
29908
|
var br = jodit.createInside.element('br');
|
|
29888
29909
|
nodeElm.appendChild(br);
|
|
29889
29910
|
return true;
|
|
@@ -33173,7 +33194,8 @@ var hotkeys = /** @class */ (function (_super) {
|
|
|
33173
33194
|
function hotkeys() {
|
|
33174
33195
|
var _this = _super.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__read */ .zs)(arguments), false)) || this;
|
|
33175
33196
|
_this.onKeyPress = function (event) {
|
|
33176
|
-
var special = _this.specialKeys[event.which]
|
|
33197
|
+
var special = _this.specialKeys[event.which];
|
|
33198
|
+
var character = (event.key || String.fromCharCode(event.which)).toLowerCase();
|
|
33177
33199
|
var modif = [special || character];
|
|
33178
33200
|
['alt', 'ctrl', 'shift', 'meta'].forEach(function (specialKey) {
|
|
33179
33201
|
if (event[specialKey + 'Key'] && special !== specialKey) {
|
|
@@ -33269,7 +33291,8 @@ var hotkeys = /** @class */ (function (_super) {
|
|
|
33269
33291
|
}
|
|
33270
33292
|
})
|
|
33271
33293
|
.on('keydown.hotkeys', function (event) {
|
|
33272
|
-
var shortcut = _this.onKeyPress(event)
|
|
33294
|
+
var shortcut = _this.onKeyPress(event);
|
|
33295
|
+
var stop = {
|
|
33273
33296
|
shouldStop: true
|
|
33274
33297
|
};
|
|
33275
33298
|
var resultOfFire = _this.j.e.fire(shortcut + '.hotkey', event.type, stop);
|
|
@@ -41983,7 +42006,7 @@ var selectCells = /** @class */ (function (_super) {
|
|
|
41983
42006
|
break;
|
|
41984
42007
|
case 'addcolumnafter':
|
|
41985
42008
|
case 'addcolumnbefore':
|
|
41986
|
-
this.__tableModule.appendColumn(table_1, cell
|
|
42009
|
+
this.__tableModule.appendColumn(table_1, cell, command === 'addcolumnafter');
|
|
41987
42010
|
break;
|
|
41988
42011
|
case 'addrowafter':
|
|
41989
42012
|
case 'addrowbefore':
|
|
@@ -45419,6 +45442,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
|
|
|
45419
45442
|
}
|
|
45420
45443
|
},
|
|
45421
45444
|
popup: function (editor, current, close, button) {
|
|
45445
|
+
editor.editor.normalize();
|
|
45446
|
+
var snapshot = editor.history.snapshot.make();
|
|
45422
45447
|
var control = button.control;
|
|
45423
45448
|
var default_rows_count = control.data && control.data.rows ? control.data.rows : 10, default_cols_count = control.data && control.data.cols ? control.data.cols : 10;
|
|
45424
45449
|
var generateExtraClasses = function () {
|
|
@@ -45511,10 +45536,24 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
|
|
|
45511
45536
|
table.classList.add(className);
|
|
45512
45537
|
});
|
|
45513
45538
|
});
|
|
45514
|
-
|
|
45515
|
-
|
|
45539
|
+
editor.s.restore();
|
|
45540
|
+
editor.s.removeMarkers();
|
|
45541
|
+
editor.editor.normalize();
|
|
45542
|
+
editor.history.snapshot.restore(snapshot);
|
|
45543
|
+
var 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);
|
|
45544
|
+
if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isEmpty(block)) {
|
|
45545
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(block, table, undefined, false, true);
|
|
45546
|
+
}
|
|
45547
|
+
else {
|
|
45548
|
+
if (block) {
|
|
45549
|
+
var fake = crt.text('\n');
|
|
45550
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(block, fake);
|
|
45551
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(fake, table);
|
|
45552
|
+
}
|
|
45553
|
+
else {
|
|
45554
|
+
editor.s.insertNode(table, false);
|
|
45555
|
+
}
|
|
45516
45556
|
}
|
|
45517
|
-
editor.s.insertNode(table, false);
|
|
45518
45557
|
if (first_td) {
|
|
45519
45558
|
editor.s.setCursorIn(first_td);
|
|
45520
45559
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(first_td, editor.editor, editor.ed);
|