@syncfusion/ej2-richtexteditor 20.1.47 → 20.1.48
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 +14 -0
- 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 +32 -8
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +31 -7
- 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/base/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/plugin/inserthtml.js +1 -3
- package/src/editor-manager/plugin/lists.js +4 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +6 -0
- package/src/rich-text-editor/actions/html-editor.js +2 -2
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +11 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.1.
|
|
3
|
+
* version : 20.1.48
|
|
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@20.1.47",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-+JqSmzz8uh/Xuf7mVptZllX9DZbzfOt9enpA9JftvQiFGKQVDeZwRW2J9qrdtumUBBMmbasVPWkvpMMoLy7w2g==",
|
|
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-
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.1.47.tgz",
|
|
30
|
+
"_shasum": "7d854e478b53c30642348539aa9a389c4df071f9",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~20.1.
|
|
41
|
+
"@syncfusion/ej2-base": "~20.1.48",
|
|
42
42
|
"@syncfusion/ej2-buttons": "~20.1.47",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~20.1.47",
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.1.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~20.1.
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.1.48",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.1.48",
|
|
46
46
|
"@syncfusion/ej2-popups": "~20.1.47",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~20.1.47"
|
|
48
48
|
},
|
|
@@ -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.1.
|
|
73
|
+
"version": "20.1.48",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -79,3 +79,9 @@ export var INSERT_TEXT_TYPE = 'insert-text-type';
|
|
|
79
79
|
* @hidden
|
|
80
80
|
*/
|
|
81
81
|
export var CLEAR_TYPE = 'clear-type';
|
|
82
|
+
/**
|
|
83
|
+
* Self closing tags
|
|
84
|
+
*
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
export var SELF_CLOSING_TAGS = ['area', 'base', 'br', 'embed', 'hr', 'img', 'input', 'param', 'source', 'track', 'wbr', 'iframe', 'td'];
|
|
@@ -437,9 +437,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
437
437
|
InsertHtml.removeEmptyElements = function (element) {
|
|
438
438
|
var emptyElements = element.querySelectorAll(':empty');
|
|
439
439
|
for (var i = 0; i < emptyElements.length; i++) {
|
|
440
|
-
if (emptyElements[i].tagName
|
|
441
|
-
emptyElements[i].tagName !== 'IFRAME' && emptyElements[i].tagName !== 'TD' &&
|
|
442
|
-
emptyElements[i].tagName !== 'SOURCE' && emptyElements[i].tagName !== 'HR') {
|
|
440
|
+
if (CONSTANT.SELF_CLOSING_TAGS.indexOf(emptyElements[i].tagName.toLowerCase()) < 0) {
|
|
443
441
|
var detachableElement = this.findDetachEmptyElem(emptyElements[i]);
|
|
444
442
|
if (!isNOU(detachableElement)) {
|
|
445
443
|
detach(detachableElement);
|
|
@@ -140,6 +140,10 @@ var Lists = /** @class */ (function () {
|
|
|
140
140
|
(startNode.textContent.length === 1 && startNode.textContent.charCodeAt(0) === 8203))) {
|
|
141
141
|
startNode.textContent = '';
|
|
142
142
|
}
|
|
143
|
+
if (startNode === endNode && startNode.tagName === 'LI' && startNode.textContent.length === 0 &&
|
|
144
|
+
isNOU(startNode.previousElementSibling)) {
|
|
145
|
+
startNode.removeAttribute('style');
|
|
146
|
+
}
|
|
143
147
|
if (startNode === endNode && startNode.textContent === '') {
|
|
144
148
|
if (startNode.parentElement.tagName === 'LI' && endNode.parentElement.tagName === 'LI') {
|
|
145
149
|
detach(startNode);
|
|
@@ -110,6 +110,12 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
110
110
|
MsWordPaste.prototype.imageConversion = function (elm, rtfData) {
|
|
111
111
|
this.checkVShape(elm);
|
|
112
112
|
var imgElem = elm.querySelectorAll('img');
|
|
113
|
+
for (var i = 0; i < imgElem.length; i++) {
|
|
114
|
+
if (!isNOU(imgElem[i].getAttribute('v:shapes')) && imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0) {
|
|
115
|
+
detach(imgElem[i]);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
imgElem = elm.querySelectorAll('img');
|
|
113
119
|
var imgSrc = [];
|
|
114
120
|
var base64Src = [];
|
|
115
121
|
var imgName = [];
|
|
@@ -246,8 +246,8 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
else if (this.rangeElement
|
|
250
|
-
this.rangeElement.previousElementSibling.tagName === 'TABLE')) {
|
|
249
|
+
else if (this.rangeElement === this.parent.inputElement || this.rangeElement.tagName === 'TABLE' ||
|
|
250
|
+
(!isNullOrUndefined(this.rangeElement.previousElementSibling) && this.rangeElement.previousElementSibling.tagName === 'TABLE')) {
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
else {
|
|
@@ -77,7 +77,9 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
77
77
|
this.containsHtml = htmlRegex.test(value);
|
|
78
78
|
var file = e && e.args.clipboardData &&
|
|
79
79
|
e.args.clipboardData.items.length > 0 ?
|
|
80
|
-
e.args.clipboardData.items[0].getAsFile()
|
|
80
|
+
(e.args.clipboardData.items[0].getAsFile() === null ?
|
|
81
|
+
(!isNOU(e.args.clipboardData.items[1]) ? e.args.clipboardData.items[1].getAsFile() : null) :
|
|
82
|
+
e.args.clipboardData.items[0].getAsFile()) : null;
|
|
81
83
|
this.parent.notify(events.paste, {
|
|
82
84
|
file: file,
|
|
83
85
|
args: e.args,
|
|
@@ -558,6 +560,13 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
558
560
|
detach(rteDialogWrapper.children[0]);
|
|
559
561
|
}
|
|
560
562
|
};
|
|
563
|
+
PasteCleanup.prototype.cleanAppleClass = function (elem) {
|
|
564
|
+
var appleClassElem = elem.querySelectorAll('br.Apple-interchange-newline');
|
|
565
|
+
for (var i = 0; i < appleClassElem.length; i++) {
|
|
566
|
+
detach(appleClassElem[i]);
|
|
567
|
+
}
|
|
568
|
+
return elem;
|
|
569
|
+
};
|
|
561
570
|
PasteCleanup.prototype.formatting = function (value, clean, args) {
|
|
562
571
|
var _this = this;
|
|
563
572
|
var clipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
@@ -565,6 +574,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
565
574
|
value = this.splitBreakLine(value);
|
|
566
575
|
}
|
|
567
576
|
clipBoardElem.innerHTML = value;
|
|
577
|
+
clipBoardElem = this.cleanAppleClass(clipBoardElem);
|
|
568
578
|
if (this.parent.pasteCleanupSettings.deniedTags !== null) {
|
|
569
579
|
clipBoardElem = this.deniedTags(clipBoardElem);
|
|
570
580
|
}
|