@syncfusion/ej2-richtexteditor 21.2.8 → 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.8
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.6",
3
+ "_id": "@syncfusion/ej2-richtexteditor@21.2.9",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-jj82YucBL6CkkpfxTdzF6l5l20oIvLtIL+XfC21CGQ7EMAk5IWF1dj8Y0ciPX7rowpY9LmzR3pw7noivMaD0dw==",
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.6.tgz",
30
- "_shasum": "10c78eb2a8529e7180d8936d871accb4ea2ac2b9",
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": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
- "@syncfusion/ej2-base": "~21.2.3",
42
- "@syncfusion/ej2-buttons": "~21.2.6",
41
+ "@syncfusion/ej2-base": "~21.2.9",
42
+ "@syncfusion/ej2-buttons": "~21.2.10",
43
43
  "@syncfusion/ej2-filemanager": "~21.2.5",
44
- "@syncfusion/ej2-inputs": "~21.2.8",
45
- "@syncfusion/ej2-navigations": "~21.2.8",
46
- "@syncfusion/ej2-popups": "~21.2.4",
44
+ "@syncfusion/ej2-inputs": "~21.2.9",
45
+ "@syncfusion/ej2-navigations": "~21.2.9",
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.8",
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({
@@ -116,9 +116,10 @@ var HtmlEditor = /** @class */ (function () {
116
116
  range.startContainer.nodeName === '#text' ? range.startContainer.parentElement !== this.parent.inputElement ? range.startContainer.parentElement.classList.add('currentStartMark')
117
117
  : isRootParent = true : range.startContainer.classList.add('currentStartMark');
118
118
  if (range.startContainer.textContent.charCodeAt(0) === 8203) {
119
- pointer = range.startOffset === 0 ? range.startOffset :
120
- range.startContainer.textContent.replace(regEx, '').trim().length !== 0 ? range.startOffset - 1 : 0;
119
+ var previousLength_1 = range.startContainer.textContent.length;
120
+ var previousRange = range.startOffset;
121
121
  range.startContainer.textContent = range.startContainer.textContent.replace(regEx, '');
122
+ pointer = previousRange === 0 ? previousRange : previousRange - (previousLength_1 - range.startContainer.textContent.length);
122
123
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), range.startContainer, pointer);
123
124
  }
124
125
  var previousLength = this.parent.inputElement.innerHTML.length;
@@ -138,7 +139,10 @@ var HtmlEditor = /** @class */ (function () {
138
139
  i--;
139
140
  }
140
141
  if (focusNode.textContent.replace(regEx, '') === currentChildNode[i].textContent) {
141
- pointer = focusNode.textContent.length > 1 ? focusNode.textContent.length - 1 : focusNode.textContent.length;
142
+ pointer = focusNode.textContent.length > 1 ?
143
+ (focusNode.textContent === currentChildNode[i].textContent ? pointer :
144
+ pointer - (focusNode.textContent.length - focusNode.textContent.replace(regEx, '').length)) :
145
+ focusNode.textContent.length;
142
146
  focusNode = currentChildNode[i];
143
147
  }
144
148
  }
@@ -329,9 +333,14 @@ var HtmlEditor = /** @class */ (function () {
329
333
  ? this.oldRangeElement.lastElementChild.lastElementChild :
330
334
  this.oldRangeElement.lastElementChild;
331
335
  }
336
+ var lastNode = this.oldRangeElement.lastChild;
337
+ while (lastNode.nodeType !== 3 && lastNode.nodeName !== '#text' &&
338
+ lastNode.nodeName !== 'BR') {
339
+ lastNode = lastNode.lastChild;
340
+ }
332
341
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
333
342
  // eslint-disable-next-line
334
- this.oldRangeElement, this.oldRangeElement.childNodes.length);
343
+ lastNode, lastNode.textContent.length);
335
344
  if (this.oldRangeElement.querySelectorAll('BR').length === 1) {
336
345
  detach(this.oldRangeElement.querySelector('BR'));
337
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.
@@ -1823,11 +1823,6 @@
1823
1823
  .e-richtexteditor .e-toolbar .e-toolbar-item .e-tbar-btn.e-btn {
1824
1824
  line-height: 20px;
1825
1825
  }
1826
-
1827
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn,
1828
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control {
1829
- padding: 0;
1830
- }
1831
1826
  }
1832
1827
 
1833
1828
  @if $skin-name == 'bootstrap5' {
@@ -2323,11 +2323,6 @@
2323
2323
  line-height: 20px;
2324
2324
  }
2325
2325
 
2326
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn,
2327
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control {
2328
- padding: 0;
2329
- }
2330
-
2331
2326
  .e-richtexteditor .e-rte-table-popup.e-popup-open.e-dialog .e-rte-tablecell {
2332
2327
  margin: 1px;
2333
2328
  }
@@ -2323,11 +2323,6 @@
2323
2323
  line-height: 20px;
2324
2324
  }
2325
2325
 
2326
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn,
2327
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control {
2328
- padding: 0;
2329
- }
2330
-
2331
2326
  .e-richtexteditor .e-rte-table-popup.e-popup-open.e-dialog .e-rte-tablecell {
2332
2327
  margin: 1px;
2333
2328
  }
@@ -2323,11 +2323,6 @@
2323
2323
  line-height: 20px;
2324
2324
  }
2325
2325
 
2326
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn,
2327
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control {
2328
- padding: 0;
2329
- }
2330
-
2331
2326
  .e-richtexteditor .e-rte-table-popup.e-popup-open.e-dialog .e-rte-tablecell {
2332
2327
  margin: 1px;
2333
2328
  }
@@ -2323,11 +2323,6 @@
2323
2323
  line-height: 20px;
2324
2324
  }
2325
2325
 
2326
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn,
2327
- .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control {
2328
- padding: 0;
2329
- }
2330
-
2331
2326
  .e-richtexteditor .e-rte-table-popup.e-popup-open.e-dialog .e-rte-tablecell {
2332
2327
  margin: 1px;
2333
2328
  }