@syncfusion/ej2-richtexteditor 28.1.39 → 28.1.41
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/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 +33 -2
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +33 -2
- 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 +9 -9
- package/src/rich-text-editor/actions/html-editor.js +20 -0
- package/src/rich-text-editor/actions/resize.d.ts +2 -0
- package/src/rich-text-editor/actions/resize.js +13 -2
|
@@ -33107,6 +33107,26 @@ class HtmlEditor {
|
|
|
33107
33107
|
if (isNullOrUndefined(this.oldRangeElement)) {
|
|
33108
33108
|
return;
|
|
33109
33109
|
}
|
|
33110
|
+
else if (findBlockElement[0].previousSibling) {
|
|
33111
|
+
const prevSibling = findBlockElement[0].previousSibling;
|
|
33112
|
+
const currentElement = findBlockElement[0];
|
|
33113
|
+
if (prevSibling.textContent.trim()) {
|
|
33114
|
+
if (prevSibling.lastChild.nodeName === 'BR') {
|
|
33115
|
+
prevSibling.removeChild(prevSibling.lastChild);
|
|
33116
|
+
}
|
|
33117
|
+
const cursorpointer = prevSibling.lastChild.textContent.length;
|
|
33118
|
+
const lastChild = prevSibling.lastChild;
|
|
33119
|
+
const childNodes = Array.from(currentElement.childNodes);
|
|
33120
|
+
for (let i = 0; i < childNodes.length; i++) {
|
|
33121
|
+
prevSibling.appendChild(childNodes[i].cloneNode(true));
|
|
33122
|
+
}
|
|
33123
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastChild, cursorpointer);
|
|
33124
|
+
currentElement.parentNode.removeChild(currentElement);
|
|
33125
|
+
}
|
|
33126
|
+
else {
|
|
33127
|
+
prevSibling.parentNode.removeChild(prevSibling);
|
|
33128
|
+
}
|
|
33129
|
+
}
|
|
33110
33130
|
else {
|
|
33111
33131
|
if (this.oldRangeElement.tagName === 'OL' || this.oldRangeElement.tagName === 'UL') {
|
|
33112
33132
|
this.oldRangeElement = this.oldRangeElement.lastElementChild.lastElementChild
|
|
@@ -34999,13 +35019,24 @@ class Resize {
|
|
|
34999
35019
|
this.iframeElement = this.parent.contentModule.getDocument().querySelectorAll('iframe');
|
|
35000
35020
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
35001
35021
|
this.iframeElement.forEach((iframe) => {
|
|
35002
|
-
EventHandler.add(iframe
|
|
35022
|
+
EventHandler.add(iframe, 'load', this.onIFrameLoad, this);
|
|
35003
35023
|
});
|
|
35004
35024
|
}
|
|
35005
35025
|
this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
|
|
35006
35026
|
EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
|
|
35007
35027
|
EventHandler.add(this.resizer, this.touchStartEvent, this.resizeStart, this);
|
|
35008
35028
|
}
|
|
35029
|
+
onIFrameLoad(e) {
|
|
35030
|
+
const iframe = e.target;
|
|
35031
|
+
if (iframe.nodeName === 'IFRAME' && iframe.contentDocument) {
|
|
35032
|
+
EventHandler.add(iframe.contentDocument, 'mouseup', this.stopResize, this);
|
|
35033
|
+
}
|
|
35034
|
+
}
|
|
35035
|
+
removeMouseUpEventListener(iframe) {
|
|
35036
|
+
if (iframe.contentDocument) {
|
|
35037
|
+
EventHandler.remove(iframe.contentDocument, 'mouseup', this.stopResize);
|
|
35038
|
+
}
|
|
35039
|
+
}
|
|
35009
35040
|
resizeStart(e) {
|
|
35010
35041
|
this.isResizing = false;
|
|
35011
35042
|
if (e.cancelable) {
|
|
@@ -35109,7 +35140,7 @@ class Resize {
|
|
|
35109
35140
|
}
|
|
35110
35141
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
35111
35142
|
this.iframeElement.forEach((iframe) => {
|
|
35112
|
-
|
|
35143
|
+
this.removeMouseUpEventListener(iframe);
|
|
35113
35144
|
});
|
|
35114
35145
|
}
|
|
35115
35146
|
if (this.resizer) {
|