@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 26.2.
|
|
3
|
+
* version : 26.2.11
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@26.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@26.2.10",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-z+wM/vn4iSWg9eUP9OJdzUEzmQXf7ZR57M2mg5JYECSxW9umuxBen6BxuVwbkPfMFPPygFWaUTXA3V1ZXgp3Yg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
26
26
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
27
27
|
],
|
|
28
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.2.
|
|
29
|
-
"_shasum": "
|
|
28
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.2.10.tgz",
|
|
29
|
+
"_shasum": "ccda0929e70194c91389ffbffdd101cebc250153",
|
|
30
30
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
31
31
|
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
|
|
32
32
|
"author": {
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"bundleDependencies": false,
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@syncfusion/ej2-base": "~26.2.
|
|
41
|
-
"@syncfusion/ej2-buttons": "~26.2.
|
|
42
|
-
"@syncfusion/ej2-filemanager": "~26.2.
|
|
43
|
-
"@syncfusion/ej2-inputs": "~26.2.
|
|
44
|
-
"@syncfusion/ej2-navigations": "~26.2.
|
|
45
|
-
"@syncfusion/ej2-popups": "~26.2.
|
|
46
|
-
"@syncfusion/ej2-splitbuttons": "~26.2.
|
|
40
|
+
"@syncfusion/ej2-base": "~26.2.10",
|
|
41
|
+
"@syncfusion/ej2-buttons": "~26.2.10",
|
|
42
|
+
"@syncfusion/ej2-filemanager": "~26.2.11",
|
|
43
|
+
"@syncfusion/ej2-inputs": "~26.2.11",
|
|
44
|
+
"@syncfusion/ej2-navigations": "~26.2.11",
|
|
45
|
+
"@syncfusion/ej2-popups": "~26.2.11",
|
|
46
|
+
"@syncfusion/ej2-splitbuttons": "~26.2.10"
|
|
47
47
|
},
|
|
48
48
|
"deprecated": false,
|
|
49
49
|
"description": "Essential JS 2 RichTextEditor component",
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
80
80
|
},
|
|
81
81
|
"typings": "index.d.ts",
|
|
82
|
-
"version": "26.2.
|
|
82
|
+
"version": "26.2.11",
|
|
83
83
|
"sideEffects": false
|
|
84
84
|
}
|
package/src/common/util.js
CHANGED
|
@@ -275,6 +275,13 @@ export function scrollToCursor(document, inputElement) {
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
+
var scrollVal = inputElement.closest('div[style*="overflow-y: scroll"]');
|
|
279
|
+
if (!isNullOrUndefined(scrollVal)) {
|
|
280
|
+
var parentRect = scrollVal.getBoundingClientRect();
|
|
281
|
+
if (cursorBottom > parentRect.bottom) {
|
|
282
|
+
scrollVal.scrollTop += (cursorBottom - parentRect.bottom);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
278
285
|
}
|
|
279
286
|
/**
|
|
280
287
|
* Inserts items at a specific index in an array.
|
|
@@ -11,6 +11,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
11
11
|
function MsWordPaste(parent) {
|
|
12
12
|
this.olData = [
|
|
13
13
|
'decimal',
|
|
14
|
+
'decimal-leading-zero',
|
|
14
15
|
'lower-alpha',
|
|
15
16
|
'lower-roman',
|
|
16
17
|
'upper-alpha',
|
|
@@ -183,7 +184,8 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
183
184
|
imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
|
|
184
185
|
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
|
|
185
186
|
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0 &&
|
|
186
|
-
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0
|
|
187
|
+
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0 &&
|
|
188
|
+
imgElem[i].getAttribute('v:shapes').indexOf('img1') < 0) {
|
|
187
189
|
imgElem[i].classList.add('e-rte-image-unsupported');
|
|
188
190
|
}
|
|
189
191
|
imgElem[i].removeAttribute('v:shapes');
|
|
@@ -693,7 +695,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
693
695
|
listStyleType = this.getlistStyleType(this.listContents[0], type);
|
|
694
696
|
if (type === 'ol' && (i === 0 || listNodes[i - 1] === null)) {
|
|
695
697
|
var startString = this.listContents[0].split('.')[0];
|
|
696
|
-
var listTypes = ['A', 'a', 'I', 'i', 'α', '1', '1-']; // Add '1-' for rare list type.
|
|
698
|
+
var listTypes = ['A', 'a', 'I', 'i', 'α', '1', '01', '1-']; // Add '1-' for rare list type.
|
|
697
699
|
if (listTypes.indexOf(startString) === -1) {
|
|
698
700
|
if (listStyleType === 'decimal') {
|
|
699
701
|
// Bug in getlistStyleType() list style stype is returned as decimal for nested list with start attribute
|
|
@@ -782,6 +784,9 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
782
784
|
case (charCode > 96 && charCode < 123):
|
|
783
785
|
currentListClass = 'lower-alpha';
|
|
784
786
|
break;
|
|
787
|
+
case (listContent.split('.')[0].length > 1 && listContent.split('.')[0][0] === '0' && !isNaN(Number(listContent.split('.')[0]))):
|
|
788
|
+
currentListClass = 'decimal-leading-zero';
|
|
789
|
+
break;
|
|
785
790
|
default:
|
|
786
791
|
currentListClass = 'decimal';
|
|
787
792
|
break;
|
|
@@ -246,8 +246,25 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
246
246
|
if (!isNOU(cursorNodes[0].parentElement) && IsFormatted.inlineTags.
|
|
247
247
|
indexOf((cursorNodes[0].parentElement).tagName.toLowerCase()) !== -1 && cursorNodes[0].textContent.includes('\u200B')) {
|
|
248
248
|
var element = this.GetFormatNode(format, value);
|
|
249
|
+
var tempNode = cursorNodes[0];
|
|
250
|
+
if (format === 'fontsize') {
|
|
251
|
+
var currentFormatNode = cursorNodes[0];
|
|
252
|
+
while (currentFormatNode) {
|
|
253
|
+
var isSameTextContent = currentFormatNode.parentElement.textContent.trim()
|
|
254
|
+
=== cursorNodes[0].textContent.trim();
|
|
255
|
+
var previousElement = currentFormatNode.parentElement;
|
|
256
|
+
if (!domNode.isBlockNode(previousElement) && isSameTextContent &&
|
|
257
|
+
!(previousElement.nodeName === 'SPAN' && previousElement.classList.contains('e-img-inner'))) {
|
|
258
|
+
currentFormatNode = previousElement;
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
cursorNodes[0] = currentFormatNode;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
249
266
|
this.applyStyles(cursorNodes, 0, element);
|
|
250
|
-
return
|
|
267
|
+
return tempNode;
|
|
251
268
|
}
|
|
252
269
|
cursorNode = this.getInsertNode(docElement, range, format, value).firstChild;
|
|
253
270
|
}
|
|
@@ -333,9 +333,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
333
333
|
dropArea: this.parent.inputElement,
|
|
334
334
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
335
335
|
success: function (e) {
|
|
336
|
-
_this.
|
|
337
|
-
_this.popupClose(_this.popupObj, _this.uploadObj, imgElem, e);
|
|
338
|
-
}, 900);
|
|
336
|
+
_this.popupClose(_this.popupObj, _this.uploadObj, imgElem, e);
|
|
339
337
|
},
|
|
340
338
|
uploading: function (e) {
|
|
341
339
|
if (!_this.parent.isServerRendered) {
|
|
@@ -417,30 +415,31 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
417
415
|
this.parent.inputElement.contentEditable = 'true';
|
|
418
416
|
e.element = imgElem;
|
|
419
417
|
e.detectImageSource = ImageInputSource.Pasted;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
popupObj.close();
|
|
439
|
-
imgElem.style.opacity = '1';
|
|
440
|
-
if (uploadObj && document.body.contains(uploadObj.element)) {
|
|
441
|
-
uploadObj.destroy();
|
|
418
|
+
var element = e.file;
|
|
419
|
+
if (element.statusCode === '2') {
|
|
420
|
+
this.parent.trigger(events.imageUploadSuccess, e, function (e) {
|
|
421
|
+
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
422
|
+
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
423
|
+
imgElem.src = url;
|
|
424
|
+
imgElem.setAttribute('alt', e.file.name);
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
else if (element.statusCode === '5') {
|
|
429
|
+
this.parent.trigger(events.imageRemoving, e, function (e) {
|
|
430
|
+
if (!isNullOrUndefined(e.element.src)) {
|
|
431
|
+
e.element.src = '';
|
|
432
|
+
}
|
|
433
|
+
});
|
|
442
434
|
}
|
|
443
|
-
this.
|
|
435
|
+
this.popupCloseTime = setTimeout(function () {
|
|
436
|
+
popupObj.close();
|
|
437
|
+
imgElem.style.opacity = '1';
|
|
438
|
+
this.toolbarEnableDisable(false);
|
|
439
|
+
if (uploadObj && document.body.contains(uploadObj.element)) {
|
|
440
|
+
uploadObj.destroy();
|
|
441
|
+
}
|
|
442
|
+
}.bind(this), 1500);
|
|
444
443
|
};
|
|
445
444
|
PasteCleanup.prototype.refreshPopup = function (imageElement, popupObj) {
|
|
446
445
|
var imgPosition = this.parent.iframeSettings.enable ? this.parent.element.offsetTop +
|
|
@@ -1789,7 +1789,7 @@ var Image = /** @class */ (function () {
|
|
|
1789
1789
|
var altText;
|
|
1790
1790
|
var selectArgs;
|
|
1791
1791
|
var filesData;
|
|
1792
|
-
var
|
|
1792
|
+
var previousFileInfo = null;
|
|
1793
1793
|
this.uploadObj = new Uploader({
|
|
1794
1794
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
1795
1795
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
@@ -1844,10 +1844,10 @@ var Image = /** @class */ (function () {
|
|
|
1844
1844
|
e.detectImageSource = ImageInputSource.Uploaded;
|
|
1845
1845
|
_this.parent.trigger(events.imageUploadSuccess, e, function (e) {
|
|
1846
1846
|
if (!isNOU(_this.parent.insertImageSettings.path)) {
|
|
1847
|
-
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
1847
|
+
var url = _this.parent.insertImageSettings.path + (e).file.name;
|
|
1848
1848
|
// Update the URL of the previously uploaded image
|
|
1849
|
-
if (!isNOU(
|
|
1850
|
-
|
|
1849
|
+
if (!isNOU(previousFileInfo) && e.operation === 'upload') {
|
|
1850
|
+
_this.uploadObj.remove(previousFileInfo);
|
|
1851
1851
|
}
|
|
1852
1852
|
// eslint-disable-next-line
|
|
1853
1853
|
var value = { url: url, selection: save };
|
|
@@ -1862,7 +1862,7 @@ var Image = /** @class */ (function () {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
};
|
|
1864
1864
|
proxy.inputUrl.setAttribute('disabled', 'true');
|
|
1865
|
-
|
|
1865
|
+
previousFileInfo = e.file;
|
|
1866
1866
|
}
|
|
1867
1867
|
if (e.operation === 'upload' && !isNOU(_this.dialogObj)) {
|
|
1868
1868
|
_this.dialogObj.getButtons(0).element.removeAttribute('disabled');
|
package/hotfix/26.1.35_Vol2.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
hotfix/26.1.35_Vol2
|