@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.1.39
3
+ * version : 22.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-richtexteditor@*",
3
- "_id": "@syncfusion/ej2-richtexteditor@22.1.38",
3
+ "_id": "@syncfusion/ej2-richtexteditor@22.1.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-SC/GGGT4gXUzcbDC1YLWkiUw959cRVtjpJQ74HjAOeHgNurdJ0T3anhrfoxEh1U289KbzZUS677qjfarHRpFCw==",
5
+ "_integrity": "sha512-rXoGpW5rmScnLivQvOj0NVRxnyS7AvBU7X+rsnQmHCoxsHccYlEXHhkuzRHsceOy1EpzC057WHpKsag/pexSxA==",
6
6
  "_location": "/@syncfusion/ej2-richtexteditor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -26,8 +26,8 @@
26
26
  "/@syncfusion/ej2-react-richtexteditor",
27
27
  "/@syncfusion/ej2-vue-richtexteditor"
28
28
  ],
29
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-22.1.38.tgz",
30
- "_shasum": "cad65b6adb603371c57bdc7d8978cf377bffd0b5",
29
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-22.1.39.tgz",
30
+ "_shasum": "6031975c613a27eca2aa791a7a6dc82136daa6ad",
31
31
  "_spec": "@syncfusion/ej2-richtexteditor@*",
32
32
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
33
33
  "author": {
@@ -38,13 +38,13 @@
38
38
  },
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
- "@syncfusion/ej2-base": "~22.1.38",
42
- "@syncfusion/ej2-buttons": "~22.1.39",
43
- "@syncfusion/ej2-filemanager": "~22.1.39",
44
- "@syncfusion/ej2-inputs": "~22.1.39",
45
- "@syncfusion/ej2-navigations": "~22.1.39",
46
- "@syncfusion/ej2-popups": "~22.1.38",
47
- "@syncfusion/ej2-splitbuttons": "~22.1.37"
41
+ "@syncfusion/ej2-base": "~22.2.5",
42
+ "@syncfusion/ej2-buttons": "~22.2.5",
43
+ "@syncfusion/ej2-filemanager": "~22.2.5",
44
+ "@syncfusion/ej2-inputs": "~22.2.5",
45
+ "@syncfusion/ej2-navigations": "~22.2.5",
46
+ "@syncfusion/ej2-popups": "~22.2.5",
47
+ "@syncfusion/ej2-splitbuttons": "~22.2.5"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Essential JS 2 RichTextEditor component",
@@ -70,6 +70,6 @@
70
70
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
71
71
  },
72
72
  "typings": "index.d.ts",
73
- "version": "22.1.39",
73
+ "version": "22.2.5",
74
74
  "sideEffects": false
75
75
  }
@@ -837,6 +837,10 @@ var MsWordPaste = /** @class */ (function () {
837
837
  else {
838
838
  //Add to support separate list which looks like same list and also to add all tags as it is inside list
839
839
  if (firstChild.childNodes.length > 0) {
840
+ var listIgnoreTag = firstChild.querySelectorAll('[style*="mso-list"]');
841
+ for (var i = 0; i < listIgnoreTag.length; i++) {
842
+ listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g, ""));
843
+ }
840
844
  var listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
841
845
  if (!isNOU(listOrder)) {
842
846
  this.listContents.push(listOrder.textContent.trim());
@@ -56,6 +56,7 @@ export declare class PasteCleanup {
56
56
  private destroyDialog;
57
57
  private cleanAppleClass;
58
58
  private formatting;
59
+ private addTableClass;
59
60
  private setImageProperties;
60
61
  private addTempClass;
61
62
  private removeTempClass;
@@ -693,6 +693,7 @@ var PasteCleanup = /** @class */ (function () {
693
693
  }
694
694
  this.parent.trigger(events.afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, function (updatedArgs) { value = updatedArgs.value; });
695
695
  clipBoardElem.innerHTML = value;
696
+ clipBoardElem = this.addTableClass(clipBoardElem);
696
697
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
697
698
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
698
699
  _this.parent.formatter.onSuccess(_this.parent, args);
@@ -705,6 +706,15 @@ var PasteCleanup = /** @class */ (function () {
705
706
  }
706
707
  }
707
708
  };
709
+ PasteCleanup.prototype.addTableClass = function (element) {
710
+ var tableElement = element.querySelectorAll('table');
711
+ for (var i = 0; i < tableElement.length; i++) {
712
+ if (!tableElement[i].classList.contains('e-rte-table')) {
713
+ tableElement[i].classList.add('e-rte-table');
714
+ }
715
+ }
716
+ return element;
717
+ };
708
718
  PasteCleanup.prototype.setImageProperties = function (allImg) {
709
719
  if (this.parent.insertImageSettings.width !== 'auto') {
710
720
  allImg.setAttribute('width', this.parent.insertImageSettings.width);
@@ -813,9 +813,9 @@ export interface BeforeQuickToolbarOpenArgs {
813
813
  */
814
814
  popup?: Popup;
815
815
  /** Determine whether the quick toolbar is open */
816
- cancel: boolean;
816
+ cancel?: boolean;
817
817
  /** Defines the target element of the quick toolbar */
818
- targetElement: Element;
818
+ targetElement?: Element;
819
819
  /** Defines the X position of the quick toolbar */
820
820
  positionX?: number;
821
821
  /** Defines the Y position of the quick toolbar */
@@ -79,6 +79,7 @@ export declare class Table {
79
79
  private updateHelper;
80
80
  private calMaxCol;
81
81
  private resizing;
82
+ private getCurrentTableWidth;
82
83
  private findFirstLastColCells;
83
84
  private convertPixelToPercentage;
84
85
  private cancelResizeAction;
@@ -881,7 +881,13 @@ var Table = /** @class */ (function () {
881
881
  if (_this.resizeBtnStat.column) {
882
882
  var width = parseFloat(_this.columnEle.offsetWidth.toString());
883
883
  var cellRow = _this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
884
- var currentTableWidth = parseFloat(_this.curTable.style.width.split('%')[0]);
884
+ var currentTableWidth = void 0;
885
+ if (_this.curTable.style.width != '') {
886
+ currentTableWidth = parseFloat(_this.curTable.style.width.split('%')[0]);
887
+ }
888
+ else {
889
+ currentTableWidth = _this.getCurrentTableWidth(_this.curTable.offsetWidth, _this.parent.inputElement.offsetWidth);
890
+ }
885
891
  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]);
886
892
  if (_this.currentColumnResize === 'first') {
887
893
  mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
@@ -1036,6 +1042,11 @@ var Table = /** @class */ (function () {
1036
1042
  }
1037
1043
  });
1038
1044
  };
1045
+ Table.prototype.getCurrentTableWidth = function (tableWidth, parentWidth) {
1046
+ var currentTableWidth = 0;
1047
+ currentTableWidth = tableWidth / parentWidth * 100;
1048
+ return currentTableWidth;
1049
+ };
1039
1050
  Table.prototype.findFirstLastColCells = function (table, isFirst) {
1040
1051
  var resultColumns = [];
1041
1052
  var rows = table.querySelectorAll('tr');