@syncfusion/ej2-richtexteditor 22.1.39 → 22.2.5
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 +10 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +27 -2
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +26 -1
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/editor-manager/plugin/ms-word-clean-up.js +4 -0
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +10 -0
- package/src/rich-text-editor/base/interface.d.ts +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -0
- package/src/rich-text-editor/renderer/table-module.js +12 -1
|
@@ -18269,6 +18269,10 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
18269
18269
|
else {
|
|
18270
18270
|
//Add to support separate list which looks like same list and also to add all tags as it is inside list
|
|
18271
18271
|
if (firstChild.childNodes.length > 0) {
|
|
18272
|
+
var listIgnoreTag = firstChild.querySelectorAll('[style*="mso-list"]');
|
|
18273
|
+
for (var i = 0; i < listIgnoreTag.length; i++) {
|
|
18274
|
+
listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g, ""));
|
|
18275
|
+
}
|
|
18272
18276
|
var listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
|
|
18273
18277
|
if (!isNullOrUndefined(listOrder)) {
|
|
18274
18278
|
this.listContents.push(listOrder.textContent.trim());
|
|
@@ -21513,6 +21517,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
21513
21517
|
}
|
|
21514
21518
|
this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, function (updatedArgs) { value = updatedArgs.value; });
|
|
21515
21519
|
clipBoardElem.innerHTML = value;
|
|
21520
|
+
clipBoardElem = this.addTableClass(clipBoardElem);
|
|
21516
21521
|
this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
|
|
21517
21522
|
extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
|
|
21518
21523
|
_this.parent.formatter.onSuccess(_this.parent, args);
|
|
@@ -21525,6 +21530,15 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
21525
21530
|
}
|
|
21526
21531
|
}
|
|
21527
21532
|
};
|
|
21533
|
+
PasteCleanup.prototype.addTableClass = function (element) {
|
|
21534
|
+
var tableElement = element.querySelectorAll('table');
|
|
21535
|
+
for (var i = 0; i < tableElement.length; i++) {
|
|
21536
|
+
if (!tableElement[i].classList.contains('e-rte-table')) {
|
|
21537
|
+
tableElement[i].classList.add('e-rte-table');
|
|
21538
|
+
}
|
|
21539
|
+
}
|
|
21540
|
+
return element;
|
|
21541
|
+
};
|
|
21528
21542
|
PasteCleanup.prototype.setImageProperties = function (allImg) {
|
|
21529
21543
|
if (this.parent.insertImageSettings.width !== 'auto') {
|
|
21530
21544
|
allImg.setAttribute('width', this.parent.insertImageSettings.width);
|
|
@@ -29781,7 +29795,13 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29781
29795
|
if (_this.resizeBtnStat.column) {
|
|
29782
29796
|
var width = parseFloat(_this.columnEle.offsetWidth.toString());
|
|
29783
29797
|
var cellRow = _this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
|
|
29784
|
-
var currentTableWidth =
|
|
29798
|
+
var currentTableWidth = void 0;
|
|
29799
|
+
if (_this.curTable.style.width != '') {
|
|
29800
|
+
currentTableWidth = parseFloat(_this.curTable.style.width.split('%')[0]);
|
|
29801
|
+
}
|
|
29802
|
+
else {
|
|
29803
|
+
currentTableWidth = _this.getCurrentTableWidth(_this.curTable.offsetWidth, _this.parent.inputElement.offsetWidth);
|
|
29804
|
+
}
|
|
29785
29805
|
var currentColumnCellWidth = parseFloat(_this.curTable.rows[cellRow].cells[_this.colIndex >= _this.curTable.rows[cellRow].cells.length ? _this.curTable.rows[cellRow].cells.length - 1 : _this.colIndex].style.width.split('%')[0]);
|
|
29786
29806
|
if (_this.currentColumnResize === 'first') {
|
|
29787
29807
|
mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
|
|
@@ -29936,6 +29956,11 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29936
29956
|
}
|
|
29937
29957
|
});
|
|
29938
29958
|
};
|
|
29959
|
+
Table.prototype.getCurrentTableWidth = function (tableWidth, parentWidth) {
|
|
29960
|
+
var currentTableWidth = 0;
|
|
29961
|
+
currentTableWidth = tableWidth / parentWidth * 100;
|
|
29962
|
+
return currentTableWidth;
|
|
29963
|
+
};
|
|
29939
29964
|
Table.prototype.findFirstLastColCells = function (table, isFirst) {
|
|
29940
29965
|
var resultColumns = [];
|
|
29941
29966
|
var rows = table.querySelectorAll('tr');
|