@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
|
@@ -16980,7 +16980,7 @@ class ToolbarStatus {
|
|
|
16980
16980
|
if ((name !== null && name !== '' && name !== undefined)
|
|
16981
16981
|
&& (fontName === null || fontName === undefined || (fontName.filter((value, pos) => {
|
|
16982
16982
|
const pattern = new RegExp(name, 'i');
|
|
16983
|
-
if ((value.replace(/"/g, '').replace(/ /g, '') === name.replace(/"/g, '').replace(/ /g, '')) ||
|
|
16983
|
+
if ((value.replace(/"/g, '').replace(/ /g, '').toLowerCase() === name.replace(/"/g, '').replace(/ /g, '').toLowerCase()) ||
|
|
16984
16984
|
(value.search(pattern) > -1)) {
|
|
16985
16985
|
index = pos;
|
|
16986
16986
|
}
|
|
@@ -19829,6 +19829,14 @@ class Render {
|
|
|
19829
19829
|
destroy() {
|
|
19830
19830
|
this.removeEventListener();
|
|
19831
19831
|
}
|
|
19832
|
+
/**
|
|
19833
|
+
* Clears the Render Module.
|
|
19834
|
+
*
|
|
19835
|
+
* @returns {void}
|
|
19836
|
+
*/
|
|
19837
|
+
moduleDestroy() {
|
|
19838
|
+
this.parent = null;
|
|
19839
|
+
}
|
|
19832
19840
|
addEventListener() {
|
|
19833
19841
|
if (this.parent.isDestroyed) {
|
|
19834
19842
|
return;
|
|
@@ -20384,6 +20392,16 @@ class Link {
|
|
|
20384
20392
|
destroy() {
|
|
20385
20393
|
this.removeEventListener();
|
|
20386
20394
|
}
|
|
20395
|
+
/**
|
|
20396
|
+
* Clears the Link Module.
|
|
20397
|
+
*
|
|
20398
|
+
* @returns {void}
|
|
20399
|
+
* @hidden
|
|
20400
|
+
* @deprecated
|
|
20401
|
+
*/
|
|
20402
|
+
moduleDestroy() {
|
|
20403
|
+
this.parent = null;
|
|
20404
|
+
}
|
|
20387
20405
|
/**
|
|
20388
20406
|
* For internal use only - Get the module name.
|
|
20389
20407
|
*
|
|
@@ -20403,7 +20421,7 @@ class Image {
|
|
|
20403
20421
|
this.isAllowedTypes = true;
|
|
20404
20422
|
this.pageX = null;
|
|
20405
20423
|
this.pageY = null;
|
|
20406
|
-
this.
|
|
20424
|
+
this.mouseX = null;
|
|
20407
20425
|
this.deletedImg = [];
|
|
20408
20426
|
this.parent = parent;
|
|
20409
20427
|
this.rteID = parent.element.id;
|
|
@@ -20739,7 +20757,7 @@ class Image {
|
|
|
20739
20757
|
img.style.minWidth = this.parent.insertImageSettings.minWidth === 0 ? '20px' : formatUnit(this.parent.insertImageSettings.minWidth);
|
|
20740
20758
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
20741
20759
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
20742
|
-
var original = img.offsetWidth + this.
|
|
20760
|
+
var original = img.offsetWidth + this.mouseX;
|
|
20743
20761
|
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
|
|
20744
20762
|
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
20745
20763
|
}
|
|
@@ -20765,17 +20783,17 @@ class Image {
|
|
|
20765
20783
|
}
|
|
20766
20784
|
else {
|
|
20767
20785
|
if (this.parent.iframeSettings.enable) {
|
|
20768
|
-
img.setAttribute('width', (img.width + this.
|
|
20786
|
+
img.setAttribute('width', (img.width + this.mouseX).toString());
|
|
20769
20787
|
}
|
|
20770
20788
|
else {
|
|
20771
|
-
img.setAttribute('width', (img.offsetWidth + this.
|
|
20789
|
+
img.setAttribute('width', (img.offsetWidth + this.mouseX).toString());
|
|
20772
20790
|
}
|
|
20773
20791
|
}
|
|
20774
20792
|
}
|
|
20775
20793
|
else if (height > width) {
|
|
20776
20794
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
20777
20795
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
20778
|
-
var original = img.offsetWidth + this.
|
|
20796
|
+
var original = img.offsetWidth + this.mouseX;
|
|
20779
20797
|
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
|
|
20780
20798
|
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
20781
20799
|
}
|
|
@@ -20843,7 +20861,7 @@ class Image {
|
|
|
20843
20861
|
const mouseY = (this.resizeBtnStat.topLeft || this.resizeBtnStat.topRight) ? -(pageY - this.pageY) : (pageY - this.pageY);
|
|
20844
20862
|
const width = parseInt(this.imgDupPos.width, 10) + mouseX;
|
|
20845
20863
|
const height = parseInt(this.imgDupPos.height, 10) + mouseY;
|
|
20846
|
-
this.
|
|
20864
|
+
this.mouseX = mouseX;
|
|
20847
20865
|
this.pageX = pageX;
|
|
20848
20866
|
this.pageY = pageY;
|
|
20849
20867
|
if (this.resizeBtnStat.botRight) {
|
|
@@ -22663,6 +22681,18 @@ class Image {
|
|
|
22663
22681
|
this.prevSelectedImgEle = undefined;
|
|
22664
22682
|
this.removeEventListener();
|
|
22665
22683
|
}
|
|
22684
|
+
/* eslint-disable */
|
|
22685
|
+
/**
|
|
22686
|
+
* Clears the ImageModule.
|
|
22687
|
+
*
|
|
22688
|
+
* @returns {void}
|
|
22689
|
+
* @hidden
|
|
22690
|
+
* @deprecated
|
|
22691
|
+
*/
|
|
22692
|
+
/* eslint-enable */
|
|
22693
|
+
moduleDestroy() {
|
|
22694
|
+
this.parent = null;
|
|
22695
|
+
}
|
|
22666
22696
|
/**
|
|
22667
22697
|
* For internal use only - Get the module name.
|
|
22668
22698
|
*
|
|
@@ -23473,7 +23503,8 @@ class Table {
|
|
|
23473
23503
|
}
|
|
23474
23504
|
const target = e.target || e.targetTouches[0].target;
|
|
23475
23505
|
const closestTable = closest(target, 'table.e-rte-table');
|
|
23476
|
-
if (!isNullOrUndefined(this.curTable) && !isNullOrUndefined(closestTable) && closestTable !== this.curTable
|
|
23506
|
+
if (!isNullOrUndefined(this.curTable) && !isNullOrUndefined(closestTable) && closestTable !== this.curTable &&
|
|
23507
|
+
this.parent.contentModule.getEditPanel().contains(closestTable)) {
|
|
23477
23508
|
this.removeResizeElement();
|
|
23478
23509
|
this.removeHelper(e);
|
|
23479
23510
|
this.cancelResizeAction();
|
|
@@ -23748,7 +23779,8 @@ class Table {
|
|
|
23748
23779
|
const rteWidth = this.contentModule.getEditPanel().offsetWidth - (this.contentModule.getEditPanel().offsetWidth -
|
|
23749
23780
|
this.contentModule.getEditPanel().clientWidth) - paddingSize * 2;
|
|
23750
23781
|
let widthCompare;
|
|
23751
|
-
if (!isNullOrUndefined(this.curTable.parentElement.closest('table')))
|
|
23782
|
+
if (!isNullOrUndefined(this.curTable.parentElement.closest('table')) && !isNullOrUndefined(this.curTable.closest('td')) &&
|
|
23783
|
+
this.contentModule.getEditPanel().contains(this.curTable.closest('td'))) {
|
|
23752
23784
|
const currentTd = this.curTable.closest('td');
|
|
23753
23785
|
const currentTDPad = +getComputedStyle(currentTd).paddingRight.match(/\d/g).join('');
|
|
23754
23786
|
// Padding of the current table with the parent element multiply with 2.
|
|
@@ -26006,8 +26038,19 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
26006
26038
|
if (this.isDestroyed || !this.isRendered) {
|
|
26007
26039
|
return;
|
|
26008
26040
|
}
|
|
26009
|
-
if (this.element.offsetParent === null
|
|
26010
|
-
this.toolbarModule
|
|
26041
|
+
if (this.element.offsetParent === null) {
|
|
26042
|
+
if (!isNullOrUndefined(this.toolbarModule)) {
|
|
26043
|
+
this.toolbarModule.destroy();
|
|
26044
|
+
}
|
|
26045
|
+
if (!isNullOrUndefined(this.imageModule)) {
|
|
26046
|
+
this.imageModule.moduleDestroy();
|
|
26047
|
+
}
|
|
26048
|
+
if (!isNullOrUndefined(this.linkModule)) {
|
|
26049
|
+
this.linkModule.moduleDestroy();
|
|
26050
|
+
}
|
|
26051
|
+
if (!isNullOrUndefined(this.renderModule)) {
|
|
26052
|
+
this.renderModule.moduleDestroy();
|
|
26053
|
+
}
|
|
26011
26054
|
return;
|
|
26012
26055
|
}
|
|
26013
26056
|
this.notify(destroy, {});
|