@syncfusion/ej2-richtexteditor 18.4.39 → 18.4.42-70943
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 +782 -728
- package/README.md +67 -67
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +249 -145
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +371 -267
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/license +9 -9
- package/package.json +76 -75
- package/src/common/interface.d.ts +6 -6
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +3 -3
- package/src/editor-manager/base/interface.d.ts +7 -7
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +1 -1
- package/src/editor-manager/plugin/dom-node.d.ts +34 -34
- package/src/editor-manager/plugin/dom-node.js +34 -34
- package/src/editor-manager/plugin/formats.d.ts +2 -2
- package/src/editor-manager/plugin/formats.js +2 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +5 -4
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +2 -2
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml.js +16 -12
- package/src/editor-manager/plugin/isformatted.d.ts +8 -8
- package/src/editor-manager/plugin/isformatted.js +8 -8
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +8 -8
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +8 -4
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +23 -7
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -1
- package/src/editor-manager/plugin/selection-commands.js +35 -4
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -2
- package/src/editor-manager/plugin/table.js +4 -3
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +2 -2
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +6 -6
- package/src/global.d.ts +1 -0
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +2 -2
- package/src/markdown-parser/plugin/md-selection-formats.js +2 -2
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +2 -2
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -3
- package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
- package/src/rich-text-editor/actions/html-editor.js +3 -3
- package/src/rich-text-editor/actions/keyboard-model.d.ts +13 -13
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +22 -21
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +2 -2
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -1
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/classes.d.ts +103 -103
- package/src/rich-text-editor/base/classes.js +103 -103
- package/src/rich-text-editor/base/constant.d.ts +112 -107
- package/src/rich-text-editor/base/constant.js +112 -107
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +40 -40
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +701 -701
- package/src/rich-text-editor/base/rich-text-editor.d.ts +51 -51
- package/src/rich-text-editor/base/rich-text-editor.js +88 -66
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +1 -1
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +8 -8
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/iframe-settings-model.d.ts +21 -21
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +9 -9
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +328 -328
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
- package/src/rich-text-editor/renderer/image-module.d.ts +2 -1
- package/src/rich-text-editor/renderer/image-module.js +21 -7
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +1 -1
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +7 -2
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +8 -8
- package/src/rich-text-editor/renderer/toolbar-renderer.js +8 -8
- package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
- package/src/rich-text-editor/renderer/view-source.js +6 -6
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +22 -22
- package/src/selection/selection.js +22 -22
- package/styles/_all.scss +2 -2
- package/styles/bootstrap-dark.css +13 -1
- package/styles/bootstrap.css +13 -1
- package/styles/bootstrap4.css +13 -1
- package/styles/bootstrap5-dark.css +0 -0
- package/styles/bootstrap5-dark.scss +0 -0
- package/styles/bootstrap5.css +0 -0
- package/styles/bootstrap5.scss +0 -0
- package/styles/fabric-dark.css +13 -1
- package/styles/fabric.css +13 -1
- package/styles/highcontrast-light.css +13 -1
- package/styles/highcontrast.css +13 -1
- package/styles/material-dark.css +13 -1
- package/styles/material.css +13 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +151 -151
- package/styles/rich-text-editor/_bootstrap-definition.scss +184 -184
- package/styles/rich-text-editor/_bootstrap4-definition.scss +307 -307
- package/styles/rich-text-editor/_fabric-dark-definition.scss +150 -150
- package/styles/rich-text-editor/_fabric-definition.scss +148 -148
- package/styles/rich-text-editor/_highcontrast-definition.scss +148 -148
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +148 -148
- package/styles/rich-text-editor/_layout.scss +1416 -1404
- package/styles/rich-text-editor/_material-dark-definition.scss +151 -151
- package/styles/rich-text-editor/_material-definition.scss +150 -150
- package/styles/rich-text-editor/_theme.scss +499 -499
- package/styles/rich-text-editor/bootstrap-dark.css +13 -1
- package/styles/rich-text-editor/bootstrap.css +13 -1
- package/styles/rich-text-editor/bootstrap4.css +13 -1
- package/styles/rich-text-editor/fabric-dark.css +13 -1
- package/styles/rich-text-editor/fabric.css +13 -1
- package/styles/rich-text-editor/highcontrast-light.css +13 -1
- package/styles/rich-text-editor/highcontrast.css +13 -1
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +289 -289
- package/styles/rich-text-editor/icons/_bootstrap.scss +288 -288
- package/styles/rich-text-editor/icons/_bootstrap4.scss +288 -288
- package/styles/rich-text-editor/icons/_fabric-dark.scss +288 -288
- package/styles/rich-text-editor/icons/_fabric.scss +288 -288
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +288 -288
- package/styles/rich-text-editor/icons/_highcontrast.scss +288 -288
- package/styles/rich-text-editor/icons/_material-dark.scss +288 -288
- package/styles/rich-text-editor/icons/_material.scss +288 -288
- package/styles/rich-text-editor/material-dark.css +13 -1
- package/styles/rich-text-editor/material.css +13 -1
- package/styles/tailwind-dark.css +0 -0
- package/styles/tailwind-dark.scss +0 -0
- package/styles/tailwind.css +0 -0
- package/styles/tailwind.scss +0 -0
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
|
@@ -8,7 +8,7 @@ var InsertMethods = /** @class */ (function () {
|
|
|
8
8
|
/**
|
|
9
9
|
* WrapBefore method
|
|
10
10
|
* @hidden
|
|
11
|
-
|
|
11
|
+
* @deprecated
|
|
12
12
|
*/
|
|
13
13
|
InsertMethods.WrapBefore = function (textNode, parentNode, isAfter) {
|
|
14
14
|
parentNode.innerText = textNode.textContent;
|
|
@@ -21,7 +21,7 @@ var InsertMethods = /** @class */ (function () {
|
|
|
21
21
|
/**
|
|
22
22
|
* Wrap method
|
|
23
23
|
* @hidden
|
|
24
|
-
|
|
24
|
+
* @deprecated
|
|
25
25
|
*/
|
|
26
26
|
InsertMethods.Wrap = function (childNode, parentNode) {
|
|
27
27
|
this.AppendBefore(parentNode, childNode);
|
|
@@ -31,7 +31,7 @@ var InsertMethods = /** @class */ (function () {
|
|
|
31
31
|
/**
|
|
32
32
|
* unwrap method
|
|
33
33
|
* @hidden
|
|
34
|
-
|
|
34
|
+
* @deprecated
|
|
35
35
|
*/
|
|
36
36
|
InsertMethods.unwrap = function (node) {
|
|
37
37
|
var parent = node.parentNode;
|
|
@@ -45,7 +45,7 @@ var InsertMethods = /** @class */ (function () {
|
|
|
45
45
|
/**
|
|
46
46
|
* AppendBefore method
|
|
47
47
|
* @hidden
|
|
48
|
-
|
|
48
|
+
* @deprecated
|
|
49
49
|
*/
|
|
50
50
|
InsertMethods.AppendBefore = function (textNode, parentNode, isAfter) {
|
|
51
51
|
return (parentNode.parentNode) ? ((!isAfter) ? parentNode.parentNode.insertBefore(textNode, parentNode)
|
|
@@ -2,14 +2,14 @@ import { EditorManager } from '../base/editor-manager';
|
|
|
2
2
|
/**
|
|
3
3
|
* Insert a Text Node or Text
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export declare class InsertTextExec {
|
|
8
8
|
private parent;
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for creating the InsertText plugin
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
constructor(parent: EditorManager);
|
|
15
15
|
private addEventListener;
|
|
@@ -3,13 +3,13 @@ import { InsertHtml } from './inserthtml';
|
|
|
3
3
|
/**
|
|
4
4
|
* Insert a Text Node or Text
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
var InsertTextExec = /** @class */ (function () {
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for creating the InsertText plugin
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
function InsertTextExec(parent) {
|
|
15
15
|
this.parent = parent;
|
|
@@ -2,14 +2,14 @@ import { EditorManager } from './../base/editor-manager';
|
|
|
2
2
|
/**
|
|
3
3
|
* Selection EXEC internal component
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export declare class InsertHtmlExec {
|
|
8
8
|
private parent;
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for creating the Formats plugin
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
constructor(parent: EditorManager);
|
|
15
15
|
private addEventListener;
|
|
@@ -3,13 +3,13 @@ import { InsertHtml } from './inserthtml';
|
|
|
3
3
|
/**
|
|
4
4
|
* Selection EXEC internal component
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
var InsertHtmlExec = /** @class */ (function () {
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for creating the Formats plugin
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
function InsertHtmlExec(parent) {
|
|
15
15
|
this.parent = parent;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Insert a HTML Node or Text
|
|
3
3
|
* @hidden
|
|
4
|
-
|
|
4
|
+
* @deprecated
|
|
5
5
|
*/
|
|
6
6
|
export declare class InsertHtml {
|
|
7
7
|
/**
|
|
8
8
|
* Insert method
|
|
9
9
|
* @hidden
|
|
10
|
-
|
|
10
|
+
* @deprecated
|
|
11
11
|
*/
|
|
12
12
|
static inlineNode: string[];
|
|
13
13
|
static Insert(docElement: Document, insertNode: Node | string, editNode?: Element, isExternal?: boolean): void;
|
|
@@ -7,7 +7,7 @@ import { updateTextNode } from './../../common/util';
|
|
|
7
7
|
/**
|
|
8
8
|
* Insert a HTML Node or Text
|
|
9
9
|
* @hidden
|
|
10
|
-
|
|
10
|
+
* @deprecated
|
|
11
11
|
*/
|
|
12
12
|
var InsertHtml = /** @class */ (function () {
|
|
13
13
|
function InsertHtml() {
|
|
@@ -36,7 +36,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
36
36
|
var isCursor = range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
37
37
|
range.startContainer === range.endContainer;
|
|
38
38
|
var isCollapsed = range.collapsed;
|
|
39
|
-
var nodes = this.getNodeCollection(range, nodeSelection);
|
|
39
|
+
var nodes = this.getNodeCollection(range, nodeSelection, node);
|
|
40
40
|
var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
|
|
41
41
|
if (isExternal || (!isNOU(node) && !isNOU(node.classList) &&
|
|
42
42
|
node.classList.contains('pasteContent'))) {
|
|
@@ -261,9 +261,10 @@ var InsertHtml = /** @class */ (function () {
|
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
263
|
InsertHtml.placeCursorEnd = function (lastSelectionNode, node, nodeSelection, docElement, editNode) {
|
|
264
|
-
lastSelectionNode = lastSelectionNode.nodeName === 'BR' ? lastSelectionNode.previousSibling
|
|
264
|
+
lastSelectionNode = lastSelectionNode.nodeName === 'BR' ? (isNOU(lastSelectionNode.previousSibling) ? lastSelectionNode.parentNode
|
|
265
|
+
: lastSelectionNode.previousSibling) : lastSelectionNode;
|
|
265
266
|
while (!isNOU(lastSelectionNode) && lastSelectionNode.nodeName !== '#text' && lastSelectionNode.nodeName !== 'IMG' &&
|
|
266
|
-
lastSelectionNode.nodeName !== 'BR') {
|
|
267
|
+
lastSelectionNode.nodeName !== 'BR' && lastSelectionNode.nodeName !== 'HR') {
|
|
267
268
|
lastSelectionNode = lastSelectionNode.lastChild;
|
|
268
269
|
}
|
|
269
270
|
lastSelectionNode = isNOU(lastSelectionNode) ? node : lastSelectionNode;
|
|
@@ -275,10 +276,11 @@ var InsertHtml = /** @class */ (function () {
|
|
|
275
276
|
}
|
|
276
277
|
this.removeEmptyElements(editNode);
|
|
277
278
|
};
|
|
278
|
-
InsertHtml.getNodeCollection = function (range, nodeSelection) {
|
|
279
|
+
InsertHtml.getNodeCollection = function (range, nodeSelection, node) {
|
|
279
280
|
var nodes = [];
|
|
280
|
-
if (range.startOffset === range.endOffset && range.startContainer === range.endContainer
|
|
281
|
-
range.startContainer.nodeName === 'TD'
|
|
281
|
+
if (range.startOffset === range.endOffset && range.startContainer === range.endContainer
|
|
282
|
+
&& (range.startContainer.nodeName === 'TD' || (range.startContainer.nodeType !== 3 &&
|
|
283
|
+
node.classList && node.classList.contains('pasteContent')))) {
|
|
282
284
|
nodes.push(range.startContainer.childNodes[range.endOffset]);
|
|
283
285
|
}
|
|
284
286
|
else {
|
|
@@ -317,10 +319,12 @@ var InsertHtml = /** @class */ (function () {
|
|
|
317
319
|
lastSelectionNode.classList.add('lastNode');
|
|
318
320
|
editNode.innerHTML = updateTextNode(editNode.innerHTML);
|
|
319
321
|
lastSelectionNode = editNode.querySelector('.lastNode');
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
lastSelectionNode.
|
|
322
|
+
if (!isNOU(lastSelectionNode)) {
|
|
323
|
+
this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
|
|
324
|
+
lastSelectionNode.classList.remove('lastNode');
|
|
325
|
+
if (lastSelectionNode.classList.length === 0) {
|
|
326
|
+
lastSelectionNode.removeAttribute('class');
|
|
327
|
+
}
|
|
324
328
|
}
|
|
325
329
|
};
|
|
326
330
|
InsertHtml.imageFocus = function (node, nodeSelection, docElement) {
|
|
@@ -382,7 +386,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
382
386
|
/**
|
|
383
387
|
* Insert method
|
|
384
388
|
* @hidden
|
|
385
|
-
|
|
389
|
+
* @deprecated
|
|
386
390
|
*/
|
|
387
391
|
InsertHtml.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
388
392
|
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Is formatted or not.
|
|
3
3
|
* @hidden
|
|
4
|
-
|
|
4
|
+
* @deprecated
|
|
5
5
|
*/
|
|
6
6
|
export declare class IsFormatted {
|
|
7
7
|
static inlineTags: string[];
|
|
8
8
|
/**
|
|
9
9
|
* getFormattedNode method
|
|
10
10
|
* @hidden
|
|
11
|
-
|
|
11
|
+
* @deprecated
|
|
12
12
|
*/
|
|
13
13
|
getFormattedNode(node: Node, format: string, endNode: Node): Node;
|
|
14
14
|
private getFormatParent;
|
|
@@ -16,37 +16,37 @@ export declare class IsFormatted {
|
|
|
16
16
|
/**
|
|
17
17
|
* isBold method
|
|
18
18
|
* @hidden
|
|
19
|
-
|
|
19
|
+
* @deprecated
|
|
20
20
|
*/
|
|
21
21
|
static isBold(node: Node): boolean;
|
|
22
22
|
/**
|
|
23
23
|
* isItalic method
|
|
24
24
|
* @hidden
|
|
25
|
-
|
|
25
|
+
* @deprecated
|
|
26
26
|
*/
|
|
27
27
|
static isItalic(node: Node): boolean;
|
|
28
28
|
/**
|
|
29
29
|
* isUnderline method
|
|
30
30
|
* @hidden
|
|
31
|
-
|
|
31
|
+
* @deprecated
|
|
32
32
|
*/
|
|
33
33
|
static isUnderline(node: Node): boolean;
|
|
34
34
|
/**
|
|
35
35
|
* isStrikethrough method
|
|
36
36
|
* @hidden
|
|
37
|
-
|
|
37
|
+
* @deprecated
|
|
38
38
|
*/
|
|
39
39
|
static isStrikethrough(node: Node): boolean;
|
|
40
40
|
/**
|
|
41
41
|
* isSuperscript method
|
|
42
42
|
* @hidden
|
|
43
|
-
|
|
43
|
+
* @deprecated
|
|
44
44
|
*/
|
|
45
45
|
static isSuperscript(node: Node): boolean;
|
|
46
46
|
/**
|
|
47
47
|
* isSubscript method
|
|
48
48
|
* @hidden
|
|
49
|
-
|
|
49
|
+
* @deprecated
|
|
50
50
|
*/
|
|
51
51
|
static isSubscript(node: Node): boolean;
|
|
52
52
|
private isFontColor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Is formatted or not.
|
|
3
3
|
* @hidden
|
|
4
|
-
|
|
4
|
+
* @deprecated
|
|
5
5
|
*/
|
|
6
6
|
var IsFormatted = /** @class */ (function () {
|
|
7
7
|
function IsFormatted() {
|
|
@@ -9,7 +9,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
9
9
|
/**
|
|
10
10
|
* getFormattedNode method
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
IsFormatted.prototype.getFormattedNode = function (node, format, endNode) {
|
|
15
15
|
var parentNode = this.getFormatParent(node, format, endNode);
|
|
@@ -53,7 +53,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
53
53
|
/**
|
|
54
54
|
* isBold method
|
|
55
55
|
* @hidden
|
|
56
|
-
|
|
56
|
+
* @deprecated
|
|
57
57
|
*/
|
|
58
58
|
IsFormatted.isBold = function (node) {
|
|
59
59
|
var validTags = ['strong', 'b'];
|
|
@@ -71,7 +71,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
71
71
|
/**
|
|
72
72
|
* isItalic method
|
|
73
73
|
* @hidden
|
|
74
|
-
|
|
74
|
+
* @deprecated
|
|
75
75
|
*/
|
|
76
76
|
IsFormatted.isItalic = function (node) {
|
|
77
77
|
var validTags = ['em', 'i'];
|
|
@@ -89,7 +89,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
89
89
|
/**
|
|
90
90
|
* isUnderline method
|
|
91
91
|
* @hidden
|
|
92
|
-
|
|
92
|
+
* @deprecated
|
|
93
93
|
*/
|
|
94
94
|
IsFormatted.isUnderline = function (node) {
|
|
95
95
|
var validTags = ['u'];
|
|
@@ -107,7 +107,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
107
107
|
/**
|
|
108
108
|
* isStrikethrough method
|
|
109
109
|
* @hidden
|
|
110
|
-
|
|
110
|
+
* @deprecated
|
|
111
111
|
*/
|
|
112
112
|
IsFormatted.isStrikethrough = function (node) {
|
|
113
113
|
var validTags = ['del', 'strike'];
|
|
@@ -125,7 +125,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
125
125
|
/**
|
|
126
126
|
* isSuperscript method
|
|
127
127
|
* @hidden
|
|
128
|
-
|
|
128
|
+
* @deprecated
|
|
129
129
|
*/
|
|
130
130
|
IsFormatted.isSuperscript = function (node) {
|
|
131
131
|
var validTags = ['sup'];
|
|
@@ -139,7 +139,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
139
139
|
/**
|
|
140
140
|
* isSubscript method
|
|
141
141
|
* @hidden
|
|
142
|
-
|
|
142
|
+
* @deprecated
|
|
143
143
|
*/
|
|
144
144
|
IsFormatted.isSubscript = function (node) {
|
|
145
145
|
var validTags = ['sub'];
|
|
@@ -2,14 +2,14 @@ import { EditorManager } from './../base/editor-manager';
|
|
|
2
2
|
/**
|
|
3
3
|
* Link internal component
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export declare class LinkCommand {
|
|
8
8
|
private parent;
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for creating the Formats plugin
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
constructor(parent: EditorManager);
|
|
15
15
|
private addEventListener;
|
|
@@ -6,13 +6,13 @@ import { InsertHtml } from './inserthtml';
|
|
|
6
6
|
/**
|
|
7
7
|
* Link internal component
|
|
8
8
|
* @hidden
|
|
9
|
-
|
|
9
|
+
* @deprecated
|
|
10
10
|
*/
|
|
11
11
|
var LinkCommand = /** @class */ (function () {
|
|
12
12
|
/**
|
|
13
13
|
* Constructor for creating the Formats plugin
|
|
14
14
|
* @hidden
|
|
15
|
-
|
|
15
|
+
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
function LinkCommand(parent) {
|
|
18
18
|
this.parent = parent;
|
|
@@ -125,17 +125,17 @@ var LinkCommand = /** @class */ (function () {
|
|
|
125
125
|
var check = true;
|
|
126
126
|
currentNode = txtArray[i];
|
|
127
127
|
while (check === true) {
|
|
128
|
-
if (currentNode.
|
|
129
|
-
var anchorEle = currentNode.
|
|
130
|
-
currentNode.
|
|
131
|
-
currentNode.
|
|
128
|
+
if (currentNode.parentNode.nodeName === 'A') {
|
|
129
|
+
var anchorEle = currentNode.parentNode;
|
|
130
|
+
currentNode.parentNode.parentNode.insertBefore(anchorEle.firstChild, anchorEle);
|
|
131
|
+
currentNode.parentNode.removeChild(anchorEle);
|
|
132
132
|
}
|
|
133
|
-
if (this.isBlockNode(currentNode.
|
|
133
|
+
if (this.isBlockNode(currentNode.parentNode) || txtArray.length === 0 || i === 0 || i === txtArray.length - 1) {
|
|
134
134
|
inlineNodes[i] = currentNode;
|
|
135
135
|
check = false;
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
|
-
currentNode = currentNode.
|
|
138
|
+
currentNode = currentNode.parentNode;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -2,7 +2,7 @@ import { EditorManager } from './../base/editor-manager';
|
|
|
2
2
|
/**
|
|
3
3
|
* Lists internal component
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export declare class Lists {
|
|
8
8
|
private parent;
|
|
@@ -14,7 +14,7 @@ export declare class Lists {
|
|
|
14
14
|
/**
|
|
15
15
|
* Constructor for creating the Lists plugin
|
|
16
16
|
* @hidden
|
|
17
|
-
|
|
17
|
+
* @deprecated
|
|
18
18
|
*/
|
|
19
19
|
constructor(parent: EditorManager);
|
|
20
20
|
private addEventListener;
|
|
@@ -8,13 +8,13 @@ import { isNullOrUndefined, isNullOrUndefined as isNOU, closest } from '@syncfus
|
|
|
8
8
|
/**
|
|
9
9
|
* Lists internal component
|
|
10
10
|
* @hidden
|
|
11
|
-
|
|
11
|
+
* @deprecated
|
|
12
12
|
*/
|
|
13
13
|
var Lists = /** @class */ (function () {
|
|
14
14
|
/**
|
|
15
15
|
* Constructor for creating the Lists plugin
|
|
16
16
|
* @hidden
|
|
17
|
-
|
|
17
|
+
* @deprecated
|
|
18
18
|
*/
|
|
19
19
|
function Lists(parent) {
|
|
20
20
|
this.parent = parent;
|
|
@@ -93,11 +93,15 @@ var Lists = /** @class */ (function () {
|
|
|
93
93
|
startNode = startNode.nodeName === 'BR' ? startNode.parentElement : startNode;
|
|
94
94
|
endNode = endNode.nodeName === 'BR' ? endNode.parentElement : endNode;
|
|
95
95
|
if (startNode === endNode && !isNullOrUndefined(closest(startNode, 'li')) &&
|
|
96
|
-
startNode.textContent.trim() === '' && startNode.textContent.charCodeAt(0) === 65279)
|
|
96
|
+
((startNode.textContent.trim() === '' && startNode.textContent.charCodeAt(0) === 65279) ||
|
|
97
|
+
(startNode.textContent.length === 1 && startNode.textContent.charCodeAt(0) === 8203))) {
|
|
97
98
|
startNode.textContent = '';
|
|
98
99
|
}
|
|
99
100
|
if (startNode === endNode && startNode.textContent === '') {
|
|
100
|
-
if (startNode.
|
|
101
|
+
if (startNode.parentElement.tagName === 'LI' && endNode.parentElement.tagName === 'LI') {
|
|
102
|
+
detach(startNode);
|
|
103
|
+
}
|
|
104
|
+
else if (startNode.closest('ul') || startNode.closest('ol')) {
|
|
101
105
|
var parentList = !isNOU(startNode.closest('ul')) ? startNode.closest('ul') : startNode.closest('ol');
|
|
102
106
|
if (parentList.firstElementChild === startNode && !isNOU(parentList.children[1]) &&
|
|
103
107
|
(parentList.children[1].tagName === 'OL' || parentList.children[1].tagName === 'UL')) {
|
|
@@ -3,7 +3,7 @@ import { createElement, isNullOrUndefined as isNOU, detach } from '@syncfusion/e
|
|
|
3
3
|
/**
|
|
4
4
|
* PasteCleanup for MsWord content
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
var MsWordPaste = /** @class */ (function () {
|
|
9
9
|
function MsWordPaste(parent) {
|
|
@@ -575,18 +575,34 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
575
575
|
};
|
|
576
576
|
MsWordPaste.prototype.getListContent = function (elem) {
|
|
577
577
|
var pushContent = '';
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
578
|
+
var firstChild = elem.firstElementChild;
|
|
579
|
+
if (firstChild.textContent.trim() === '' && !isNOU(firstChild.firstElementChild) &&
|
|
580
|
+
firstChild.firstElementChild.nodeName === 'IMG') {
|
|
581
581
|
pushContent = elem.innerHTML.trim();
|
|
582
582
|
this.listContents.push('');
|
|
583
583
|
this.listContents.push(pushContent);
|
|
584
584
|
}
|
|
585
585
|
else {
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
var styleNodes = ['b', 'em'];
|
|
587
|
+
if (firstChild.childNodes.length > 0 && (firstChild.querySelectorAll('b').length > 0
|
|
588
|
+
|| firstChild.querySelectorAll('em').length > 0)) {
|
|
589
|
+
for (var i = 0; i < firstChild.childNodes.length; i++) {
|
|
590
|
+
var nodeName = firstChild.childNodes[i].nodeName.toLowerCase();
|
|
591
|
+
if (firstChild.childNodes[i].textContent.trim().length > 1 && styleNodes.indexOf(nodeName) !== -1) {
|
|
592
|
+
pushContent = '<' + nodeName + '>' + firstChild.childNodes[i].textContent + '</' + nodeName + '>';
|
|
593
|
+
this.listContents.push(pushContent);
|
|
594
|
+
}
|
|
595
|
+
else if (firstChild.childNodes[i].textContent.trim().length === 1) {
|
|
596
|
+
this.listContents.push(firstChild.childNodes[i].textContent.trim());
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
pushContent = firstChild.textContent.trim();
|
|
602
|
+
this.listContents.push(pushContent);
|
|
603
|
+
}
|
|
588
604
|
}
|
|
589
|
-
detach(
|
|
605
|
+
detach(firstChild);
|
|
590
606
|
this.listContents.push(elem.innerHTML);
|
|
591
607
|
};
|
|
592
608
|
return MsWordPaste;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Split the Node based on selection
|
|
3
3
|
* @hidden
|
|
4
|
-
|
|
4
|
+
* @deprecated
|
|
5
5
|
*/
|
|
6
6
|
export declare class NodeCutter {
|
|
7
7
|
position: number;
|
|
@@ -9,12 +9,12 @@ export declare class NodeCutter {
|
|
|
9
9
|
/**
|
|
10
10
|
* GetSpliceNode method
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
GetSpliceNode(range: Range, node: HTMLElement): Node;
|
|
15
15
|
/**
|
|
16
16
|
* @hidden
|
|
17
|
-
|
|
17
|
+
* @deprecated
|
|
18
18
|
*/
|
|
19
19
|
SplitNode(range: Range, node: HTMLElement, isCollapsed: boolean): HTMLElement;
|
|
20
20
|
private isImgElm;
|
|
@@ -23,19 +23,19 @@ export declare class NodeCutter {
|
|
|
23
23
|
/**
|
|
24
24
|
* GetCursorRange method
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
GetCursorRange(docElement: Document, range: Range, node: Node): Range;
|
|
29
29
|
/**
|
|
30
30
|
* GetCursorNode method
|
|
31
31
|
* @hidden
|
|
32
|
-
|
|
32
|
+
* @deprecated
|
|
33
33
|
*/
|
|
34
34
|
GetCursorNode(docElement: Document, range: Range, node: Node): Node;
|
|
35
35
|
/**
|
|
36
36
|
* TrimLineBreak method
|
|
37
37
|
* @hidden
|
|
38
|
-
|
|
38
|
+
* @deprecated
|
|
39
39
|
*/
|
|
40
40
|
TrimLineBreak(line: string): string;
|
|
41
41
|
}
|
|
@@ -4,7 +4,7 @@ import { InsertMethods } from './insert-methods';
|
|
|
4
4
|
/**
|
|
5
5
|
* Split the Node based on selection
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
var NodeCutter = /** @class */ (function () {
|
|
10
10
|
function NodeCutter() {
|
|
@@ -15,7 +15,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
15
15
|
/**
|
|
16
16
|
* GetSpliceNode method
|
|
17
17
|
* @hidden
|
|
18
|
-
|
|
18
|
+
* @deprecated
|
|
19
19
|
*/
|
|
20
20
|
NodeCutter.prototype.GetSpliceNode = function (range, node) {
|
|
21
21
|
node = this.SplitNode(range, node, true);
|
|
@@ -24,7 +24,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* @hidden
|
|
27
|
-
|
|
27
|
+
* @deprecated
|
|
28
28
|
*/
|
|
29
29
|
NodeCutter.prototype.SplitNode = function (range, node, isCollapsed) {
|
|
30
30
|
if (node) {
|
|
@@ -128,7 +128,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
128
128
|
/**
|
|
129
129
|
* GetCursorRange method
|
|
130
130
|
* @hidden
|
|
131
|
-
|
|
131
|
+
* @deprecated
|
|
132
132
|
*/
|
|
133
133
|
NodeCutter.prototype.GetCursorRange = function (docElement, range, node) {
|
|
134
134
|
var cursorRange = docElement.createRange();
|
|
@@ -167,7 +167,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
167
167
|
/**
|
|
168
168
|
* GetCursorNode method
|
|
169
169
|
* @hidden
|
|
170
|
-
|
|
170
|
+
* @deprecated
|
|
171
171
|
*/
|
|
172
172
|
NodeCutter.prototype.GetCursorNode = function (docElement, range, node) {
|
|
173
173
|
return this.GetSpliceNode(this.GetCursorRange(docElement, range, node), node);
|
|
@@ -175,7 +175,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
175
175
|
/**
|
|
176
176
|
* TrimLineBreak method
|
|
177
177
|
* @hidden
|
|
178
|
-
|
|
178
|
+
* @deprecated
|
|
179
179
|
*/
|
|
180
180
|
NodeCutter.prototype.TrimLineBreak = function (line) {
|
|
181
181
|
return line.replace(/(\r\n\t|\n|\r\t)/gm, ' ');
|
|
@@ -2,10 +2,11 @@ export declare class SelectionCommands {
|
|
|
2
2
|
/**
|
|
3
3
|
* applyFormat method
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
static applyFormat(docElement: Document, format: string, endNode: Node, value?: string, selector?: string): void;
|
|
8
8
|
private static insertCursorNode;
|
|
9
|
+
private static getCursorFormat;
|
|
9
10
|
private static removeFormat;
|
|
10
11
|
private static insertFormat;
|
|
11
12
|
private static applyStyles;
|