@syncfusion/ej2-richtexteditor 22.2.5 → 22.2.9
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 +12 -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 +26 -4
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +26 -4
- 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 +11 -11
- package/src/editor-manager/base/constant.js +1 -1
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +20 -0
- package/src/rich-text-editor/actions/html-editor.js +3 -2
- package/src/rich-text-editor/base/interface.d.ts +7 -0
- package/src/rich-text-editor/base/rich-text-editor.js +2 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.2.
|
|
3
|
+
* version : 22.2.9
|
|
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@22.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@22.2.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-JD2rI4AXswHa0DJrFyCzhSMhCDLfixX6gyKis6hc0mBOTWXWMz7oMOLhTQeZ2MogDzr43av+HCSUk6GKF9ENgQ==",
|
|
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-22.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-22.2.5.tgz",
|
|
30
|
+
"_shasum": "fd9b305e9dcde612739e66a6accb774688e89e50",
|
|
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.2.
|
|
42
|
-
"@syncfusion/ej2-buttons": "~22.2.
|
|
41
|
+
"@syncfusion/ej2-base": "~22.2.9",
|
|
42
|
+
"@syncfusion/ej2-buttons": "~22.2.9",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~22.2.5",
|
|
44
|
-
"@syncfusion/ej2-inputs": "~22.2.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~22.2.
|
|
46
|
-
"@syncfusion/ej2-popups": "~22.2.
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~22.2.
|
|
44
|
+
"@syncfusion/ej2-inputs": "~22.2.9",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~22.2.8",
|
|
46
|
+
"@syncfusion/ej2-popups": "~22.2.9",
|
|
47
|
+
"@syncfusion/ej2-splitbuttons": "~22.2.8"
|
|
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.2.
|
|
73
|
+
"version": "22.2.9",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -86,4 +86,4 @@ export var CLEAR_TYPE = 'clear-type';
|
|
|
86
86
|
*
|
|
87
87
|
* @hidden
|
|
88
88
|
*/
|
|
89
|
-
export var SELF_CLOSING_TAGS = ['area', 'base', 'br', 'embed', 'hr', 'img', 'input', 'param', 'source', 'track', 'wbr', 'iframe', 'td'];
|
|
89
|
+
export var SELF_CLOSING_TAGS = ['area', 'base', 'br', 'embed', 'hr', 'img', 'input', 'param', 'source', 'track', 'wbr', 'iframe', 'td', 'table'];
|
|
@@ -14,6 +14,7 @@ export declare class InsertHtml {
|
|
|
14
14
|
static inlineNode: string[];
|
|
15
15
|
static contentsDeleted: boolean;
|
|
16
16
|
static Insert(docElement: Document, insertNode: Node | string, editNode?: Element, isExternal?: boolean, enterAction?: string): void;
|
|
17
|
+
private static findFirstTextNode;
|
|
17
18
|
private static pasteInsertHTML;
|
|
18
19
|
private static placeCursorEnd;
|
|
19
20
|
private static getNodeCollection;
|
|
@@ -40,6 +40,14 @@ var InsertHtml = /** @class */ (function () {
|
|
|
40
40
|
nodeSelection.setSelectionText(docElement, range.startContainer.children[0], range.startContainer.children[0], 0, 0);
|
|
41
41
|
range = nodeSelection.getRange(docElement);
|
|
42
42
|
}
|
|
43
|
+
if (range.startContainer === editNode && range.startContainer === range.endContainer && range.startOffset === 0 &&
|
|
44
|
+
range.startOffset === range.endOffset && editNode.textContent.trim().length > 0) {
|
|
45
|
+
var focusNode = this.findFirstTextNode(range.startContainer);
|
|
46
|
+
if (!isNOU(focusNode)) {
|
|
47
|
+
nodeSelection.setSelectionText(docElement, focusNode, focusNode, 0, 0);
|
|
48
|
+
range = nodeSelection.getRange(docElement);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
43
51
|
if (range.startContainer.nodeName === 'BR' && range.startOffset === 0 && range.startOffset === range.endOffset &&
|
|
44
52
|
range.startContainer === range.endContainer) {
|
|
45
53
|
var currentIndex = Array.prototype.slice.call(range.startContainer.parentElement.childNodes).indexOf(range.startContainer);
|
|
@@ -167,6 +175,18 @@ var InsertHtml = /** @class */ (function () {
|
|
|
167
175
|
}
|
|
168
176
|
}
|
|
169
177
|
};
|
|
178
|
+
InsertHtml.findFirstTextNode = function (node) {
|
|
179
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
180
|
+
return node;
|
|
181
|
+
}
|
|
182
|
+
for (var i = 0; i < node.childNodes.length; i++) {
|
|
183
|
+
var textNode = this.findFirstTextNode(node.childNodes[i]);
|
|
184
|
+
if (!isNOU(textNode)) {
|
|
185
|
+
return textNode;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
189
|
+
};
|
|
170
190
|
InsertHtml.pasteInsertHTML = function (nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction) {
|
|
171
191
|
var isCursor = range.startOffset === range.endOffset &&
|
|
172
192
|
range.startContainer === range.endContainer;
|
|
@@ -304,8 +304,9 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
304
304
|
currentRange.startContainer.parentElement.tagName !== 'TD' && currentRange.startContainer.parentElement.tagName !== 'TH' &&
|
|
305
305
|
isPreviousNotContentEditable) {
|
|
306
306
|
var checkNode = currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer;
|
|
307
|
-
if (!this.parent.formatter.editorManager.domNode.isBlockNode(checkNode) &&
|
|
308
|
-
!isNOU(checkNode.previousSibling) && checkNode.previousSibling.nodeName === 'BR')
|
|
307
|
+
if ((!this.parent.formatter.editorManager.domNode.isBlockNode(checkNode) &&
|
|
308
|
+
!isNOU(checkNode.previousSibling) && checkNode.previousSibling.nodeName === 'BR') ||
|
|
309
|
+
(!isNOU(currentRange.startContainer.previousSibling) && currentRange.startContainer.previousSibling.nodeName === 'BR')) {
|
|
309
310
|
return;
|
|
310
311
|
}
|
|
311
312
|
this.rangeElement = this.getRootBlockNode(currentRange.startContainer);
|
|
@@ -802,6 +802,13 @@ export interface IQuickToolbarOptions {
|
|
|
802
802
|
toolbarItems: (string | IToolbarItems)[];
|
|
803
803
|
cssClass: string;
|
|
804
804
|
}
|
|
805
|
+
/**
|
|
806
|
+
|
|
807
|
+
*/
|
|
808
|
+
export interface IPositionChanged {
|
|
809
|
+
x: Boolean;
|
|
810
|
+
y: Boolean;
|
|
811
|
+
}
|
|
805
812
|
/**
|
|
806
813
|
* Provides information about a BeforeQuickToolbarOpen event.
|
|
807
814
|
*/
|
|
@@ -1544,9 +1544,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1544
1544
|
if (!initial) {
|
|
1545
1545
|
if (this.readonly && this.enabled) {
|
|
1546
1546
|
this.unbindEvents();
|
|
1547
|
+
this.unWireEvents();
|
|
1547
1548
|
}
|
|
1548
1549
|
else if (this.enabled) {
|
|
1549
|
-
this.
|
|
1550
|
+
this.wireEvents();
|
|
1550
1551
|
}
|
|
1551
1552
|
}
|
|
1552
1553
|
};
|