@syncfusion/ej2-richtexteditor 20.4.49 → 20.4.51

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 : 20.4.49
3
+ * version : 20.4.51
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
Binary file
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-richtexteditor@*",
3
- "_id": "@syncfusion/ej2-richtexteditor@20.4.48",
3
+ "_id": "@syncfusion/ej2-richtexteditor@20.4.50",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-H6KAc1JCJivUzVg/b6EJ7wbeb9ekQ4berFtJf4FBBH3N+rZfEDFLjIiPJDhBgqsEW2CwPvOHoj1TrFGykTs0yA==",
5
+ "_integrity": "sha512-LPuq6IPqkC12pQBS7yO8auxWYIQ/+nQ+25RasBCHu36kxTy9FIwfRVN0PuFazuHZvWyjyk3mc3+irXblRNPcVw==",
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-20.4.48.tgz",
30
- "_shasum": "640aa234816a05b9366d297fa130c09b643cf112",
29
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.4.50.tgz",
30
+ "_shasum": "12aa17cdad15da7c83e327c95a1ec072b301c991",
31
31
  "_spec": "@syncfusion/ej2-richtexteditor@*",
32
32
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
33
33
  "author": {
@@ -38,13 +38,13 @@
38
38
  },
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
- "@syncfusion/ej2-base": "~20.4.48",
42
- "@syncfusion/ej2-buttons": "~20.4.49",
43
- "@syncfusion/ej2-filemanager": "~20.4.48",
44
- "@syncfusion/ej2-inputs": "~20.4.48",
45
- "@syncfusion/ej2-navigations": "~20.4.49",
46
- "@syncfusion/ej2-popups": "~20.4.49",
47
- "@syncfusion/ej2-splitbuttons": "~20.4.48"
41
+ "@syncfusion/ej2-base": "~20.4.51",
42
+ "@syncfusion/ej2-buttons": "~20.4.50",
43
+ "@syncfusion/ej2-filemanager": "~20.4.51",
44
+ "@syncfusion/ej2-inputs": "~20.4.51",
45
+ "@syncfusion/ej2-navigations": "~20.4.51",
46
+ "@syncfusion/ej2-popups": "~20.4.51",
47
+ "@syncfusion/ej2-splitbuttons": "~20.4.50"
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": "20.4.49",
73
+ "version": "20.4.51",
74
74
  "sideEffects": false
75
75
  }
