@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.
- package/CHANGELOG.md +12 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +35 -11
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +35 -11
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/editor-manager/plugin/ms-word-clean-up.js +26 -7
- package/src/rich-text-editor/actions/base-quick-toolbar.js +3 -3
- package/src/rich-text-editor/actions/html-editor.js +6 -1
- package/src/rich-text-editor/base/interface.d.ts +4 -0
|
@@ -5849,7 +5849,7 @@ class BaseQuickToolbar {
|
|
|
5849
5849
|
* @deprecated
|
|
5850
5850
|
*/
|
|
5851
5851
|
showPopup(x, y, target) {
|
|
5852
|
-
const eventArgs = { popup: this.popupObj, cancel: false, targetElement: target };
|
|
5852
|
+
const eventArgs = { popup: this.popupObj, cancel: false, targetElement: target, positionX: x, positionY: y };
|
|
5853
5853
|
this.parent.trigger(beforeQuickToolbarOpen, eventArgs, (beforeQuickToolbarArgs) => {
|
|
5854
5854
|
if (!beforeQuickToolbarArgs.cancel) {
|
|
5855
5855
|
let editPanelTop;
|
|
@@ -5889,8 +5889,8 @@ class BaseQuickToolbar {
|
|
|
5889
5889
|
});
|
|
5890
5890
|
this.tooltip.appendTo(this.element);
|
|
5891
5891
|
}
|
|
5892
|
-
this.popupObj.position.X =
|
|
5893
|
-
this.popupObj.position.Y =
|
|
5892
|
+
this.popupObj.position.X = beforeQuickToolbarArgs.positionX + 20;
|
|
5893
|
+
this.popupObj.position.Y = beforeQuickToolbarArgs.positionY + 20;
|
|
5894
5894
|
this.popupObj.dataBind();
|
|
5895
5895
|
this.popupObj.element.classList.add('e-popup-open');
|
|
5896
5896
|
this.dropDownButtons.renderDropDowns({
|
|
@@ -17143,7 +17143,7 @@ class MsWordPaste {
|
|
|
17143
17143
|
imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 &&
|
|
17144
17144
|
imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
|
|
17145
17145
|
imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
|
|
17146
|
-
imgElem[i].getAttribute('v:shapes').indexOf('
|
|
17146
|
+
imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
|
|
17147
17147
|
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0) {
|
|
17148
17148
|
detach(imgElem[i]);
|
|
17149
17149
|
}
|
|
@@ -17726,12 +17726,31 @@ class MsWordPaste {
|
|
|
17726
17726
|
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
17727
17727
|
}
|
|
17728
17728
|
else {
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
|
|
17733
|
-
|
|
17734
|
-
|
|
17729
|
+
if (collection[index].nestedLevel > pLevel && isNormalList) {
|
|
17730
|
+
let initialNode;
|
|
17731
|
+
initialNode = createElement(collection[index].listType);
|
|
17732
|
+
prevList = createElement('li');
|
|
17733
|
+
initialNode.appendChild(prevList);
|
|
17734
|
+
initialNode.style.listStyleType = 'none';
|
|
17735
|
+
for (let j = 0; j < collection[index].nestedLevel - 1; j++) {
|
|
17736
|
+
prevList.appendChild(temp = createElement(collection[index].listType));
|
|
17737
|
+
prevList = createElement('li');
|
|
17738
|
+
temp.appendChild(prevList);
|
|
17739
|
+
temp.style.listStyleType = 'none';
|
|
17740
|
+
}
|
|
17741
|
+
prevList.appendChild(pElement);
|
|
17742
|
+
root.appendChild(initialNode);
|
|
17743
|
+
temp.setAttribute('level', collection[index].nestedLevel.toString());
|
|
17744
|
+
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
17745
|
+
}
|
|
17746
|
+
else {
|
|
17747
|
+
root.appendChild(temp = createElement(collection[index].listType));
|
|
17748
|
+
prevList = createElement('li');
|
|
17749
|
+
prevList.appendChild(pElement);
|
|
17750
|
+
temp.appendChild(prevList);
|
|
17751
|
+
temp.setAttribute('level', collection[index].nestedLevel.toString());
|
|
17752
|
+
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
17753
|
+
}
|
|
17735
17754
|
}
|
|
17736
17755
|
}
|
|
17737
17756
|
else if (collection[index].nestedLevel === 1) {
|
|
@@ -19693,9 +19712,14 @@ class HtmlEditor {
|
|
|
19693
19712
|
? this.oldRangeElement.lastElementChild.lastElementChild :
|
|
19694
19713
|
this.oldRangeElement.lastElementChild;
|
|
19695
19714
|
}
|
|
19715
|
+
let lastNode = this.oldRangeElement.lastChild;
|
|
19716
|
+
while (lastNode.nodeType !== 3 && lastNode.nodeName !== '#text' &&
|
|
19717
|
+
lastNode.nodeName !== 'BR') {
|
|
19718
|
+
lastNode = lastNode.lastChild;
|
|
19719
|
+
}
|
|
19696
19720
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
19697
19721
|
// eslint-disable-next-line
|
|
19698
|
-
|
|
19722
|
+
lastNode, lastNode.textContent.length);
|
|
19699
19723
|
if (this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
19700
19724
|
detach(this.oldRangeElement.querySelector('BR'));
|
|
19701
19725
|
}
|