@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.
- package/CHANGELOG.md +20 -2
- 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 +42 -14
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +42 -14
- 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 +10 -10
- 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 +13 -4
- package/src/rich-text-editor/base/interface.d.ts +4 -0
- package/styles/rich-text-editor/_layout.scss +0 -5
- package/styles/rich-text-editor/tailwind-dark.css +0 -5
- package/styles/rich-text-editor/tailwind.css +0 -5
- package/styles/tailwind-dark.css +0 -5
- package/styles/tailwind.css +0 -5
|
@@ -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) {
|
|
@@ -19477,9 +19496,10 @@ class HtmlEditor {
|
|
|
19477
19496
|
range.startContainer.nodeName === '#text' ? range.startContainer.parentElement !== this.parent.inputElement ? range.startContainer.parentElement.classList.add('currentStartMark')
|
|
19478
19497
|
: isRootParent = true : range.startContainer.classList.add('currentStartMark');
|
|
19479
19498
|
if (range.startContainer.textContent.charCodeAt(0) === 8203) {
|
|
19480
|
-
|
|
19481
|
-
|
|
19499
|
+
const previousLength = range.startContainer.textContent.length;
|
|
19500
|
+
const previousRange = range.startOffset;
|
|
19482
19501
|
range.startContainer.textContent = range.startContainer.textContent.replace(regEx, '');
|
|
19502
|
+
pointer = previousRange === 0 ? previousRange : previousRange - (previousLength - range.startContainer.textContent.length);
|
|
19483
19503
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), range.startContainer, pointer);
|
|
19484
19504
|
}
|
|
19485
19505
|
const previousLength = this.parent.inputElement.innerHTML.length;
|
|
@@ -19499,7 +19519,10 @@ class HtmlEditor {
|
|
|
19499
19519
|
i--;
|
|
19500
19520
|
}
|
|
19501
19521
|
if (focusNode.textContent.replace(regEx, '') === currentChildNode[i].textContent) {
|
|
19502
|
-
pointer = focusNode.textContent.length > 1 ?
|
|
19522
|
+
pointer = focusNode.textContent.length > 1 ?
|
|
19523
|
+
(focusNode.textContent === currentChildNode[i].textContent ? pointer :
|
|
19524
|
+
pointer - (focusNode.textContent.length - focusNode.textContent.replace(regEx, '').length)) :
|
|
19525
|
+
focusNode.textContent.length;
|
|
19503
19526
|
focusNode = currentChildNode[i];
|
|
19504
19527
|
}
|
|
19505
19528
|
}
|
|
@@ -19689,9 +19712,14 @@ class HtmlEditor {
|
|
|
19689
19712
|
? this.oldRangeElement.lastElementChild.lastElementChild :
|
|
19690
19713
|
this.oldRangeElement.lastElementChild;
|
|
19691
19714
|
}
|
|
19715
|
+
let lastNode = this.oldRangeElement.lastChild;
|
|
19716
|
+
while (lastNode.nodeType !== 3 && lastNode.nodeName !== '#text' &&
|
|
19717
|
+
lastNode.nodeName !== 'BR') {
|
|
19718
|
+
lastNode = lastNode.lastChild;
|
|
19719
|
+
}
|
|
19692
19720
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
19693
19721
|
// eslint-disable-next-line
|
|
19694
|
-
|
|
19722
|
+
lastNode, lastNode.textContent.length);
|
|
19695
19723
|
if (this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
19696
19724
|
detach(this.oldRangeElement.querySelector('BR'));
|
|
19697
19725
|
}
|