@@ -41,8 +41,8 @@ var InsertHtml = /** @class */ (function () {
41
41
  }
42
42
  if (range.startContainer.nodeName === 'BR' && range.startOffset === 0 && range.startOffset === range.endOffset &&
43
43
  range.startContainer === range.endContainer) {
44
- var currentIndex = Array.prototype.slice.call(range.startContainer.parentElement.children).indexOf(range.startContainer);
45
- nodeSelection.setSelectionText(docElement, range.startContainer.parentElement, range.startContainer.parentElement, currentIndex + 1, currentIndex + 1);
44
+ var currentIndex = Array.prototype.slice.call(range.startContainer.parentElement.childNodes).indexOf(range.startContainer);
45
+ nodeSelection.setSelectionText(docElement, range.startContainer.parentElement, range.startContainer.parentElement, currentIndex, currentIndex);
46
46
  range = nodeSelection.getRange(docElement);
47
47
  }
48
48
  var isCursor = range.startOffset === range.endOffset && range.startOffset === 0 &&
@@ -47,7 +47,7 @@ var EnterKeyAction = /** @class */ (function () {
47
47
  isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
48
48
  }
49
49
  if (e.args.which === 13 && e.args.code === 'Enter') {
50
- if (isNOU(this.startNode.closest('LI')) && isNOU(this.endNode.closest('LI')) && isTableEnter &&
50
+ if (isNOU(this.startNode.closest('LI,UL,OL')) && isNOU(this.endNode.closest('LI,UL,OL')) && isTableEnter &&
51
51
  isNOU(this.startNode.closest('PRE')) && isNOU(this.endNode.closest('PRE'))) {
52
52
  var shiftKey_1 = e.args.shiftKey;
53
53
  var actionBeginArgs = {
@@ -552,7 +552,7 @@ var PasteCleanup = /** @class */ (function () {
552
552
  this.radioRender();
553
553
  /* eslint-disable */
554
554
  if (this.parent.element.offsetHeight < parseInt(this.dialogObj.height.split('px')[0], null)) {
555
- this.parent.height = parseInt(this.dialogObj.height.split('px')[0], null) + 40;
555
+ this.parent.setProperties({ height: parseInt(this.dialogObj.height.split('px')[0], null) + 40 });
556
556
  /* eslint-enable */
557
557
  isHeight = true;
558
558
  }
@@ -16,7 +16,6 @@ export declare class XhtmlValidation {
16
16
 
17
17
  */
18
18
  selfEncloseValidation(currentValue: string, valueLength?: number): string;
19
- private AddRootElement;
20
19
  private clean;
21
20
  private ImageTags;
22
21
  private removeTags;
@@ -25,7 +25,6 @@ var XhtmlValidation = /** @class */ (function () {
25
25
  this.currentElement = this.parent.inputElement;
26
26
  }
27
27
  this.clean(this.currentElement);
28
- this.AddRootElement();
29
28
  this.ImageTags();
30
29
  this.removeTags();
31
30
  this.RemoveUnsupported();
@@ -72,16 +71,6 @@ var XhtmlValidation = /** @class */ (function () {
72
71
  }
73
72
  return currentValue;
74
73
  };
75
- XhtmlValidation.prototype.AddRootElement = function () {
76
- if ((this.currentElement.childNodes.length === 1 && this.currentElement.firstChild.nodeName !== 'DIV') ||
77
- this.currentElement.childNodes.length > 1) {
78
- var parentEle = this.parent.createElement('div');
79
- while (this.currentElement.childNodes.length > 0) {
80
- parentEle.appendChild(this.currentElement.childNodes[0]);
81
- }
82
- this.currentElement.appendChild(parentEle);
83
- }
84
- };
85
74
  XhtmlValidation.prototype.clean = function (node) {
86
75
  for (var n = 0; n < node.childNodes.length; n++) {
87
76
  var child = node.childNodes[n];
@@ -784,6 +784,7 @@ var RichTextEditor = /** @class */ (function (_super) {
784
784
  }
785
785
  else {
786
786
  value = this.htmlEditorModule.sanitizeHelper(value);
787
+ value = this.enableXhtml ? this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(value) : value;
787
788
  }
788
789
  }
789
790
  return value;
@@ -2064,8 +2065,8 @@ var RichTextEditor = /** @class */ (function (_super) {
2064
2065
  }
2065
2066
  var getTextArea = this.element.querySelector('.e-rte-srctextarea');
2066
2067
  if (this.editorMode === 'HTML') {
2067
- value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
2068
- this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
2068
+ value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>'
2069
+ || this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
2069
2070
  this.encode(decode(this.inputElement.innerHTML)) : this.inputElement.innerHTML;
2070
2071
  if (getTextArea && getTextArea.style.display === 'block') {
2071
2072
  value = getTextArea.value;
@@ -867,7 +867,7 @@ var Table = /** @class */ (function () {
867
867
  var width = parseFloat(_this.columnEle.offsetWidth.toString());
868
868
  var cellRow = _this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
869
869
  var currentTableWidth = parseFloat(_this.curTable.style.width.split('%')[0]);
870
- var currentColumnCellWidth = parseFloat(_this.curTable.rows[cellRow].cells[_this.colIndex].style.width.split('%')[0]);
870
+ 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]);
871
871
  if (_this.currentColumnResize === 'first') {
872
872
  mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
873
873
  _this.removeResizeElement();