@syncfusion/ej2-richtexteditor 20.2.39 → 20.2.40
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 +13 -1
- 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 +54 -11
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +54 -11
- 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 +7 -7
- package/src/editor-manager/plugin/toolbar-status.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor.js +13 -2
- package/src/rich-text-editor/renderer/image-module.d.ts +9 -1
- package/src/rich-text-editor/renderer/image-module.js +18 -6
- package/src/rich-text-editor/renderer/link-module.d.ts +8 -0
- package/src/rich-text-editor/renderer/link-module.js +10 -0
- package/src/rich-text-editor/renderer/render.d.ts +6 -0
- package/src/rich-text-editor/renderer/render.js +8 -0
- package/src/rich-text-editor/renderer/table-module.js +4 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.2.
|
|
3
|
+
* version : 20.2.40
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@20.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@20.2.39",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-yO/wGqPBdhD7xAMyXiLpzmmE9xiT18tgPaMOCsiUGj4wuJcWEF+2RVc66t2fLy2osg70SdEof4R6wByno2tN+w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.2.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.2.39.tgz",
|
|
30
|
+
"_shasum": "1f0a6edaf8a4f4200b391fe333a9a11116b23191",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~20.2.
|
|
41
|
+
"@syncfusion/ej2-base": "~20.2.39",
|
|
42
42
|
"@syncfusion/ej2-buttons": "~20.2.38",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~20.2.39",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~20.2.38",
|
|
45
45
|
"@syncfusion/ej2-navigations": "~20.2.39",
|
|
46
|
-
"@syncfusion/ej2-popups": "~20.2.
|
|
46
|
+
"@syncfusion/ej2-popups": "~20.2.40",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~20.2.38"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "20.2.
|
|
73
|
+
"version": "20.2.40",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -233,7 +233,7 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
233
233
|
if ((name !== null && name !== '' && name !== undefined)
|
|
234
234
|
&& (fontName === null || fontName === undefined || (fontName.filter(function (value, pos) {
|
|
235
235
|
var pattern = new RegExp(name, 'i');
|
|
236
|
-
if ((value.replace(/"/g, '').replace(/ /g, '') === name.replace(/"/g, '').replace(/ /g, '')) ||
|
|
236
|
+
if ((value.replace(/"/g, '').replace(/ /g, '').toLowerCase() === name.replace(/"/g, '').replace(/ /g, '').toLowerCase()) ||
|
|
237
237
|
(value.search(pattern) > -1)) {
|
|
238
238
|
index = pos;
|
|
239
239
|
}
|
|
@@ -851,8 +851,19 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
851
851
|
if (this.isDestroyed || !this.isRendered) {
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
|
-
if (this.element.offsetParent === null
|
|
855
|
-
this.toolbarModule
|
|
854
|
+
if (this.element.offsetParent === null) {
|
|
855
|
+
if (!isNOU(this.toolbarModule)) {
|
|
856
|
+
this.toolbarModule.destroy();
|
|
857
|
+
}
|
|
858
|
+
if (!isNOU(this.imageModule)) {
|
|
859
|
+
this.imageModule.moduleDestroy();
|
|
860
|
+
}
|
|
861
|
+
if (!isNOU(this.linkModule)) {
|
|
862
|
+
this.linkModule.moduleDestroy();
|
|
863
|
+
}
|
|
864
|
+
if (!isNOU(this.renderModule)) {
|
|
865
|
+
this.renderModule.moduleDestroy();
|
|
866
|
+
}
|
|
856
867
|
return;
|
|
857
868
|
}
|
|
858
869
|
this.notify(events.destroy, {});
|
|
@@ -30,7 +30,7 @@ export declare class Image {
|
|
|
30
30
|
private isAllowedTypes;
|
|
31
31
|
private pageX;
|
|
32
32
|
private pageY;
|
|
33
|
-
private
|
|
33
|
+
private mouseX;
|
|
34
34
|
private dialogRenderObj;
|
|
35
35
|
private deletedImg;
|
|
36
36
|
private changedWidthValue;
|
|
@@ -165,6 +165,14 @@ export declare class Image {
|
|
|
165
165
|
|
|
166
166
|
*/
|
|
167
167
|
destroy(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Clears the ImageModule.
|
|
170
|
+
*
|
|
171
|
+
* @returns {void}
|
|
172
|
+
* @hidden
|
|
173
|
+
|
|
174
|
+
*/
|
|
175
|
+
moduleDestroy(): void;
|
|
168
176
|
/**
|
|
169
177
|
* For internal use only - Get the module name.
|
|
170
178
|
*
|
|
@@ -17,7 +17,7 @@ var Image = /** @class */ (function () {
|
|
|
17
17
|
this.isAllowedTypes = true;
|
|
18
18
|
this.pageX = null;
|
|
19
19
|
this.pageY = null;
|
|
20
|
-
this.
|
|
20
|
+
this.mouseX = null;
|
|
21
21
|
this.deletedImg = [];
|
|
22
22
|
this.parent = parent;
|
|
23
23
|
this.rteID = parent.element.id;
|
|
@@ -354,7 +354,7 @@ var Image = /** @class */ (function () {
|
|
|
354
354
|
img.style.minWidth = this.parent.insertImageSettings.minWidth === 0 ? '20px' : formatUnit(this.parent.insertImageSettings.minWidth);
|
|
355
355
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
356
356
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
357
|
-
var original = img.offsetWidth + this.
|
|
357
|
+
var original = img.offsetWidth + this.mouseX;
|
|
358
358
|
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
|
|
359
359
|
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
360
360
|
}
|
|
@@ -380,17 +380,17 @@ var Image = /** @class */ (function () {
|
|
|
380
380
|
}
|
|
381
381
|
else {
|
|
382
382
|
if (this.parent.iframeSettings.enable) {
|
|
383
|
-
img.setAttribute('width', (img.width + this.
|
|
383
|
+
img.setAttribute('width', (img.width + this.mouseX).toString());
|
|
384
384
|
}
|
|
385
385
|
else {
|
|
386
|
-
img.setAttribute('width', (img.offsetWidth + this.
|
|
386
|
+
img.setAttribute('width', (img.offsetWidth + this.mouseX).toString());
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
else if (height > width) {
|
|
391
391
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
392
392
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
393
|
-
var original = img.offsetWidth + this.
|
|
393
|
+
var original = img.offsetWidth + this.mouseX;
|
|
394
394
|
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
|
|
395
395
|
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
396
396
|
}
|
|
@@ -459,7 +459,7 @@ var Image = /** @class */ (function () {
|
|
|
459
459
|
var mouseY = (this.resizeBtnStat.topLeft || this.resizeBtnStat.topRight) ? -(pageY - this.pageY) : (pageY - this.pageY);
|
|
460
460
|
var width = parseInt(this.imgDupPos.width, 10) + mouseX;
|
|
461
461
|
var height = parseInt(this.imgDupPos.height, 10) + mouseY;
|
|
462
|
-
this.
|
|
462
|
+
this.mouseX = mouseX;
|
|
463
463
|
this.pageX = pageX;
|
|
464
464
|
this.pageY = pageY;
|
|
465
465
|
if (this.resizeBtnStat.botRight) {
|
|
@@ -2295,6 +2295,18 @@ var Image = /** @class */ (function () {
|
|
|
2295
2295
|
this.prevSelectedImgEle = undefined;
|
|
2296
2296
|
this.removeEventListener();
|
|
2297
2297
|
};
|
|
2298
|
+
/* eslint-disable */
|
|
2299
|
+
/**
|
|
2300
|
+
* Clears the ImageModule.
|
|
2301
|
+
*
|
|
2302
|
+
* @returns {void}
|
|
2303
|
+
* @hidden
|
|
2304
|
+
|
|
2305
|
+
*/
|
|
2306
|
+
/* eslint-enable */
|
|
2307
|
+
Image.prototype.moduleDestroy = function () {
|
|
2308
|
+
this.parent = null;
|
|
2309
|
+
};
|
|
2298
2310
|
/**
|
|
2299
2311
|
* For internal use only - Get the module name.
|
|
2300
2312
|
*
|
|
@@ -520,6 +520,16 @@ var Link = /** @class */ (function () {
|
|
|
520
520
|
Link.prototype.destroy = function () {
|
|
521
521
|
this.removeEventListener();
|
|
522
522
|
};
|
|
523
|
+
/**
|
|
524
|
+
* Clears the Link Module.
|
|
525
|
+
*
|
|
526
|
+
* @returns {void}
|
|
527
|
+
* @hidden
|
|
528
|
+
|
|
529
|
+
*/
|
|
530
|
+
Link.prototype.moduleDestroy = function () {
|
|
531
|
+
this.parent = null;
|
|
532
|
+
};
|
|
523
533
|
/**
|
|
524
534
|
* For internal use only - Get the module name.
|
|
525
535
|
*
|
|
@@ -40,6 +40,12 @@ export declare class Render {
|
|
|
40
40
|
* @returns {void}
|
|
41
41
|
*/
|
|
42
42
|
destroy(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Clears the Render Module.
|
|
45
|
+
*
|
|
46
|
+
* @returns {void}
|
|
47
|
+
*/
|
|
48
|
+
moduleDestroy(): void;
|
|
43
49
|
private addEventListener;
|
|
44
50
|
private removeEventListener;
|
|
45
51
|
private keyUp;
|
|
@@ -51,6 +51,14 @@ var Render = /** @class */ (function () {
|
|
|
51
51
|
Render.prototype.destroy = function () {
|
|
52
52
|
this.removeEventListener();
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Clears the Render Module.
|
|
56
|
+
*
|
|
57
|
+
* @returns {void}
|
|
58
|
+
*/
|
|
59
|
+
Render.prototype.moduleDestroy = function () {
|
|
60
|
+
this.parent = null;
|
|
61
|
+
};
|
|
54
62
|
Render.prototype.addEventListener = function () {
|
|
55
63
|
if (this.parent.isDestroyed) {
|
|
56
64
|
return;
|
|
@@ -547,7 +547,8 @@ var Table = /** @class */ (function () {
|
|
|
547
547
|
}
|
|
548
548
|
var target = e.target || e.targetTouches[0].target;
|
|
549
549
|
var closestTable = closest(target, 'table.e-rte-table');
|
|
550
|
-
if (!isNOU(this.curTable) && !isNOU(closestTable) && closestTable !== this.curTable
|
|
550
|
+
if (!isNOU(this.curTable) && !isNOU(closestTable) && closestTable !== this.curTable &&
|
|
551
|
+
this.parent.contentModule.getEditPanel().contains(closestTable)) {
|
|
551
552
|
this.removeResizeElement();
|
|
552
553
|
this.removeHelper(e);
|
|
553
554
|
this.cancelResizeAction();
|
|
@@ -824,7 +825,8 @@ var Table = /** @class */ (function () {
|
|
|
824
825
|
var rteWidth = _this.contentModule.getEditPanel().offsetWidth - (_this.contentModule.getEditPanel().offsetWidth -
|
|
825
826
|
_this.contentModule.getEditPanel().clientWidth) - paddingSize * 2;
|
|
826
827
|
var widthCompare = void 0;
|
|
827
|
-
if (!isNOU(_this.curTable.parentElement.closest('table')))
|
|
828
|
+
if (!isNOU(_this.curTable.parentElement.closest('table')) && !isNOU(_this.curTable.closest('td')) &&
|
|
829
|
+
_this.contentModule.getEditPanel().contains(_this.curTable.closest('td'))) {
|
|
828
830
|
var currentTd = _this.curTable.closest('td');
|
|
829
831
|
var currentTDPad = +getComputedStyle(currentTd).paddingRight.match(/\d/g).join('');
|
|
830
832
|
// Padding of the current table with the parent element multiply with 2.
|