@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
|
@@ -32779,6 +32779,26 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32779
32779
|
if (isNullOrUndefined(this.oldRangeElement)) {
|
|
32780
32780
|
return;
|
|
32781
32781
|
}
|
|
32782
|
+
else if (findBlockElement[0].previousSibling) {
|
|
32783
|
+
var prevSibling = findBlockElement[0].previousSibling;
|
|
32784
|
+
var currentElement = findBlockElement[0];
|
|
32785
|
+
if (prevSibling.textContent.trim()) {
|
|
32786
|
+
if (prevSibling.lastChild.nodeName === 'BR') {
|
|
32787
|
+
prevSibling.removeChild(prevSibling.lastChild);
|
|
32788
|
+
}
|
|
32789
|
+
var cursorpointer = prevSibling.lastChild.textContent.length;
|
|
32790
|
+
var lastChild = prevSibling.lastChild;
|
|
32791
|
+
var childNodes = Array.from(currentElement.childNodes);
|
|
32792
|
+
for (var i = 0; i < childNodes.length; i++) {
|
|
32793
|
+
prevSibling.appendChild(childNodes[i].cloneNode(true));
|
|
32794
|
+
}
|
|
32795
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastChild, cursorpointer);
|
|
32796
|
+
currentElement.parentNode.removeChild(currentElement);
|
|
32797
|
+
}
|
|
32798
|
+
else {
|
|
32799
|
+
prevSibling.parentNode.removeChild(prevSibling);
|
|
32800
|
+
}
|
|
32801
|
+
}
|
|
32782
32802
|
else {
|
|
32783
32803
|
if (this.oldRangeElement.tagName === 'OL' || this.oldRangeElement.tagName === 'UL') {
|
|
32784
32804
|
this.oldRangeElement = this.oldRangeElement.lastElementChild.lastElementChild
|
|
@@ -34685,13 +34705,24 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
34685
34705
|
this.iframeElement = this.parent.contentModule.getDocument().querySelectorAll('iframe');
|
|
34686
34706
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
34687
34707
|
this.iframeElement.forEach(function (iframe) {
|
|
34688
|
-
EventHandler.add(iframe
|
|
34708
|
+
EventHandler.add(iframe, 'load', _this.onIFrameLoad, _this);
|
|
34689
34709
|
});
|
|
34690
34710
|
}
|
|
34691
34711
|
this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
|
|
34692
34712
|
EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
|
|
34693
34713
|
EventHandler.add(this.resizer, this.touchStartEvent, this.resizeStart, this);
|
|
34694
34714
|
};
|
|
34715
|
+
Resize.prototype.onIFrameLoad = function (e) {
|
|
34716
|
+
var iframe = e.target;
|
|
34717
|
+
if (iframe.nodeName === 'IFRAME' && iframe.contentDocument) {
|
|
34718
|
+
EventHandler.add(iframe.contentDocument, 'mouseup', this.stopResize, this);
|
|
34719
|
+
}
|
|
34720
|
+
};
|
|
34721
|
+
Resize.prototype.removeMouseUpEventListener = function (iframe) {
|
|
34722
|
+
if (iframe.contentDocument) {
|
|
34723
|
+
EventHandler.remove(iframe.contentDocument, 'mouseup', this.stopResize);
|
|
34724
|
+
}
|
|
34725
|
+
};
|
|
34695
34726
|
Resize.prototype.resizeStart = function (e) {
|
|
34696
34727
|
var _this = this;
|
|
34697
34728
|
this.isResizing = false;
|
|
@@ -34798,7 +34829,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
34798
34829
|
}
|
|
34799
34830
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
34800
34831
|
this.iframeElement.forEach(function (iframe) {
|
|
34801
|
-
|
|
34832
|
+
_this.removeMouseUpEventListener(iframe);
|
|
34802
34833
|
});
|
|
34803
34834
|
}
|
|
34804
34835
|
if (this.resizer) {
|