@syncfusion/ej2-richtexteditor 20.4.51 → 20.4.52
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 +16 -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 +30 -12
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +28 -10
- 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 +8 -8
- package/src/editor-manager/plugin/ms-word-clean-up.js +4 -1
- package/src/editor-manager/plugin/toolbar-status.js +6 -2
- package/src/rich-text-editor/actions/enter-key.js +9 -2
- package/src/rich-text-editor/base/rich-text-editor.js +3 -1
- package/src/rich-text-editor/renderer/table-module.js +6 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.4.
|
|
3
|
+
* version : 20.4.52
|
|
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.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@20.4.51",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-KrCoVlwCvqCiQPFS/bTRaCsH8WAyiBTtWkbBRRLLxCXtjyUKz8X3XIOcSmekQFzmMGcvwXHPwqTfKUMBQs+mAQ==",
|
|
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-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.4.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.4.51.tgz",
|
|
30
|
+
"_shasum": "5a1cdfcc714424ed059b501d2c0eaa46d0b2c172",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@syncfusion/ej2-base": "~20.4.51",
|
|
42
42
|
"@syncfusion/ej2-buttons": "~20.4.50",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~20.4.51",
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.4.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~20.4.
|
|
46
|
-
"@syncfusion/ej2-popups": "~20.4.
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.4.52",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.4.52",
|
|
46
|
+
"@syncfusion/ej2-popups": "~20.4.52",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~20.4.50"
|
|
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.4.
|
|
73
|
+
"version": "20.4.52",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -120,7 +120,10 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
120
120
|
this.checkVShape(elm);
|
|
121
121
|
var imgElem = elm.querySelectorAll('img');
|
|
122
122
|
for (var i = 0; i < imgElem.length; i++) {
|
|
123
|
-
if (!isNOU(imgElem[i].getAttribute('v:shapes')) &&
|
|
123
|
+
if (!isNOU(imgElem[i].getAttribute('v:shapes')) &&
|
|
124
|
+
imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 &&
|
|
125
|
+
imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
|
|
126
|
+
imgElem[i].getAttribute('v:shapes').indexOf('Image') < 0) {
|
|
124
127
|
detach(imgElem[i]);
|
|
125
128
|
}
|
|
126
129
|
}
|
|
@@ -156,7 +156,7 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
156
156
|
formatCollection.fontname = this.isFontName(docElement, node, fontName);
|
|
157
157
|
}
|
|
158
158
|
if (!formatCollection.fontsize) {
|
|
159
|
-
formatCollection.fontsize = this.isFontSize(node, fontSize);
|
|
159
|
+
formatCollection.fontsize = this.isFontSize(docElement, node, fontSize);
|
|
160
160
|
}
|
|
161
161
|
if (!formatCollection.backgroundcolor) {
|
|
162
162
|
formatCollection.backgroundcolor = this.isBackgroundColor(node);
|
|
@@ -216,8 +216,12 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
216
216
|
return null;
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
-
ToolbarStatus.isFontSize = function (node, fontSize) {
|
|
219
|
+
ToolbarStatus.isFontSize = function (docElement, node, fontSize) {
|
|
220
220
|
var size = node.style && node.style.fontSize;
|
|
221
|
+
if ((size === null || size === undefined || size === '') && node.nodeType !== 3 &&
|
|
222
|
+
node.parentElement.classList.contains('e-content')) {
|
|
223
|
+
size = this.getComputedStyle(docElement, node, 'font-size');
|
|
224
|
+
}
|
|
221
225
|
if ((size !== null && size !== '' && size !== undefined)
|
|
222
226
|
&& (fontSize === null || fontSize === undefined || (fontSize.indexOf(size) > -1))) {
|
|
223
227
|
return size;
|
|
@@ -340,7 +340,8 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
340
340
|
_this.removeBRElement(currentParent);
|
|
341
341
|
var isEmptyBrInserted = false;
|
|
342
342
|
var currentParentLastChild = currentParent.lastChild;
|
|
343
|
-
while (!isNOU(currentParentLastChild) && !(currentParentLastChild.nodeName === '#text' || currentParentLastChild.nodeName === 'BR'
|
|
343
|
+
while (!isNOU(currentParentLastChild) && !(currentParentLastChild.nodeName === '#text' || currentParentLastChild.nodeName === 'BR'
|
|
344
|
+
|| currentParentLastChild.nodeName === 'IMG')) {
|
|
344
345
|
currentParentLastChild = currentParentLastChild.lastChild;
|
|
345
346
|
}
|
|
346
347
|
var isLastNodeLength = _this.range.startContainer === currentParentLastChild ?
|
|
@@ -348,7 +349,8 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
348
349
|
if (currentParent !== _this.parent.inputElement &&
|
|
349
350
|
_this.parent.formatter.editorManager.domNode.isBlockNode(currentParent) &&
|
|
350
351
|
_this.range.startOffset === _this.range.endOffset &&
|
|
351
|
-
_this.range.startOffset === isLastNodeLength
|
|
352
|
+
(_this.range.startOffset === isLastNodeLength ||
|
|
353
|
+
(currentParent.textContent.trim().length === 0 && currentParent.lastChild.nodeName === 'IMG'))) {
|
|
352
354
|
var focusBRElem = _this.parent.createElement('br');
|
|
353
355
|
if (_this.range.startOffset === 0 && _this.range.startContainer.nodeName === 'TABLE') {
|
|
354
356
|
_this.range.startContainer.parentElement.insertBefore(focusBRElem, _this.range.startContainer);
|
|
@@ -357,6 +359,11 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
357
359
|
if (currentParentLastChild.nodeName === 'BR' && currentParent.textContent.length === 0) {
|
|
358
360
|
_this.parent.formatter.editorManager.domNode.insertAfter(focusBRElem, currentParentLastChild);
|
|
359
361
|
}
|
|
362
|
+
else if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
|
|
363
|
+
currentParent.lastChild && currentParent.lastChild.nodeName === 'IMG') {
|
|
364
|
+
currentParentLastChild.parentElement.insertBefore(focusBRElem, currentParentLastChild);
|
|
365
|
+
focusBRElem = currentParentLastChild;
|
|
366
|
+
}
|
|
360
367
|
else {
|
|
361
368
|
var lineBreakBRElem = _this.parent.createElement('br');
|
|
362
369
|
_this.parent.formatter.editorManager.domNode.insertAfter(focusBRElem, _this.range.startContainer);
|
|
@@ -2004,7 +2004,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2004
2004
|
this.notify(events.windowResize, null);
|
|
2005
2005
|
};
|
|
2006
2006
|
RichTextEditor.prototype.scrollHandler = function (e) {
|
|
2007
|
-
this.
|
|
2007
|
+
if (this.element) {
|
|
2008
|
+
this.notify(events.scroll, { args: e });
|
|
2009
|
+
}
|
|
2008
2010
|
};
|
|
2009
2011
|
RichTextEditor.prototype.contentScrollHandler = function (e) {
|
|
2010
2012
|
this.notify(events.contentscroll, { args: e });
|
|
@@ -916,12 +916,14 @@ var Table = /** @class */ (function () {
|
|
|
916
916
|
if ((totalwid - actualwid) > 20 && actualwid > 20) {
|
|
917
917
|
var leftColumnWidth = totalwid - actualwid;
|
|
918
918
|
var rightColWidth = actualwid;
|
|
919
|
-
|
|
920
|
-
_this.curTable.rows[i].cells[
|
|
919
|
+
var index = _this.curTable.rows[i].cells[i].hasAttribute('colspan') ?
|
|
920
|
+
parseInt(_this.curTable.rows[i].cells[i].getAttribute('colspan'), 10) - 1 : _this.colIndex;
|
|
921
|
+
if (!isNOU(_this.curTable.rows[i].cells[index - 1])) {
|
|
922
|
+
_this.curTable.rows[i].cells[index - 1].style.width =
|
|
921
923
|
_this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
922
924
|
}
|
|
923
|
-
if (!isNOU(_this.curTable.rows[i].cells[
|
|
924
|
-
_this.curTable.rows[i].cells[
|
|
925
|
+
if (!isNOU(_this.curTable.rows[i].cells[index])) {
|
|
926
|
+
_this.curTable.rows[i].cells[index].style.width =
|
|
925
927
|
_this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
926
928
|
}
|
|
927
929
|
}
|