@syncfusion/ej2-richtexteditor 21.2.9 → 21.2.10

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 : 21.2.9
3
+ * version : 21.2.10
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@21.2.8",
3
+ "_id": "@syncfusion/ej2-richtexteditor@21.2.9",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-cazKbsnaxRdlhQ9G4mlnopvvIf0ulmy9k/egU3jv/o4edVJWo081dCO9YmxdtzFvspdrzYgWYbzt5OjwQs86Yg==",
5
+ "_integrity": "sha512-ISaeZrVvp/ekmd+F2kcZWR/vVih9rcyg7p1tFl6Cf+AAiESStZ6jlkxWmPbb/wnZr65rdjbbkQoND0vjejQtow==",
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-21.2.8.tgz",
30
- "_shasum": "a7934359b2b25b6b695838d5de5cdaeee1a722b1",
29
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-21.2.9.tgz",
30
+ "_shasum": "836aa3ae47ee1d0a5d0cd6657c5432fdef49dedd",
31
31
  "_spec": "@syncfusion/ej2-richtexteditor@*",
32
32
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
33
33
  "author": {
@@ -39,11 +39,11 @@
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
41
  "@syncfusion/ej2-base": "~21.2.9",
42
- "@syncfusion/ej2-buttons": "~21.2.6",
42
+ "@syncfusion/ej2-buttons": "~21.2.10",
43
43
  "@syncfusion/ej2-filemanager": "~21.2.5",
44
44
  "@syncfusion/ej2-inputs": "~21.2.9",
45
45
  "@syncfusion/ej2-navigations": "~21.2.9",
46
- "@syncfusion/ej2-popups": "~21.2.4",
46
+ "@syncfusion/ej2-popups": "~21.2.10",
47
47
  "@syncfusion/ej2-splitbuttons": "~21.2.5"
48
48
  },
49
49
  "deprecated": false,
@@ -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": "21.2.9",
73
+ "version": "21.2.10",
74
74
  "sideEffects": false
75
75
  }
@@ -131,7 +131,7 @@ var MsWordPaste = /** @class */ (function () {
131
131
  imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 &&
132
132
  imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
133
133
  imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
134
- imgElem[i].getAttribute('v:shapes').indexOf('Image') < 0 &&
134
+ imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
135
135
  imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0) {
136
136
  detach(imgElem[i]);
137
137
  }
@@ -714,12 +714,31 @@ var MsWordPaste = /** @class */ (function () {
714
714
  temp.style.listStyleType = collection[index].listStyleTypeName;
715
715
  }
716
716
  else {
717
- root.appendChild(temp = createElement(collection[index].listType));
718
- prevList = createElement('li');
719
- prevList.appendChild(pElement);
720
- temp.appendChild(prevList);
721
- temp.setAttribute('level', collection[index].nestedLevel.toString());
722
- temp.style.listStyleType = collection[index].listStyleTypeName;
717
+ if (collection[index].nestedLevel > pLevel && isNormalList) {
718
+ var initialNode = void 0;
719
+ initialNode = createElement(collection[index].listType);
720
+ prevList = createElement('li');
721
+ initialNode.appendChild(prevList);
722
+ initialNode.style.listStyleType = 'none';
723
+ for (var j = 0; j < collection[index].nestedLevel - 1; j++) {
724
+ prevList.appendChild(temp = createElement(collection[index].listType));
725
+ prevList = createElement('li');
726
+ temp.appendChild(prevList);
727
+ temp.style.listStyleType = 'none';
728
+ }
729
+ prevList.appendChild(pElement);
730
+ root.appendChild(initialNode);
731
+ temp.setAttribute('level', collection[index].nestedLevel.toString());
732
+ temp.style.listStyleType = collection[index].listStyleTypeName;
733
+ }
734
+ else {
735
+ root.appendChild(temp = createElement(collection[index].listType));
736
+ prevList = createElement('li');
737
+ prevList.appendChild(pElement);
738
+ temp.appendChild(prevList);
739
+ temp.setAttribute('level', collection[index].nestedLevel.toString());
740
+ temp.style.listStyleType = collection[index].listStyleTypeName;
741
+ }
723
742
  }
724
743
  }
725
744
  else if (collection[index].nestedLevel === 1) {
@@ -183,7 +183,7 @@ var BaseQuickToolbar = /** @class */ (function () {
183
183
  */
184
184
  BaseQuickToolbar.prototype.showPopup = function (x, y, target) {
185
185
  var _this = this;
186
- var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target };
186
+ var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target, positionX: x, positionY: y };
187
187
  this.parent.trigger(events.beforeQuickToolbarOpen, eventArgs, function (beforeQuickToolbarArgs) {
188
188
  if (!beforeQuickToolbarArgs.cancel) {
189
189
  var editPanelTop = void 0;
@@ -223,8 +223,8 @@ var BaseQuickToolbar = /** @class */ (function () {
223
223
  });
224
224
  _this.tooltip.appendTo(_this.element);
225
225
  }
226
- _this.popupObj.position.X = x + 20;
227
- _this.popupObj.position.Y = y + 20;
226
+ _this.popupObj.position.X = beforeQuickToolbarArgs.positionX + 20;
227
+ _this.popupObj.position.Y = beforeQuickToolbarArgs.positionY + 20;
228
228
  _this.popupObj.dataBind();
229
229
  _this.popupObj.element.classList.add('e-popup-open');
230
230
  _this.dropDownButtons.renderDropDowns({
@@ -333,9 +333,14 @@ var HtmlEditor = /** @class */ (function () {
333
333
  ? this.oldRangeElement.lastElementChild.lastElementChild :
334
334
  this.oldRangeElement.lastElementChild;
335
335
  }
336
+ var lastNode = this.oldRangeElement.lastChild;
337
+ while (lastNode.nodeType !== 3 && lastNode.nodeName !== '#text' &&
338
+ lastNode.nodeName !== 'BR') {
339
+ lastNode = lastNode.lastChild;
340
+ }
336
341
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
337
342
  // eslint-disable-next-line
338
- this.oldRangeElement, this.oldRangeElement.childNodes.length);
343
+ lastNode, lastNode.textContent.length);
339
344
  if (this.oldRangeElement.querySelectorAll('BR').length === 1) {
340
345
  detach(this.oldRangeElement.querySelector('BR'));
341
346
  }
@@ -778,6 +778,10 @@ export interface BeforeQuickToolbarOpenArgs {
778
778
  cancel: boolean;
779
779
  /** Defines the target element of the quick toolbar */
780
780
  targetElement: Element;
781
+ /** Defines the X position of the quick toolbar */
782
+ positionX?: number;
783
+ /** Defines the Y position of the quick toolbar */
784
+ positionY?: number;
781
785
  }
782
786
  /**
783
787
  * Provides information about a AfterImageDeleteEvent event.