@syncfusion/ej2-richtexteditor 26.2.9 → 26.2.11
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 +62 -34
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +62 -34
- 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 +12 -12
- package/src/common/util.js +7 -0
- package/src/editor-manager/plugin/lists.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +7 -2
- package/src/editor-manager/plugin/selection-commands.js +18 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +25 -26
- package/src/rich-text-editor/renderer/image-module.js +5 -5
- package/hotfix/26.1.35_Vol2.txt +0 -1
|
@@ -4856,6 +4856,13 @@ function scrollToCursor(document, inputElement) {
|
|
|
4856
4856
|
}
|
|
4857
4857
|
}
|
|
4858
4858
|
}
|
|
4859
|
+
var scrollVal = inputElement.closest('div[style*="overflow-y: scroll"]');
|
|
4860
|
+
if (!isNullOrUndefined(scrollVal)) {
|
|
4861
|
+
var parentRect = scrollVal.getBoundingClientRect();
|
|
4862
|
+
if (cursorBottom > parentRect.bottom) {
|
|
4863
|
+
scrollVal.scrollTop += (cursorBottom - parentRect.bottom);
|
|
4864
|
+
}
|
|
4865
|
+
}
|
|
4859
4866
|
}
|
|
4860
4867
|
/**
|
|
4861
4868
|
* Inserts items at a specific index in an array.
|
|
@@ -8512,7 +8519,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8512
8519
|
var altText;
|
|
8513
8520
|
var selectArgs;
|
|
8514
8521
|
var filesData;
|
|
8515
|
-
var
|
|
8522
|
+
var previousFileInfo = null;
|
|
8516
8523
|
this.uploadObj = new Uploader({
|
|
8517
8524
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
8518
8525
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
@@ -8567,10 +8574,10 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8567
8574
|
e.detectImageSource = ImageInputSource.Uploaded;
|
|
8568
8575
|
_this.parent.trigger(imageUploadSuccess, e, function (e) {
|
|
8569
8576
|
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
8570
|
-
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
8577
|
+
var url = _this.parent.insertImageSettings.path + (e).file.name;
|
|
8571
8578
|
// Update the URL of the previously uploaded image
|
|
8572
|
-
if (!isNullOrUndefined(
|
|
8573
|
-
|
|
8579
|
+
if (!isNullOrUndefined(previousFileInfo) && e.operation === 'upload') {
|
|
8580
|
+
_this.uploadObj.remove(previousFileInfo);
|
|
8574
8581
|
}
|
|
8575
8582
|
proxy.uploadUrl = {
|
|
8576
8583
|
url: url, selection: save, altText: altText, selectParent: selectParent,
|
|
@@ -8583,7 +8590,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8583
8590
|
}
|
|
8584
8591
|
};
|
|
8585
8592
|
proxy.inputUrl.setAttribute('disabled', 'true');
|
|
8586
|
-
|
|
8593
|
+
previousFileInfo = e.file;
|
|
8587
8594
|
}
|
|
8588
8595
|
if (e.operation === 'upload' && !isNullOrUndefined(_this.dialogObj)) {
|
|
8589
8596
|
_this.dialogObj.getButtons(0).element.removeAttribute('disabled');
|
|
@@ -26868,8 +26875,25 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
26868
26875
|
if (!isNullOrUndefined(cursorNodes[0].parentElement) && IsFormatted.inlineTags.
|
|
26869
26876
|
indexOf((cursorNodes[0].parentElement).tagName.toLowerCase()) !== -1 && cursorNodes[0].textContent.includes('\u200B')) {
|
|
26870
26877
|
var element = this.GetFormatNode(format, value);
|
|
26878
|
+
var tempNode = cursorNodes[0];
|
|
26879
|
+
if (format === 'fontsize') {
|
|
26880
|
+
var currentFormatNode = cursorNodes[0];
|
|
26881
|
+
while (currentFormatNode) {
|
|
26882
|
+
var isSameTextContent = currentFormatNode.parentElement.textContent.trim()
|
|
26883
|
+
=== cursorNodes[0].textContent.trim();
|
|
26884
|
+
var previousElement = currentFormatNode.parentElement;
|
|
26885
|
+
if (!domNode.isBlockNode(previousElement) && isSameTextContent &&
|
|
26886
|
+
!(previousElement.nodeName === 'SPAN' && previousElement.classList.contains('e-img-inner'))) {
|
|
26887
|
+
currentFormatNode = previousElement;
|
|
26888
|
+
}
|
|
26889
|
+
else {
|
|
26890
|
+
break;
|
|
26891
|
+
}
|
|
26892
|
+
cursorNodes[0] = currentFormatNode;
|
|
26893
|
+
}
|
|
26894
|
+
}
|
|
26871
26895
|
this.applyStyles(cursorNodes, 0, element);
|
|
26872
|
-
return
|
|
26896
|
+
return tempNode;
|
|
26873
26897
|
}
|
|
26874
26898
|
cursorNode = this.getInsertNode(docElement, range, format, value).firstChild;
|
|
26875
26899
|
}
|
|
@@ -28318,6 +28342,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
28318
28342
|
function MsWordPaste(parent) {
|
|
28319
28343
|
this.olData = [
|
|
28320
28344
|
'decimal',
|
|
28345
|
+
'decimal-leading-zero',
|
|
28321
28346
|
'lower-alpha',
|
|
28322
28347
|
'lower-roman',
|
|
28323
28348
|
'upper-alpha',
|
|
@@ -28490,7 +28515,8 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
28490
28515
|
imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
|
|
28491
28516
|
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
|
|
28492
28517
|
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0 &&
|
|
28493
|
-
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0
|
|
28518
|
+
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0 &&
|
|
28519
|
+
imgElem[i].getAttribute('v:shapes').indexOf('img1') < 0) {
|
|
28494
28520
|
imgElem[i].classList.add('e-rte-image-unsupported');
|
|
28495
28521
|
}
|
|
28496
28522
|
imgElem[i].removeAttribute('v:shapes');
|
|
@@ -29000,7 +29026,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
29000
29026
|
listStyleType = this.getlistStyleType(this.listContents[0], type);
|
|
29001
29027
|
if (type === 'ol' && (i === 0 || listNodes[i - 1] === null)) {
|
|
29002
29028
|
var startString = this.listContents[0].split('.')[0];
|
|
29003
|
-
var listTypes = ['A', 'a', 'I', 'i', 'α', '1', '1-']; // Add '1-' for rare list type.
|
|
29029
|
+
var listTypes = ['A', 'a', 'I', 'i', 'α', '1', '01', '1-']; // Add '1-' for rare list type.
|
|
29004
29030
|
if (listTypes.indexOf(startString) === -1) {
|
|
29005
29031
|
if (listStyleType === 'decimal') {
|
|
29006
29032
|
// Bug in getlistStyleType() list style stype is returned as decimal for nested list with start attribute
|
|
@@ -29089,6 +29115,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
29089
29115
|
case (charCode > 96 && charCode < 123):
|
|
29090
29116
|
currentListClass = 'lower-alpha';
|
|
29091
29117
|
break;
|
|
29118
|
+
case (listContent.split('.')[0].length > 1 && listContent.split('.')[0][0] === '0' && !isNaN(Number(listContent.split('.')[0]))):
|
|
29119
|
+
currentListClass = 'decimal-leading-zero';
|
|
29120
|
+
break;
|
|
29092
29121
|
default:
|
|
29093
29122
|
currentListClass = 'decimal';
|
|
29094
29123
|
break;
|
|
@@ -32145,9 +32174,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
32145
32174
|
dropArea: this.parent.inputElement,
|
|
32146
32175
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
32147
32176
|
success: function (e) {
|
|
32148
|
-
_this.
|
|
32149
|
-
_this.popupClose(_this.popupObj, _this.uploadObj, imgElem, e);
|
|
32150
|
-
}, 900);
|
|
32177
|
+
_this.popupClose(_this.popupObj, _this.uploadObj, imgElem, e);
|
|
32151
32178
|
},
|
|
32152
32179
|
uploading: function (e) {
|
|
32153
32180
|
if (!_this.parent.isServerRendered) {
|
|
@@ -32229,30 +32256,31 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
32229
32256
|
this.parent.inputElement.contentEditable = 'true';
|
|
32230
32257
|
e.element = imgElem;
|
|
32231
32258
|
e.detectImageSource = ImageInputSource.Pasted;
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32236
|
-
|
|
32237
|
-
|
|
32238
|
-
|
|
32239
|
-
|
|
32240
|
-
|
|
32241
|
-
}
|
|
32242
|
-
else if (element.statusCode === '5') {
|
|
32243
|
-
_this.parent.trigger(imageRemoving, e, function (e) {
|
|
32244
|
-
if (!isNullOrUndefined(e.element.src)) {
|
|
32245
|
-
e.element.src = '';
|
|
32246
|
-
}
|
|
32247
|
-
});
|
|
32248
|
-
}
|
|
32249
|
-
});
|
|
32250
|
-
popupObj.close();
|
|
32251
|
-
imgElem.style.opacity = '1';
|
|
32252
|
-
if (uploadObj && document.body.contains(uploadObj.element)) {
|
|
32253
|
-
uploadObj.destroy();
|
|
32259
|
+
var element = e.file;
|
|
32260
|
+
if (element.statusCode === '2') {
|
|
32261
|
+
this.parent.trigger(imageUploadSuccess, e, function (e) {
|
|
32262
|
+
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
32263
|
+
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
32264
|
+
imgElem.src = url;
|
|
32265
|
+
imgElem.setAttribute('alt', e.file.name);
|
|
32266
|
+
}
|
|
32267
|
+
});
|
|
32254
32268
|
}
|
|
32255
|
-
|
|
32269
|
+
else if (element.statusCode === '5') {
|
|
32270
|
+
this.parent.trigger(imageRemoving, e, function (e) {
|
|
32271
|
+
if (!isNullOrUndefined(e.element.src)) {
|
|
32272
|
+
e.element.src = '';
|
|
32273
|
+
}
|
|
32274
|
+
});
|
|
32275
|
+
}
|
|
32276
|
+
this.popupCloseTime = setTimeout(function () {
|
|
32277
|
+
popupObj.close();
|
|
32278
|
+
imgElem.style.opacity = '1';
|
|
32279
|
+
this.toolbarEnableDisable(false);
|
|
32280
|
+
if (uploadObj && document.body.contains(uploadObj.element)) {
|
|
32281
|
+
uploadObj.destroy();
|
|
32282
|
+
}
|
|
32283
|
+
}.bind(this), 1500);
|
|
32256
32284
|
};
|
|
32257
32285
|
PasteCleanup.prototype.refreshPopup = function (imageElement, popupObj) {
|
|
32258
32286
|
var imgPosition = this.parent.iframeSettings.enable ? this.parent.element.offsetTop +
|