@syncfusion/ej2-richtexteditor 19.4.54 → 19.4.55
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.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +35 -9
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +33 -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 +7 -7
- package/src/editor-manager/plugin/image.js +6 -1
- package/src/editor-manager/plugin/link.js +5 -0
- package/src/editor-manager/plugin/lists.js +8 -0
- package/src/editor-manager/plugin/selection-commands.js +8 -2
- package/src/rich-text-editor/actions/html-editor.js +3 -1
- package/src/rich-text-editor/renderer/image-module.js +2 -2
- package/src/rich-text-editor/renderer/table-module.js +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.4.
|
|
3
|
+
* version : 19.4.55
|
|
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@19.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@19.4.54",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-E70Pq8AxDcCeqVsy3fVzowvlB2+hDCyW3MUz4uUZclwpVisLIjWm9otu8fNK3bhw6HBUkAqGSx3BxRAFMzlfUQ==",
|
|
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-19.4.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-19.4.54.tgz",
|
|
30
|
+
"_shasum": "ddaef5ddb9d9ec7598dfc300179180bd1fcbe491",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@syncfusion/ej2-base": "~19.4.52",
|
|
42
|
-
"@syncfusion/ej2-buttons": "~19.4.
|
|
42
|
+
"@syncfusion/ej2-buttons": "~19.4.55",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~19.4.52",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~19.4.52",
|
|
45
|
-
"@syncfusion/ej2-navigations": "~19.4.
|
|
45
|
+
"@syncfusion/ej2-navigations": "~19.4.55",
|
|
46
46
|
"@syncfusion/ej2-popups": "~19.4.53",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~19.4.52"
|
|
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": "19.4.
|
|
73
|
+
"version": "19.4.55",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -218,7 +218,12 @@ var ImageCommand = /** @class */ (function () {
|
|
|
218
218
|
ImageCommand.prototype.removeImage = function (e) {
|
|
219
219
|
if (closest(e.item.selectNode[0], 'a')) {
|
|
220
220
|
if (e.item.selectNode[0].parentElement.nodeName === 'A' && !isNOU(e.item.selectNode[0].parentElement.innerText)) {
|
|
221
|
-
|
|
221
|
+
if (!isNOU(closest(e.item.selectNode[0], '.' + classes.CLASS_CAPTION))) {
|
|
222
|
+
detach(closest(e.item.selectNode[0], '.' + classes.CLASS_CAPTION));
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
detach(e.item.selectNode[0]);
|
|
226
|
+
}
|
|
222
227
|
}
|
|
223
228
|
else {
|
|
224
229
|
detach(closest(e.item.selectNode[0], 'a'));
|
|
@@ -74,6 +74,11 @@ var LinkCommand = /** @class */ (function () {
|
|
|
74
74
|
else {
|
|
75
75
|
var domSelection = new NodeSelection();
|
|
76
76
|
var range = domSelection.getRange(this.parent.currentDocument);
|
|
77
|
+
if (range.endContainer.nodeName === '#text' && range.startContainer.textContent.length === (range.endOffset + 1) &&
|
|
78
|
+
range.endContainer.textContent.charAt(range.endOffset) === ' ' && range.endContainer.nextSibling.nodeName === 'A') {
|
|
79
|
+
domSelection.setSelectionText(this.parent.currentDocument, range.startContainer, range.endContainer, range.startOffset, range.endOffset + 1);
|
|
80
|
+
range = domSelection.getRange(this.parent.currentDocument);
|
|
81
|
+
}
|
|
77
82
|
var text = isNOU(e.item.text) ? true : e.item.text.replace(/ /g, '').localeCompare(range.toString()
|
|
78
83
|
.replace(/\n/g, ' ').replace(/ /g, '')) < 0;
|
|
79
84
|
if (e.event && e.event.type === 'keydown' && (e.event.keyCode === 32
|
|
@@ -407,6 +407,14 @@ var Lists = /** @class */ (function () {
|
|
|
407
407
|
};
|
|
408
408
|
Lists.prototype.applyListsHandler = function (e) {
|
|
409
409
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
410
|
+
if (range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
411
|
+
range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
412
|
+
this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName != 'TABLE' &&
|
|
413
|
+
this.parent.editableElement.childNodes[0].nodeName != 'IMG')) {
|
|
414
|
+
var focusNode = range.startContainer.childNodes[0];
|
|
415
|
+
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, focusNode, focusNode, 0, 0);
|
|
416
|
+
range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
417
|
+
}
|
|
410
418
|
this.saveSelection = this.parent.nodeSelection.save(range, this.parent.currentDocument);
|
|
411
419
|
this.currentAction = e.subCommand;
|
|
412
420
|
this.currentAction = e.subCommand = this.currentAction === 'NumberFormatList' ? 'OL' : this.currentAction === 'BulletFormatList' ? 'UL' : this.currentAction;
|
|
@@ -110,6 +110,7 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
110
110
|
};
|
|
111
111
|
SelectionCommands.insertCursorNode = function (docElement, domSelection, range, isFormatted, nodeCutter, format, value, endNode) {
|
|
112
112
|
var cursorNodes = domSelection.getNodeCollection(range);
|
|
113
|
+
var domNode = new DOMNode(endNode, docElement);
|
|
113
114
|
var cursorFormat = (cursorNodes.length > 0) ?
|
|
114
115
|
(cursorNodes.length > 1 && range.startContainer === range.endContainer) ?
|
|
115
116
|
this.getCursorFormat(isFormatted, cursorNodes, format, endNode) :
|
|
@@ -117,12 +118,17 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
117
118
|
var cursorNode = null;
|
|
118
119
|
if (cursorFormat) {
|
|
119
120
|
cursorNode = cursorNodes[0];
|
|
120
|
-
if (cursorFormat.firstChild.textContent.charCodeAt(0) === 8203) {
|
|
121
|
+
if (cursorFormat.firstChild.textContent.charCodeAt(0) === 8203 && cursorFormat.firstChild.nodeType === 3) {
|
|
121
122
|
var isCursorEqual = false;
|
|
122
123
|
var regEx = new RegExp(String.fromCharCode(8203), 'g');
|
|
123
124
|
var emptySpaceNode = void 0;
|
|
124
125
|
if (cursorFormat.firstChild === cursorNode) {
|
|
125
|
-
cursorNode.textContent =
|
|
126
|
+
cursorNode.textContent = (cursorFormat.parentElement && (domNode.isBlockNode(cursorFormat.parentElement) &&
|
|
127
|
+
cursorFormat.parentElement.textContent.length <= 1 ? cursorFormat.parentElement.childElementCount > 1 :
|
|
128
|
+
cursorFormat.childElementCount === 0) &&
|
|
129
|
+
(cursorFormat.parentElement.textContent.length > 1 ||
|
|
130
|
+
cursorFormat.parentElement.firstChild && cursorFormat.parentElement.firstChild.nodeType === 1) ?
|
|
131
|
+
cursorNode.textContent : cursorNode.textContent.replace(regEx, ''));
|
|
126
132
|
emptySpaceNode = cursorNode;
|
|
127
133
|
isCursorEqual = true;
|
|
128
134
|
}
|
|
@@ -106,7 +106,9 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
106
106
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), range.startContainer, pointer);
|
|
107
107
|
}
|
|
108
108
|
if (!isNOU(range.startContainer.previousSibling) && !isNOU(range.startContainer.previousSibling.parentElement) &&
|
|
109
|
-
range.startContainer.parentElement === range.startContainer.previousSibling.parentElement &&
|
|
109
|
+
range.startContainer.parentElement === range.startContainer.previousSibling.parentElement &&
|
|
110
|
+
range.startContainer.previousSibling.textContent.charCodeAt(0) === 8203 &&
|
|
111
|
+
range.startContainer.previousSibling.textContent.length <= 1) {
|
|
110
112
|
range.startContainer.previousSibling.textContent = range.startContainer.previousSibling.textContent.replace(regEx, '');
|
|
111
113
|
}
|
|
112
114
|
if (range.endContainer.textContent.charCodeAt(range.endOffset) === 8203) {
|
|
@@ -1846,7 +1846,8 @@ var Image = /** @class */ (function () {
|
|
|
1846
1846
|
if (activePopupElement) {
|
|
1847
1847
|
activePopupElement.classList.add(classes.CLS_HIDE);
|
|
1848
1848
|
}
|
|
1849
|
-
|
|
1849
|
+
var imgElement = this.parent.inputElement.ownerDocument.querySelector('.' + classes.CLS_RTE_DRAG_IMAGE);
|
|
1850
|
+
if (e.dataTransfer.files.length > 0 && imgElement === null) { //For external image drag and drop
|
|
1850
1851
|
if (e.dataTransfer.files.length > 1) {
|
|
1851
1852
|
return;
|
|
1852
1853
|
}
|
|
@@ -1869,7 +1870,6 @@ var Image = /** @class */ (function () {
|
|
|
1869
1870
|
}
|
|
1870
1871
|
else { //For internal image drag and drop
|
|
1871
1872
|
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
1872
|
-
var imgElement = this.parent.inputElement.ownerDocument.querySelector('.' + classes.CLS_RTE_DRAG_IMAGE);
|
|
1873
1873
|
if (imgElement && imgElement.tagName === 'IMG') {
|
|
1874
1874
|
if (imgElement.nextElementSibling) {
|
|
1875
1875
|
if (imgElement.nextElementSibling.classList.contains(classes.CLS_IMG_INNER)) {
|
|
@@ -511,7 +511,7 @@ var Table = /** @class */ (function () {
|
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
513
|
var target = e.target || e.targetTouches[0].target;
|
|
514
|
-
var closestTable = closest(target, 'table');
|
|
514
|
+
var closestTable = closest(target, 'table.e-rte-table');
|
|
515
515
|
if (!isNOU(this.curTable) && !isNOU(closestTable) && closestTable !== this.curTable) {
|
|
516
516
|
this.removeResizeElement();
|
|
517
517
|
this.removeHelper(e);
|