@syncfusion/ej2-richtexteditor 22.1.38 → 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.
@@ -3404,7 +3404,9 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
3404
3404
  target: '#' + this.parent.getID() + '_toolbar_wrapper [title]',
3405
3405
  showTipPointer: true,
3406
3406
  openDelay: 400,
3407
- cssClass: this.parent.cssClass
3407
+ cssClass: this.parent.cssClass,
3408
+ windowCollision: true,
3409
+ position: 'BottomCenter'
3408
3410
  });
3409
3411
  this.tooltip.appendTo(args.target);
3410
3412
  }
@@ -6144,7 +6146,9 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
6144
6146
  _this.tooltip = new Tooltip({
6145
6147
  target: '#' + _this.element.id + ' [title]',
6146
6148
  openDelay: 400,
6147
- showTipPointer: true
6149
+ showTipPointer: true,
6150
+ windowCollision: true,
6151
+ position: 'BottomCenter'
6148
6152
  });
6149
6153
  _this.tooltip.appendTo(_this.element);
6150
6154
  }
@@ -17589,7 +17593,8 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
17589
17593
  imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
17590
17594
  imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
17591
17595
  imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
17592
- imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0) {
17596
+ imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
17597
+ imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0) {
17593
17598
  detach(imgElem[i]);
17594
17599
  }
17595
17600
  }
@@ -18264,6 +18269,10 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18264
18269
  else {
18265
18270
  //Add to support separate list which looks like same list and also to add all tags as it is inside list
18266
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
+ }
18267
18276
  var listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
18268
18277
  if (!isNullOrUndefined(listOrder)) {
18269
18278
  this.listContents.push(listOrder.textContent.trim());
@@ -21508,6 +21517,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
21508
21517
  }
21509
21518
  this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, function (updatedArgs) { value = updatedArgs.value; });
21510
21519
  clipBoardElem.innerHTML = value;
21520
+ clipBoardElem = this.addTableClass(clipBoardElem);
21511
21521
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
21512
21522
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
21513
21523
  _this.parent.formatter.onSuccess(_this.parent, args);
@@ -21520,6 +21530,15 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
21520
21530
  }
21521
21531
  }
21522
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
+ };
21523
21542
  PasteCleanup.prototype.setImageProperties = function (allImg) {
21524
21543
  if (this.parent.insertImageSettings.width !== 'auto') {
21525
21544
  allImg.setAttribute('width', this.parent.insertImageSettings.width);
@@ -23221,7 +23240,11 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
23221
23240
  return;
23222
23241
  }
23223
23242
  targetEle.focus();
23224
- if (!isNullOrUndefined(this.clickEvent)) {
23243
+ var startOffset = this.save.startOffset;
23244
+ var textContent = this.save.range.startContainer.textContent;
23245
+ var previousText = textContent.substring(startOffset, startOffset + 1);
23246
+ // When toolbar action is clicked then only restore the range.
23247
+ if (!isNullOrUndefined(this.clickEvent) || previousText !== ':') {
23225
23248
  this.save.restore();
23226
23249
  }
23227
23250
  if (this.popupObj) {
@@ -29772,7 +29795,13 @@ var Table = /** @__PURE__ @class */ (function () {
29772
29795
  if (_this.resizeBtnStat.column) {
29773
29796
  var width = parseFloat(_this.columnEle.offsetWidth.toString());
29774
29797
  var cellRow = _this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
29775
- var currentTableWidth = parseFloat(_this.curTable.style.width.split('%')[0]);
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
+ }
29776
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]);
29777
29806
  if (_this.currentColumnResize === 'first') {
29778
29807
  mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
@@ -29927,6 +29956,11 @@ var Table = /** @__PURE__ @class */ (function () {
29927
29956
  }
29928
29957
  });
29929
29958
  };
29959
+ Table.prototype.getCurrentTableWidth = function (tableWidth, parentWidth) {
29960
+ var currentTableWidth = 0;
29961
+ currentTableWidth = tableWidth / parentWidth * 100;
29962
+ return currentTableWidth;
29963
+ };
29930
29964
  Table.prototype.findFirstLastColCells = function (table, isFirst) {
29931
29965
  var resultColumns = [];
29932
29966
  var rows = table.querySelectorAll('tr');