@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.
@@ -18143,7 +18143,11 @@ class MsWordPaste {
18143
18143
  else {
18144
18144
  //Add to support separate list which looks like same list and also to add all tags as it is inside list
18145
18145
  if (firstChild.childNodes.length > 0) {
18146
- const listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
18146
+ let listIgnoreTag = firstChild.querySelectorAll('[style*="mso-list"]');
18147
+ for (let i = 0; i < listIgnoreTag.length; i++) {
18148
+ listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g, ""));
18149
+ }
18150
+ let listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
18147
18151
  if (!isNullOrUndefined(listOrder)) {
18148
18152
  this.listContents.push(listOrder.textContent.trim());
18149
18153
  detach(listOrder);
@@ -21430,6 +21434,7 @@ class PasteCleanup {
21430
21434
  }
21431
21435
  this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, (updatedArgs) => { value = updatedArgs.value; });
21432
21436
  clipBoardElem.innerHTML = value;
21437
+ clipBoardElem = this.addTableClass(clipBoardElem);
21433
21438
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
21434
21439
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
21435
21440
  this.parent.formatter.onSuccess(this.parent, args);
@@ -21442,6 +21447,15 @@ class PasteCleanup {
21442
21447
  }
21443
21448
  }
21444
21449
  }
21450
+ addTableClass(element) {
21451
+ const tableElement = element.querySelectorAll('table');
21452
+ for (let i = 0; i < tableElement.length; i++) {
21453
+ if (!tableElement[i].classList.contains('e-rte-table')) {
21454
+ tableElement[i].classList.add('e-rte-table');
21455
+ }
21456
+ }
21457
+ return element;
21458
+ }
21445
21459
  setImageProperties(allImg) {
21446
21460
  if (this.parent.insertImageSettings.width !== 'auto') {
21447
21461
  allImg.setAttribute('width', this.parent.insertImageSettings.width);
@@ -29646,7 +29660,13 @@ class Table {
29646
29660
  if (this.resizeBtnStat.column) {
29647
29661
  const width = parseFloat(this.columnEle.offsetWidth.toString());
29648
29662
  const cellRow = this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
29649
- const currentTableWidth = parseFloat(this.curTable.style.width.split('%')[0]);
29663
+ let currentTableWidth;
29664
+ if (this.curTable.style.width != '') {
29665
+ currentTableWidth = parseFloat(this.curTable.style.width.split('%')[0]);
29666
+ }
29667
+ else {
29668
+ currentTableWidth = this.getCurrentTableWidth(this.curTable.offsetWidth, this.parent.inputElement.offsetWidth);
29669
+ }
29650
29670
  const 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]);
29651
29671
  if (this.currentColumnResize === 'first') {
29652
29672
  mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
@@ -29801,6 +29821,11 @@ class Table {
29801
29821
  }
29802
29822
  });
29803
29823
  }
29824
+ getCurrentTableWidth(tableWidth, parentWidth) {
29825
+ let currentTableWidth = 0;
29826
+ currentTableWidth = tableWidth / parentWidth * 100;
29827
+ return currentTableWidth;
29828
+ }
29804
29829
  findFirstLastColCells(table, isFirst) {
29805
29830
  const resultColumns = [];
29806
29831
  const rows = table.querySelectorAll('tr');