@syncfusion/ej2-richtexteditor 22.1.36 → 22.1.38
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 +26 -25
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +26 -25
- 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/inserthtml.js +2 -1
- package/src/rich-text-editor/renderer/table-module.js +24 -24
|
@@ -13450,7 +13450,8 @@ class InsertHtml {
|
|
|
13450
13450
|
static findDetachEmptyElem(element) {
|
|
13451
13451
|
let removableElement;
|
|
13452
13452
|
if (!isNullOrUndefined(element.parentElement)) {
|
|
13453
|
-
if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true'
|
|
13453
|
+
if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true' &&
|
|
13454
|
+
isNullOrUndefined(element.parentElement.querySelector('img'))) {
|
|
13454
13455
|
removableElement = this.findDetachEmptyElem(element.parentElement);
|
|
13455
13456
|
}
|
|
13456
13457
|
else {
|
|
@@ -29674,7 +29675,6 @@ class Table {
|
|
|
29674
29675
|
const differenceWidth = currentTableWidth - this.convertPixelToPercentage(tableWidth + mouseX, widthCompare);
|
|
29675
29676
|
for (let i = 0; i < lastColumnsCell.length; i++) {
|
|
29676
29677
|
if (this.curTable.rows[i].cells[this.colIndex]) {
|
|
29677
|
-
// eslint-disable-next-line
|
|
29678
29678
|
this.curTable.rows[i].cells[this.curTable.rows[i].cells.length === this.colIndex ?
|
|
29679
29679
|
this.colIndex - 1 : this.colIndex].style.width = (currentColumnCellWidth - differenceWidth) + '%';
|
|
29680
29680
|
}
|
|
@@ -29687,32 +29687,34 @@ class Table {
|
|
|
29687
29687
|
const totalwid = parseFloat(this.columnEle.offsetWidth.toString()) +
|
|
29688
29688
|
parseFloat(cellColl[this.colIndex - 1].offsetWidth.toString());
|
|
29689
29689
|
for (let i = 0; i < this.curTable.rows.length; i++) {
|
|
29690
|
-
|
|
29690
|
+
const currentRow = this.curTable.rows[i];
|
|
29691
|
+
if ((totalwid - actualwid) > 20 && actualwid > 20) {
|
|
29691
29692
|
const leftColumnWidth = totalwid - actualwid;
|
|
29692
29693
|
const rightColWidth = actualwid;
|
|
29693
29694
|
let index;
|
|
29694
29695
|
let isMergedEleResize = false;
|
|
29695
29696
|
let leftTableCell;
|
|
29696
29697
|
let rightTableCell;
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
if (this.curTable.rows[i].cells[j].hasAttribute('rowspan') && j <= this.colIndex) {
|
|
29698
|
+
for (let j = 0; j < currentRow.cells.length; j++) {
|
|
29699
|
+
if (currentRow.cells[j].hasAttribute('rowspan') && j <= this.colIndex) {
|
|
29700
29700
|
isRowCellsMerged = true;
|
|
29701
29701
|
mergedCellIndex = i;
|
|
29702
|
-
mergedElement =
|
|
29702
|
+
mergedElement = currentRow.cells[j];
|
|
29703
29703
|
}
|
|
29704
29704
|
}
|
|
29705
|
-
if (
|
|
29706
|
-
index = parseInt(
|
|
29705
|
+
if (!isNullOrUndefined(currentRow.cells[i]) && currentRow.cells[i].hasAttribute('colspan')) {
|
|
29706
|
+
index = parseInt(currentRow.cells[i].getAttribute('colspan'), 10) - 1;
|
|
29707
29707
|
}
|
|
29708
29708
|
else {
|
|
29709
29709
|
index = this.colIndex;
|
|
29710
29710
|
}
|
|
29711
29711
|
if (isRowCellsMerged) {
|
|
29712
29712
|
let currentResizeRow;
|
|
29713
|
-
if (
|
|
29714
|
-
index =
|
|
29715
|
-
|
|
29713
|
+
if (currentRow.cells.length < cellColl.length) {
|
|
29714
|
+
index = currentRow.cells.length === this.colIndex ?
|
|
29715
|
+
this.colIndex - 1 : this.colIndex - (this.colIndex - 1);
|
|
29716
|
+
currentResizeRow = this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ?
|
|
29717
|
+
mergedCellIndex : this.colIndex - 1];
|
|
29716
29718
|
if (currentResizeRow && (currentResizeRow.cells[this.colIndex - 1] === mergedElement ||
|
|
29717
29719
|
currentResizeRow.cells[currentResizeRow.cells.length - 1] === mergedElement)) {
|
|
29718
29720
|
isMergedEleResize = true;
|
|
@@ -29724,15 +29726,15 @@ class Table {
|
|
|
29724
29726
|
else {
|
|
29725
29727
|
index = this.colIndex;
|
|
29726
29728
|
}
|
|
29727
|
-
leftTableCell = !isMergedEleResize ?
|
|
29728
|
-
currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
|
|
29729
|
-
|
|
29730
|
-
rightTableCell = !isMergedEleResize ?
|
|
29731
|
-
rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
|
|
29732
|
-
currentResizeRow.cells[currentResizeRow.cells.length - 1];
|
|
29729
|
+
leftTableCell = !isMergedEleResize ? currentRow.cells[index - 1] : (currentResizeRow &&
|
|
29730
|
+
currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
|
|
29731
|
+
currentResizeRow.cells[this.colIndex - 1] : currentRow.cells[currentRow.cells.length - 1];
|
|
29732
|
+
rightTableCell = !isMergedEleResize ? currentRow.cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
|
|
29733
|
+
rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
|
|
29734
|
+
currentRow.cells[index - 1] : currentResizeRow.cells[currentResizeRow.cells.length - 1];
|
|
29733
29735
|
}
|
|
29734
|
-
if (!isNullOrUndefined(
|
|
29735
|
-
|
|
29736
|
+
if (!isNullOrUndefined(currentRow.cells[index - 1]) && !isRowCellsMerged) {
|
|
29737
|
+
currentRow.cells[index - 1].style.width =
|
|
29736
29738
|
this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
29737
29739
|
}
|
|
29738
29740
|
else {
|
|
@@ -29741,8 +29743,8 @@ class Table {
|
|
|
29741
29743
|
this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
29742
29744
|
}
|
|
29743
29745
|
}
|
|
29744
|
-
if (!isNullOrUndefined(
|
|
29745
|
-
|
|
29746
|
+
if (!isNullOrUndefined(currentRow.cells[index]) && !isRowCellsMerged) {
|
|
29747
|
+
currentRow.cells[index].style.width =
|
|
29746
29748
|
this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
29747
29749
|
}
|
|
29748
29750
|
else {
|
|
@@ -29751,7 +29753,6 @@ class Table {
|
|
|
29751
29753
|
this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
29752
29754
|
}
|
|
29753
29755
|
}
|
|
29754
|
-
/* eslint-enable */
|
|
29755
29756
|
}
|
|
29756
29757
|
}
|
|
29757
29758
|
}
|
|
@@ -29775,8 +29776,8 @@ class Table {
|
|
|
29775
29776
|
EventHandler.remove(this.contentModule.getEditPanel(), 'mouseover', this.resizeHelper);
|
|
29776
29777
|
}
|
|
29777
29778
|
if (currentTdElement) {
|
|
29778
|
-
|
|
29779
|
-
|
|
29779
|
+
const tableBoxPosition = this.curTable.getBoundingClientRect().left
|
|
29780
|
+
- currentTdElement.getBoundingClientRect().left;
|
|
29780
29781
|
maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
|
|
29781
29782
|
this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
29782
29783
|
}
|