@syncfusion/ej2-richtexteditor 22.1.34 → 22.1.38
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 +18 -0
- 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 +85 -19
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +85 -19
- 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/editor-manager/plugin/format-painter-actions.js +4 -4
- package/src/editor-manager/plugin/inserthtml.js +2 -1
- package/src/rich-text-editor/actions/format-painter.js +10 -3
- package/src/rich-text-editor/actions/xhtml-validation.js +2 -1
- package/src/rich-text-editor/renderer/table-module.js +67 -10
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.1.
|
|
3
|
+
* version : 22.1.38
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@22.1.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-mS0ty0acT5STRbjz9ZSXS5y0hcs04Oe00244YG4ojqmGkymJ4OuAhd6+jZPTAzIqy4Pj9ziOOFIm+NLj1tqJLQ==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-22.1.36.tgz",
|
|
30
|
+
"_shasum": "8af01f54f053e047038c2f48f38cb58b0db212b4",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~22.1.
|
|
42
|
-
"@syncfusion/ej2-buttons": "~22.1.
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~22.1.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~22.1.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~22.1.
|
|
46
|
-
"@syncfusion/ej2-popups": "~22.1.
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~22.1.
|
|
41
|
+
"@syncfusion/ej2-base": "~22.1.38",
|
|
42
|
+
"@syncfusion/ej2-buttons": "~22.1.38",
|
|
43
|
+
"@syncfusion/ej2-filemanager": "~22.1.38",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~22.1.38",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~22.1.38",
|
|
46
|
+
"@syncfusion/ej2-popups": "~22.1.38",
|
|
47
|
+
"@syncfusion/ej2-splitbuttons": "~22.1.37"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "Essential JS 2 RichTextEditor component",
|
|
@@ -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": "22.1.
|
|
73
|
+
"version": "22.1.38",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -142,7 +142,7 @@ var FormatPainterActions = /** @class */ (function () {
|
|
|
142
142
|
var classLength = classes.length;
|
|
143
143
|
for (var k = 0; k < classLength; k++) {
|
|
144
144
|
if (elementsList[j].classList.contains(classes[k])) {
|
|
145
|
-
removeClass([elementsList[j]], classes[k]);
|
|
145
|
+
removeClass([elementsList[j]], classes[k].trim());
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
if (elementsList[j].classList.length === 0) {
|
|
@@ -153,7 +153,7 @@ var FormatPainterActions = /** @class */ (function () {
|
|
|
153
153
|
var styles = deniedPropArray[i].styles;
|
|
154
154
|
var styleLength = styles.length;
|
|
155
155
|
for (var k = 0; k < styleLength; k++) {
|
|
156
|
-
elementsList[j].style.removeProperty(styles[k]);
|
|
156
|
+
elementsList[j].style.removeProperty(styles[k].trim());
|
|
157
157
|
}
|
|
158
158
|
if (elementsList[j].style.length === 0) {
|
|
159
159
|
elementsList[j].removeAttribute('style');
|
|
@@ -163,7 +163,7 @@ var FormatPainterActions = /** @class */ (function () {
|
|
|
163
163
|
var attributes = deniedPropArray[i].attributes;
|
|
164
164
|
var attributeLength = attributes.length;
|
|
165
165
|
for (var k = 0; k < attributeLength; k++) {
|
|
166
|
-
elementsList[j].removeAttribute(attributes[k]);
|
|
166
|
+
elementsList[j].removeAttribute(attributes[k].trim());
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -606,7 +606,7 @@ var FormatPainterActions = /** @class */ (function () {
|
|
|
606
606
|
min = Math.min(openIndexArray[0], openIndexArray[1], openIndexArray[2]);
|
|
607
607
|
}
|
|
608
608
|
tagName = value.substring(0, min);
|
|
609
|
-
tagName.trim();
|
|
609
|
+
tagName = tagName.trim();
|
|
610
610
|
return ({
|
|
611
611
|
tag: tagName, styles: stylesList, classes: classList,
|
|
612
612
|
attributes: attributesList
|
|
@@ -463,7 +463,8 @@ var InsertHtml = /** @class */ (function () {
|
|
|
463
463
|
InsertHtml.findDetachEmptyElem = function (element) {
|
|
464
464
|
var removableElement;
|
|
465
465
|
if (!isNOU(element.parentElement)) {
|
|
466
|
-
if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true'
|
|
466
|
+
if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true' &&
|
|
467
|
+
isNOU(element.parentElement.querySelector('img'))) {
|
|
467
468
|
removableElement = this.findDetachEmptyElem(element.parentElement);
|
|
468
469
|
}
|
|
469
470
|
else {
|
|
@@ -14,10 +14,17 @@ var FormatPainter = /** @class */ (function () {
|
|
|
14
14
|
this.parent.on(events.keyDown, this.onKeyDown, this);
|
|
15
15
|
this.parent.on(events.destroy, this.destroy, this);
|
|
16
16
|
};
|
|
17
|
-
FormatPainter.prototype.toolbarClick = function (
|
|
18
|
-
this.isActive = true;
|
|
17
|
+
FormatPainter.prototype.toolbarClick = function (clickargs) {
|
|
19
18
|
this.parent.focusIn();
|
|
20
|
-
this.
|
|
19
|
+
if (!this.isSticky) {
|
|
20
|
+
this.isActive = true;
|
|
21
|
+
this.actionHandler(clickargs, 'click');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// Handling the format painter double click toolbar esape action
|
|
25
|
+
clickargs.args.action = 'escape';
|
|
26
|
+
this.actionHandler(clickargs, 'keyBoard');
|
|
27
|
+
}
|
|
21
28
|
};
|
|
22
29
|
FormatPainter.prototype.toolbarDoubleClick = function (args) {
|
|
23
30
|
this.isActive = true;
|
|
@@ -40,7 +40,8 @@ var XhtmlValidation = /** @class */ (function () {
|
|
|
40
40
|
|
|
41
41
|
*/
|
|
42
42
|
XhtmlValidation.prototype.selfEncloseValidation = function (currentValue, valueLength) {
|
|
43
|
-
if (valueLength === 0 && currentValue.indexOf('table') < 0 && currentValue.indexOf('img') < 0
|
|
43
|
+
if (valueLength === 0 && currentValue.indexOf('table') < 0 && currentValue.indexOf('img') < 0 &&
|
|
44
|
+
currentValue !== '<p><br></p>' && currentValue !== '<div><br></div>' && currentValue !== '<br>') {
|
|
44
45
|
var arrayValue = currentValue.split(' ');
|
|
45
46
|
arrayValue[arrayValue.length - 1] = '​' + arrayValue[arrayValue.length - 1];
|
|
46
47
|
currentValue = arrayValue.join('');
|
|
@@ -852,6 +852,9 @@ var Table = /** @class */ (function () {
|
|
|
852
852
|
var maxiumWidth;
|
|
853
853
|
var currentTdElement = this.curTable.closest('td');
|
|
854
854
|
var args = { event: e, requestType: 'table' };
|
|
855
|
+
var isRowCellsMerged = false;
|
|
856
|
+
var mergedCellIndex;
|
|
857
|
+
var mergedElement;
|
|
855
858
|
this.parent.trigger(events.onResize, args, function (resizingArgs) {
|
|
856
859
|
if (resizingArgs.cancel) {
|
|
857
860
|
_this.cancelResizeAction();
|
|
@@ -916,7 +919,8 @@ var Table = /** @class */ (function () {
|
|
|
916
919
|
var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare);
|
|
917
920
|
for (var i = 0; i < lastColumnsCell.length; i++) {
|
|
918
921
|
if (_this.curTable.rows[i].cells[_this.colIndex]) {
|
|
919
|
-
_this.curTable.rows[i].cells[_this.
|
|
922
|
+
_this.curTable.rows[i].cells[_this.curTable.rows[i].cells.length === _this.colIndex ?
|
|
923
|
+
_this.colIndex - 1 : _this.colIndex].style.width = (currentColumnCellWidth - differenceWidth) + '%';
|
|
920
924
|
}
|
|
921
925
|
}
|
|
922
926
|
}
|
|
@@ -927,19 +931,72 @@ var Table = /** @class */ (function () {
|
|
|
927
931
|
var totalwid = parseFloat(_this.columnEle.offsetWidth.toString()) +
|
|
928
932
|
parseFloat(cellColl[_this.colIndex - 1].offsetWidth.toString());
|
|
929
933
|
for (var i = 0; i < _this.curTable.rows.length; i++) {
|
|
930
|
-
|
|
934
|
+
var currentRow = _this.curTable.rows[i];
|
|
935
|
+
if ((totalwid - actualwid) > 20 && actualwid > 20) {
|
|
931
936
|
var leftColumnWidth = totalwid - actualwid;
|
|
932
937
|
var rightColWidth = actualwid;
|
|
933
|
-
var index =
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
938
|
+
var index = void 0;
|
|
939
|
+
var isMergedEleResize = false;
|
|
940
|
+
var leftTableCell = void 0;
|
|
941
|
+
var rightTableCell = void 0;
|
|
942
|
+
for (var j = 0; j < currentRow.cells.length; j++) {
|
|
943
|
+
if (currentRow.cells[j].hasAttribute('rowspan') && j <= _this.colIndex) {
|
|
944
|
+
isRowCellsMerged = true;
|
|
945
|
+
mergedCellIndex = i;
|
|
946
|
+
mergedElement = currentRow.cells[j];
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if (!isNOU(currentRow.cells[i]) && currentRow.cells[i].hasAttribute('colspan')) {
|
|
950
|
+
index = parseInt(currentRow.cells[i].getAttribute('colspan'), 10) - 1;
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
index = _this.colIndex;
|
|
954
|
+
}
|
|
955
|
+
if (isRowCellsMerged) {
|
|
956
|
+
var currentResizeRow = void 0;
|
|
957
|
+
if (currentRow.cells.length < cellColl.length) {
|
|
958
|
+
index = currentRow.cells.length === _this.colIndex ?
|
|
959
|
+
_this.colIndex - 1 : _this.colIndex - (_this.colIndex - 1);
|
|
960
|
+
currentResizeRow = _this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ?
|
|
961
|
+
mergedCellIndex : _this.colIndex - 1];
|
|
962
|
+
if (currentResizeRow && (currentResizeRow.cells[_this.colIndex - 1] === mergedElement ||
|
|
963
|
+
currentResizeRow.cells[currentResizeRow.cells.length - 1] === mergedElement)) {
|
|
964
|
+
isMergedEleResize = true;
|
|
965
|
+
}
|
|
966
|
+
else {
|
|
967
|
+
isMergedEleResize = false;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
else {
|
|
971
|
+
index = _this.colIndex;
|
|
972
|
+
}
|
|
973
|
+
leftTableCell = !isMergedEleResize ? currentRow.cells[index - 1] : (currentResizeRow &&
|
|
974
|
+
currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
|
|
975
|
+
currentResizeRow.cells[_this.colIndex - 1] : currentRow.cells[currentRow.cells.length - 1];
|
|
976
|
+
rightTableCell = !isMergedEleResize ? currentRow.cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
|
|
977
|
+
rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
|
|
978
|
+
currentRow.cells[index - 1] : currentResizeRow.cells[currentResizeRow.cells.length - 1];
|
|
979
|
+
}
|
|
980
|
+
if (!isNOU(currentRow.cells[index - 1]) && !isRowCellsMerged) {
|
|
981
|
+
currentRow.cells[index - 1].style.width =
|
|
937
982
|
_this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
938
983
|
}
|
|
939
|
-
|
|
940
|
-
|
|
984
|
+
else {
|
|
985
|
+
if (leftTableCell) {
|
|
986
|
+
leftTableCell.style.width =
|
|
987
|
+
_this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
if (!isNOU(currentRow.cells[index]) && !isRowCellsMerged) {
|
|
991
|
+
currentRow.cells[index].style.width =
|
|
941
992
|
_this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
942
993
|
}
|
|
994
|
+
else {
|
|
995
|
+
if (rightTableCell) {
|
|
996
|
+
rightTableCell.style.width =
|
|
997
|
+
_this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
998
|
+
}
|
|
999
|
+
}
|
|
943
1000
|
}
|
|
944
1001
|
}
|
|
945
1002
|
}
|
|
@@ -963,8 +1020,8 @@ var Table = /** @class */ (function () {
|
|
|
963
1020
|
EventHandler.remove(_this.contentModule.getEditPanel(), 'mouseover', _this.resizeHelper);
|
|
964
1021
|
}
|
|
965
1022
|
if (currentTdElement) {
|
|
966
|
-
|
|
967
|
-
|
|
1023
|
+
var tableBoxPosition = _this.curTable.getBoundingClientRect().left
|
|
1024
|
+
- currentTdElement.getBoundingClientRect().left;
|
|
968
1025
|
maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
|
|
969
1026
|
_this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
970
1027
|
}
|