@syncfusion/ej2-richtexteditor 25.1.42 → 25.2.4-621927
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/.eslintrc.json +259 -259
- package/CHANGELOG.md +2067 -2001
- package/README.md +76 -76
- 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 +642 -305
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +742 -401
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +84 -84
- package/src/common/interface.d.ts +22 -8
- package/src/common/util.d.ts +8 -0
- package/src/common/util.js +56 -1
- 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 +8 -6
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +9 -9
- 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 +5 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +3 -3
- 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 +54 -34
- package/src/editor-manager/plugin/dom-node.js +139 -36
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
- package/src/editor-manager/plugin/format-painter-actions.js +1 -1
- package/src/editor-manager/plugin/formats.d.ts +2 -2
- package/src/editor-manager/plugin/formats.js +3 -3
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +3 -3
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +5 -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 +5 -2
- 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 +2 -2
- package/src/editor-manager/plugin/lists.d.ts +2 -3
- package/src/editor-manager/plugin/lists.js +57 -80
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +4 -4
- 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 +1 -1
- package/src/editor-manager/plugin/selection-commands.js +1 -1
- 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 +2 -2
- 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 +9 -7
- package/src/editor-manager/plugin/video.d.ts +3 -3
- package/src/editor-manager/plugin/video.js +3 -3
- 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/insert-text.d.ts +2 -2
- package/src/markdown-parser/plugin/insert-text.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 +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- 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/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/enter-key.d.ts +5 -0
- package/src/rich-text-editor/actions/enter-key.js +98 -13
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -9
- package/src/rich-text-editor/actions/html-editor.d.ts +4 -3
- package/src/rich-text-editor/actions/html-editor.js +68 -23
- package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +20 -20
- 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 +2 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +55 -14
- 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 +121 -121
- package/src/rich-text-editor/base/classes.js +121 -121
- package/src/rich-text-editor/base/constant.d.ts +158 -158
- package/src/rich-text-editor/base/constant.js +158 -158
- 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 +50 -50
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
- package/src/rich-text-editor/base/rich-text-editor.d.ts +63 -61
- package/src/rich-text-editor/base/rich-text-editor.js +82 -67
- 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 +26 -26
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +7 -2
- 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 +1 -1
- package/src/rich-text-editor/renderer/image-module.js +10 -5
- 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 +3 -2
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +16 -18
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/video-module.js +7 -2
- 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 +1 -1
- package/styles/bootstrap-dark.css +705 -801
- package/styles/bootstrap-dark.scss +4 -1
- package/styles/bootstrap.css +689 -801
- package/styles/bootstrap.scss +4 -1
- package/styles/bootstrap4.css +692 -803
- package/styles/bootstrap4.scss +4 -1
- package/styles/bootstrap5-dark.css +716 -840
- package/styles/bootstrap5-dark.scss +4 -1
- package/styles/bootstrap5.css +715 -839
- package/styles/bootstrap5.scss +4 -1
- package/styles/fabric-dark.css +690 -797
- package/styles/fabric-dark.scss +4 -1
- package/styles/fabric.css +686 -797
- package/styles/fabric.scss +4 -1
- package/styles/fluent-dark.css +693 -820
- package/styles/fluent-dark.scss +4 -1
- package/styles/fluent.css +692 -819
- package/styles/fluent.scss +4 -1
- package/styles/fluent2.css +4219 -0
- package/styles/fluent2.scss +4 -0
- package/styles/highcontrast-light.css +661 -795
- package/styles/highcontrast-light.scss +4 -1
- package/styles/highcontrast.css +667 -793
- package/styles/highcontrast.scss +4 -1
- package/styles/material-dark.css +682 -798
- package/styles/material-dark.scss +4 -1
- package/styles/material.css +679 -800
- package/styles/material.scss +4 -1
- package/styles/material3-dark.css +717 -857
- package/styles/material3-dark.scss +4 -1
- package/styles/material3.css +717 -857
- package/styles/material3.scss +4 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bds-definition.scss +288 -285
- package/styles/rich-text-editor/_bigger.scss +610 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +289 -287
- package/styles/rich-text-editor/_bootstrap-definition.scss +347 -343
- package/styles/rich-text-editor/_bootstrap4-definition.scss +474 -470
- package/styles/rich-text-editor/_bootstrap5-definition.scss +276 -272
- package/styles/rich-text-editor/_bootstrap5.3-definition.scss +276 -0
- package/styles/rich-text-editor/_fabric-dark-definition.scss +273 -269
- package/styles/rich-text-editor/_fabric-definition.scss +271 -267
- package/styles/rich-text-editor/_fluent-definition.scss +277 -273
- package/styles/rich-text-editor/_fluent2-definition.scss +285 -0
- package/styles/rich-text-editor/_fusionnew-definition.scss +274 -271
- package/styles/rich-text-editor/_highcontrast-definition.scss +272 -267
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +271 -267
- package/styles/rich-text-editor/_layout.scss +2148 -2272
- package/styles/rich-text-editor/_material-dark-definition.scss +276 -272
- package/styles/rich-text-editor/_material-definition.scss +274 -270
- package/styles/rich-text-editor/_material3-definition.scss +276 -272
- package/styles/rich-text-editor/_tailwind-definition.scss +271 -267
- package/styles/rich-text-editor/_theme.scss +802 -927
- package/styles/rich-text-editor/bootstrap-dark.css +705 -801
- package/styles/rich-text-editor/bootstrap.css +689 -801
- package/styles/rich-text-editor/bootstrap4.css +692 -803
- package/styles/rich-text-editor/bootstrap5-dark.css +716 -840
- package/styles/rich-text-editor/bootstrap5.css +715 -839
- package/styles/rich-text-editor/fabric-dark.css +690 -797
- package/styles/rich-text-editor/fabric.css +686 -797
- package/styles/rich-text-editor/fluent-dark.css +693 -820
- package/styles/rich-text-editor/fluent.css +692 -819
- package/styles/rich-text-editor/fluent2.css +4219 -0
- package/styles/rich-text-editor/fluent2.scss +4 -0
- package/styles/rich-text-editor/highcontrast-light.css +661 -795
- package/styles/rich-text-editor/highcontrast.css +667 -793
- package/styles/rich-text-editor/icons/_bds.scss +372 -351
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +373 -352
- package/styles/rich-text-editor/icons/_bootstrap.scss +373 -352
- package/styles/rich-text-editor/icons/_bootstrap4.scss +373 -352
- package/styles/rich-text-editor/icons/_bootstrap5.3.scss +372 -0
- package/styles/rich-text-editor/icons/_bootstrap5.scss +372 -351
- package/styles/rich-text-editor/icons/_fabric-dark.scss +373 -352
- package/styles/rich-text-editor/icons/_fabric.scss +373 -352
- package/styles/rich-text-editor/icons/_fluent.scss +372 -351
- package/styles/rich-text-editor/icons/_fluent2.scss +369 -0
- package/styles/rich-text-editor/icons/_fusionnew.scss +357 -348
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +361 -352
- package/styles/rich-text-editor/icons/_highcontrast.scss +361 -352
- package/styles/rich-text-editor/icons/_material-dark.scss +373 -352
- package/styles/rich-text-editor/icons/_material.scss +373 -352
- package/styles/rich-text-editor/icons/_material3.scss +372 -351
- package/styles/rich-text-editor/icons/_tailwind.scss +372 -351
- package/styles/rich-text-editor/material-dark.css +682 -798
- package/styles/rich-text-editor/material.css +679 -800
- package/styles/rich-text-editor/material3-dark.css +717 -857
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +717 -857
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +705 -828
- package/styles/rich-text-editor/tailwind.css +705 -828
- package/styles/tailwind-dark.css +705 -828
- package/styles/tailwind-dark.scss +4 -1
- package/styles/tailwind.css +705 -828
- package/styles/tailwind.scss +4 -1
- package/dist/ej2-richtexteditor.min.js +0 -10
- 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
- package/tslint.json +0 -111
|
@@ -4,7 +4,7 @@ import { InsertHtml } from './inserthtml';
|
|
|
4
4
|
* Insert a Text Node or Text
|
|
5
5
|
*
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
var InsertTextExec = /** @class */ (function () {
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ var InsertTextExec = /** @class */ (function () {
|
|
|
12
12
|
*
|
|
13
13
|
* @param {EditorManager} parent - specifies the parent element
|
|
14
14
|
* @hidden
|
|
15
|
-
|
|
15
|
+
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
function InsertTextExec(parent) {
|
|
18
18
|
this.parent = parent;
|
|
@@ -3,7 +3,7 @@ import { EditorManager } from './../base/editor-manager';
|
|
|
3
3
|
* Selection EXEC internal component
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
export declare class InsertHtmlExec {
|
|
9
9
|
private parent;
|
|
@@ -12,7 +12,7 @@ export declare class InsertHtmlExec {
|
|
|
12
12
|
*
|
|
13
13
|
* @param {EditorManager} parent - sepcifies the parent element
|
|
14
14
|
* @hidden
|
|
15
|
-
|
|
15
|
+
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
constructor(parent: EditorManager);
|
|
18
18
|
private addEventListener;
|
|
@@ -4,7 +4,7 @@ import { InsertHtml } from './inserthtml';
|
|
|
4
4
|
* Selection EXEC internal component
|
|
5
5
|
*
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
var InsertHtmlExec = /** @class */ (function () {
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ var InsertHtmlExec = /** @class */ (function () {
|
|
|
12
12
|
*
|
|
13
13
|
* @param {EditorManager} parent - sepcifies the parent element
|
|
14
14
|
* @hidden
|
|
15
|
-
|
|
15
|
+
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
function InsertHtmlExec(parent) {
|
|
18
18
|
this.parent = parent;
|
|
@@ -8,7 +8,7 @@ import { updateTextNode, nestedListCleanUp } from './../../common/util';
|
|
|
8
8
|
* Insert a HTML Node or Text
|
|
9
9
|
*
|
|
10
10
|
* @hidden
|
|
11
|
-
|
|
11
|
+
* @deprecated
|
|
12
12
|
*/
|
|
13
13
|
var InsertHtml = /** @class */ (function () {
|
|
14
14
|
function InsertHtml() {
|
|
@@ -63,6 +63,9 @@ var InsertHtml = /** @class */ (function () {
|
|
|
63
63
|
this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
+
if (isCursor && range.startContainer.textContent === '' && range.startContainer.nodeName !== 'BR' && enterAction !== 'BR' && node.nodeName !== '#text' && !isNOU(node.children[0]) && !isNOU(node.children[0].tagName) && node.children[0].tagName === 'IMG' && node.children.length === 1) {
|
|
67
|
+
range.startContainer.innerHTML = '';
|
|
68
|
+
}
|
|
66
69
|
if (isExternal || (!isNOU(node) && !isNOU(node.classList) &&
|
|
67
70
|
node.classList.contains('pasteContent'))) {
|
|
68
71
|
this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
|
|
@@ -608,7 +611,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
608
611
|
* Insert method
|
|
609
612
|
*
|
|
610
613
|
* @hidden
|
|
611
|
-
|
|
614
|
+
* @deprecated
|
|
612
615
|
*/
|
|
613
616
|
InsertHtml.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
614
617
|
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Is formatted or not.
|
|
3
3
|
*
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export declare class IsFormatted {
|
|
8
8
|
static inlineTags: string[];
|
|
@@ -14,7 +14,7 @@ export declare class IsFormatted {
|
|
|
14
14
|
* @param {Node} endNode - specifies the end node
|
|
15
15
|
* @returns {Node} - returns the node
|
|
16
16
|
* @hidden
|
|
17
|
-
|
|
17
|
+
* @deprecated
|
|
18
18
|
*/
|
|
19
19
|
getFormattedNode(node: Node, format: string, endNode: Node): Node;
|
|
20
20
|
private getFormatParent;
|
|
@@ -25,7 +25,7 @@ export declare class IsFormatted {
|
|
|
25
25
|
* @param {Node} node - specifies the node value
|
|
26
26
|
* @returns {boolean} - returns the boolean value
|
|
27
27
|
* @hidden
|
|
28
|
-
|
|
28
|
+
* @deprecated
|
|
29
29
|
*/
|
|
30
30
|
static isBold(node: Node): boolean;
|
|
31
31
|
/**
|
|
@@ -34,7 +34,7 @@ export declare class IsFormatted {
|
|
|
34
34
|
* @param {Node} node - specifies the node value
|
|
35
35
|
* @returns {boolean} - returns the boolean value
|
|
36
36
|
* @hidden
|
|
37
|
-
|
|
37
|
+
* @deprecated
|
|
38
38
|
*/
|
|
39
39
|
static isItalic(node: Node): boolean;
|
|
40
40
|
/**
|
|
@@ -43,7 +43,7 @@ export declare class IsFormatted {
|
|
|
43
43
|
* @param {Node} node - specifies the node value
|
|
44
44
|
* @returns {boolean} - returns the boolean value
|
|
45
45
|
* @hidden
|
|
46
|
-
|
|
46
|
+
* @deprecated
|
|
47
47
|
*/
|
|
48
48
|
static isUnderline(node: Node): boolean;
|
|
49
49
|
/**
|
|
@@ -52,7 +52,7 @@ export declare class IsFormatted {
|
|
|
52
52
|
* @param {Node} node - specifies the node value
|
|
53
53
|
* @returns {boolean} - returns the boolean value
|
|
54
54
|
* @hidden
|
|
55
|
-
|
|
55
|
+
* @deprecated
|
|
56
56
|
*/
|
|
57
57
|
static isStrikethrough(node: Node): boolean;
|
|
58
58
|
/**
|
|
@@ -61,7 +61,7 @@ export declare class IsFormatted {
|
|
|
61
61
|
* @param {Node} node - specifies the node value
|
|
62
62
|
* @returns {boolean} - returns the boolean value
|
|
63
63
|
* @hidden
|
|
64
|
-
|
|
64
|
+
* @deprecated
|
|
65
65
|
*/
|
|
66
66
|
static isSuperscript(node: Node): boolean;
|
|
67
67
|
/**
|
|
@@ -70,7 +70,7 @@ export declare class IsFormatted {
|
|
|
70
70
|
* @param {Node} node - specifies the node value
|
|
71
71
|
* @returns {boolean} - returns the boolean value
|
|
72
72
|
* @hidden
|
|
73
|
-
|
|
73
|
+
* @deprecated
|
|
74
74
|
*/
|
|
75
75
|
static isSubscript(node: Node): boolean;
|
|
76
76
|
private isFontColor;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Is formatted or not.
|
|
3
3
|
*
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
var IsFormatted = /** @class */ (function () {
|
|
8
8
|
function IsFormatted() {
|
|
@@ -15,7 +15,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
15
15
|
* @param {Node} endNode - specifies the end node
|
|
16
16
|
* @returns {Node} - returns the node
|
|
17
17
|
* @hidden
|
|
18
|
-
|
|
18
|
+
* @deprecated
|
|
19
19
|
*/
|
|
20
20
|
IsFormatted.prototype.getFormattedNode = function (node, format, endNode) {
|
|
21
21
|
var parentNode = this.getFormatParent(node, format, endNode);
|
|
@@ -62,7 +62,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
62
62
|
* @param {Node} node - specifies the node value
|
|
63
63
|
* @returns {boolean} - returns the boolean value
|
|
64
64
|
* @hidden
|
|
65
|
-
|
|
65
|
+
* @deprecated
|
|
66
66
|
*/
|
|
67
67
|
IsFormatted.isBold = function (node) {
|
|
68
68
|
var validTags = ['strong', 'b'];
|
|
@@ -83,7 +83,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
83
83
|
* @param {Node} node - specifies the node value
|
|
84
84
|
* @returns {boolean} - returns the boolean value
|
|
85
85
|
* @hidden
|
|
86
|
-
|
|
86
|
+
* @deprecated
|
|
87
87
|
*/
|
|
88
88
|
IsFormatted.isItalic = function (node) {
|
|
89
89
|
var validTags = ['em', 'i'];
|
|
@@ -104,7 +104,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
104
104
|
* @param {Node} node - specifies the node value
|
|
105
105
|
* @returns {boolean} - returns the boolean value
|
|
106
106
|
* @hidden
|
|
107
|
-
|
|
107
|
+
* @deprecated
|
|
108
108
|
*/
|
|
109
109
|
IsFormatted.isUnderline = function (node) {
|
|
110
110
|
var validTags = ['u'];
|
|
@@ -128,7 +128,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
128
128
|
* @param {Node} node - specifies the node value
|
|
129
129
|
* @returns {boolean} - returns the boolean value
|
|
130
130
|
* @hidden
|
|
131
|
-
|
|
131
|
+
* @deprecated
|
|
132
132
|
*/
|
|
133
133
|
IsFormatted.isStrikethrough = function (node) {
|
|
134
134
|
var validTags = ['del', 'strike'];
|
|
@@ -152,7 +152,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
152
152
|
* @param {Node} node - specifies the node value
|
|
153
153
|
* @returns {boolean} - returns the boolean value
|
|
154
154
|
* @hidden
|
|
155
|
-
|
|
155
|
+
* @deprecated
|
|
156
156
|
*/
|
|
157
157
|
IsFormatted.isSuperscript = function (node) {
|
|
158
158
|
var validTags = ['sup'];
|
|
@@ -169,7 +169,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
169
169
|
* @param {Node} node - specifies the node value
|
|
170
170
|
* @returns {boolean} - returns the boolean value
|
|
171
171
|
* @hidden
|
|
172
|
-
|
|
172
|
+
* @deprecated
|
|
173
173
|
*/
|
|
174
174
|
IsFormatted.isSubscript = function (node) {
|
|
175
175
|
var validTags = ['sub'];
|
|
@@ -3,7 +3,7 @@ import { EditorManager } from './../base/editor-manager';
|
|
|
3
3
|
* Link internal component
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
export declare class LinkCommand {
|
|
9
9
|
private parent;
|
|
@@ -12,7 +12,7 @@ export declare class LinkCommand {
|
|
|
12
12
|
*
|
|
13
13
|
* @param {EditorManager} parent - specifies the editor manager
|
|
14
14
|
* @hidden
|
|
15
|
-
|
|
15
|
+
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
constructor(parent: EditorManager);
|
|
18
18
|
private addEventListener;
|
|
@@ -7,7 +7,7 @@ import { createElement, isNullOrUndefined as isNOU, closest } from '@syncfusion/
|
|
|
7
7
|
* Link internal component
|
|
8
8
|
*
|
|
9
9
|
* @hidden
|
|
10
|
-
|
|
10
|
+
* @deprecated
|
|
11
11
|
*/
|
|
12
12
|
var LinkCommand = /** @class */ (function () {
|
|
13
13
|
/**
|
|
@@ -15,7 +15,7 @@ var LinkCommand = /** @class */ (function () {
|
|
|
15
15
|
*
|
|
16
16
|
* @param {EditorManager} parent - specifies the editor manager
|
|
17
17
|
* @hidden
|
|
18
|
-
|
|
18
|
+
* @deprecated
|
|
19
19
|
*/
|
|
20
20
|
function LinkCommand(parent) {
|
|
21
21
|
this.parent = parent;
|
|
@@ -3,7 +3,7 @@ import { EditorManager } from './../base/editor-manager';
|
|
|
3
3
|
* Lists internal component
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
export declare class Lists {
|
|
9
9
|
private parent;
|
|
@@ -18,7 +18,7 @@ export declare class Lists {
|
|
|
18
18
|
*
|
|
19
19
|
* @param {EditorManager} parent - specifies the parent element
|
|
20
20
|
* @hidden
|
|
21
|
-
|
|
21
|
+
* @deprecated
|
|
22
22
|
*/
|
|
23
23
|
constructor(parent: EditorManager);
|
|
24
24
|
private addEventListener;
|
|
@@ -47,5 +47,4 @@ export declare class Lists {
|
|
|
47
47
|
private revertList;
|
|
48
48
|
private openTag;
|
|
49
49
|
private closeTag;
|
|
50
|
-
private gatherElementsAround;
|
|
51
50
|
}
|
|
@@ -9,7 +9,7 @@ import { isNullOrUndefined, isNullOrUndefined as isNOU, closest } from '@syncfus
|
|
|
9
9
|
* Lists internal component
|
|
10
10
|
*
|
|
11
11
|
* @hidden
|
|
12
|
-
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
14
|
var Lists = /** @class */ (function () {
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ var Lists = /** @class */ (function () {
|
|
|
17
17
|
*
|
|
18
18
|
* @param {EditorManager} parent - specifies the parent element
|
|
19
19
|
* @hidden
|
|
20
|
-
|
|
20
|
+
* @deprecated
|
|
21
21
|
*/
|
|
22
22
|
function Lists(parent) {
|
|
23
23
|
this.parent = parent;
|
|
@@ -255,7 +255,7 @@ var Lists = /** @class */ (function () {
|
|
|
255
255
|
e.event.preventDefault();
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
Lists.prototype.onKeyUp = function () {
|
|
258
|
+
Lists.prototype.onKeyUp = function (e) {
|
|
259
259
|
if (!isNOU(this.commonLIParent) && !isNOU(this.commonLIParent.querySelector('.removeList'))) {
|
|
260
260
|
var currentLIElem = this.commonLIParent.querySelector('.removeList');
|
|
261
261
|
while (!isNOU(currentLIElem.firstChild)) {
|
|
@@ -263,6 +263,14 @@ var Lists = /** @class */ (function () {
|
|
|
263
263
|
}
|
|
264
264
|
detach(currentLIElem);
|
|
265
265
|
}
|
|
266
|
+
if (e.event.keyCode === 13) {
|
|
267
|
+
var listElements = this.parent.editableElement.querySelectorAll('UL, OL');
|
|
268
|
+
for (var i = 0; i < listElements.length; i++) {
|
|
269
|
+
if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
|
|
270
|
+
listElements[i].previousElementSibling.appendChild(listElements[i]);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
266
274
|
};
|
|
267
275
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
268
276
|
Lists.prototype.firstListBackSpace = function (range, _e) {
|
|
@@ -504,6 +512,8 @@ var Lists = /** @class */ (function () {
|
|
|
504
512
|
else {
|
|
505
513
|
if (prevSibling.tagName === 'LI') {
|
|
506
514
|
var nestedElement = createElement(elements[i].parentNode.tagName);
|
|
515
|
+
nestedElement.style.listStyleType =
|
|
516
|
+
elements[i].parentNode.style.listStyleType;
|
|
507
517
|
append([nestedElement], prevSibling);
|
|
508
518
|
append([elements[i]], nestedElement);
|
|
509
519
|
}
|
|
@@ -553,39 +563,7 @@ var Lists = /** @class */ (function () {
|
|
|
553
563
|
var listsNodes = this.domNode.blockNodes(true);
|
|
554
564
|
if (e.enterAction === 'BR') {
|
|
555
565
|
this.setSelectionBRConfig();
|
|
556
|
-
|
|
557
|
-
if (selectedNodes.length > 1) {
|
|
558
|
-
var i = 0;
|
|
559
|
-
var currentAlignmentNode = selectedNodes[0];
|
|
560
|
-
while (!isNOU(currentAlignmentNode)) {
|
|
561
|
-
if (currentAlignmentNode.nodeName === 'BR') {
|
|
562
|
-
var nextNode = currentAlignmentNode.nextSibling;
|
|
563
|
-
detach(currentAlignmentNode);
|
|
564
|
-
currentAlignmentNode = nextNode;
|
|
565
|
-
}
|
|
566
|
-
if (!isNOU(currentAlignmentNode)) {
|
|
567
|
-
selectedNodes[i] = currentAlignmentNode.nodeName === 'LI' || this.parent.domNode.isBlockNode(currentAlignmentNode) ?
|
|
568
|
-
currentAlignmentNode : this.gatherElementsAround(currentAlignmentNode);
|
|
569
|
-
var currentSelectNode = selectedNodes[i].nodeName === 'LI' ? selectedNodes[i].parentElement : selectedNodes[i];
|
|
570
|
-
var currentElementCheckNode = currentAlignmentNode.nodeName === '#text' ? currentAlignmentNode.parentElement : currentAlignmentNode;
|
|
571
|
-
currentAlignmentNode = !isNOU(currentElementCheckNode.querySelector('.e-editor-select-end')) ||
|
|
572
|
-
!isNOU(closest(currentAlignmentNode, '.e-editor-select-end')) ?
|
|
573
|
-
null : currentSelectNode.nextSibling;
|
|
574
|
-
if (currentAlignmentNode === null && !isNOU(currentSelectNode.nextSibling) && currentSelectNode.nextSibling.nodeName === 'BR') {
|
|
575
|
-
detach(currentSelectNode.nextSibling);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
i++;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
else {
|
|
582
|
-
if (!this.parent.domNode.isBlockNode(selectedNodes[0])) {
|
|
583
|
-
selectedNodes[0] = this.gatherElementsAround(selectedNodes[0]);
|
|
584
|
-
if (!isNOU(selectedNodes[0].nextSibling) && (selectedNodes[0].nextSibling.nodeName === 'BR')) {
|
|
585
|
-
detach(selectedNodes[0].nextSibling);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
566
|
+
this.parent.domNode.convertToBlockNodes(this.parent.domNode.blockNodes(), true);
|
|
589
567
|
this.setSelectionBRConfig();
|
|
590
568
|
listsNodes = this.parent.domNode.blockNodes();
|
|
591
569
|
}
|
|
@@ -643,7 +621,7 @@ var Lists = /** @class */ (function () {
|
|
|
643
621
|
}
|
|
644
622
|
var elemAtt = void 0;
|
|
645
623
|
elements[i].style.removeProperty('margin-left');
|
|
646
|
-
elemAtt = elements[i].tagName === 'IMG' ? '' : this.domNode.attributes(elements[i]);
|
|
624
|
+
elemAtt = elements[i].tagName === 'IMG' || elements[i].classList.contains('e-editor-select-start') ? '' : this.domNode.attributes(elements[i]);
|
|
647
625
|
if (elements[i].getAttribute('contenteditable') === 'true'
|
|
648
626
|
&& elements[i].childNodes.length === 1 && elements[i].childNodes[0].nodeName === 'TABLE') {
|
|
649
627
|
var listEle = document.createElement(type);
|
|
@@ -767,6 +745,13 @@ var Lists = /** @class */ (function () {
|
|
|
767
745
|
for (var c = 0; c < liParents.length; c++) {
|
|
768
746
|
var node = liParents[c];
|
|
769
747
|
var toFindtopOlUl = true;
|
|
748
|
+
var containsListElements = node;
|
|
749
|
+
while (containsListElements.parentElement) {
|
|
750
|
+
if (containsListElements.parentElement && containsListElements.parentElement.tagName !== 'LI' && containsListElements.parentElement.tagName !== 'OL' && containsListElements.parentElement.tagName !== 'UL') {
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
containsListElements = containsListElements.parentElement;
|
|
754
|
+
}
|
|
770
755
|
if (toFindtopOlUl && (liParents[c].parentElement.parentElement.nodeName === 'OL' || liParents[c].parentElement.parentElement.nodeName === 'UL')) {
|
|
771
756
|
toFindtopOlUl = false;
|
|
772
757
|
var preElement = liParents[c].parentElement.parentElement;
|
|
@@ -786,9 +771,43 @@ var Lists = /** @class */ (function () {
|
|
|
786
771
|
node.previousElementSibling.lastChild.append(node);
|
|
787
772
|
}
|
|
788
773
|
}
|
|
774
|
+
else if (this.domNode.isList(node.previousElementSibling) && containsListElements.contains(node.previousElementSibling) && ((node.tagName === 'OL' || node.tagName === 'UL') && (node.previousElementSibling.nodeName === 'OL' || node.previousElementSibling.nodeName === 'UL'))) {
|
|
775
|
+
var contentNodes = this.domNode.contents(node);
|
|
776
|
+
for (var f = 0; f < contentNodes.length; f++) {
|
|
777
|
+
node.previousElementSibling.appendChild(contentNodes[f]);
|
|
778
|
+
}
|
|
779
|
+
node.parentNode.removeChild(node);
|
|
780
|
+
}
|
|
789
781
|
}
|
|
790
782
|
if (firstNodeOL) {
|
|
791
783
|
firstNodeOL.style.listStyleType = listStyleType;
|
|
784
|
+
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
785
|
+
var listOlUlElements = [];
|
|
786
|
+
if (range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'OL') {
|
|
787
|
+
if (range.commonAncestorContainer instanceof Element) {
|
|
788
|
+
listOlUlElements.push(range.commonAncestorContainer);
|
|
789
|
+
}
|
|
790
|
+
listOlUlElements = listOlUlElements.concat(Array.from(range.commonAncestorContainer.querySelectorAll('ol, ul')));
|
|
791
|
+
}
|
|
792
|
+
else {
|
|
793
|
+
listOlUlElements = Array.from(range.commonAncestorContainer.querySelectorAll('ol, ul'));
|
|
794
|
+
}
|
|
795
|
+
for (var k = 0; k < listOlUlElements.length; k++) {
|
|
796
|
+
var listStyle = void 0;
|
|
797
|
+
var listElements = listOlUlElements[k];
|
|
798
|
+
while (listElements) {
|
|
799
|
+
if (listElements.nodeName === 'OL' || listElements.nodeName === 'OL') {
|
|
800
|
+
if (listElements.style.listStyleType !== '' && listElements.style.listStyleType !== 'none' && listElements.nodeName !== 'LI') {
|
|
801
|
+
listStyle = listElements.style.listStyleType;
|
|
802
|
+
}
|
|
803
|
+
else if (!isNOU(listStyle) && (listElements.style.listStyleType === '' || listElements.style.listStyleType === 'none') &&
|
|
804
|
+
listElements.nodeName !== 'LI' && (listElements.nodeName === 'UL' || listElements.nodeName === 'OL')) {
|
|
805
|
+
listElements.style.listStyleType = listStyle;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
listElements = listElements.querySelector('UL,OL');
|
|
809
|
+
}
|
|
810
|
+
}
|
|
792
811
|
}
|
|
793
812
|
};
|
|
794
813
|
Lists.prototype.findUnSelected = function (temp, elements) {
|
|
@@ -897,7 +916,7 @@ var Lists = /** @class */ (function () {
|
|
|
897
916
|
parentNode.removeAttribute("style");
|
|
898
917
|
}
|
|
899
918
|
}
|
|
900
|
-
var wrapper = '<' +
|
|
919
|
+
var wrapper = '<' + e.enterAction + wrapperclass + this.domNode.attributes(element) + '></' + e.enterAction + '>';
|
|
901
920
|
if (e.enterAction !== 'BR') {
|
|
902
921
|
this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
|
|
903
922
|
}
|
|
@@ -971,48 +990,6 @@ var Lists = /** @class */ (function () {
|
|
|
971
990
|
Lists.prototype.closeTag = function (type) {
|
|
972
991
|
return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-' + type.toLowerCase() + '"></span>');
|
|
973
992
|
};
|
|
974
|
-
Lists.prototype.gatherElementsAround = function (node) {
|
|
975
|
-
var pWrap = document.createElement('p');
|
|
976
|
-
// Insert the new div before the current node
|
|
977
|
-
var currentNode = node.previousSibling;
|
|
978
|
-
var classNode = node.parentNode;
|
|
979
|
-
if (classNode.className === 'e-editor-select-start') {
|
|
980
|
-
node.parentNode.parentNode.insertBefore(pWrap, node.parentNode);
|
|
981
|
-
}
|
|
982
|
-
else if (node.parentNode) {
|
|
983
|
-
node.parentNode.insertBefore(pWrap, node);
|
|
984
|
-
}
|
|
985
|
-
// Gather text and inline elements before the currentNode
|
|
986
|
-
var i = 0;
|
|
987
|
-
while (currentNode !== null && currentNode.nodeName !== 'BR' &&
|
|
988
|
-
!this.parent.domNode.isBlockNode(currentNode)) {
|
|
989
|
-
var prevSibling = currentNode.previousSibling;
|
|
990
|
-
if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
|
|
991
|
-
if (i === 0) {
|
|
992
|
-
pWrap.appendChild(currentNode);
|
|
993
|
-
}
|
|
994
|
-
else {
|
|
995
|
-
pWrap.insertBefore(currentNode, pWrap.firstChild);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
currentNode = prevSibling;
|
|
999
|
-
i++;
|
|
1000
|
-
}
|
|
1001
|
-
// Add the current node to the new p
|
|
1002
|
-
pWrap.appendChild(node);
|
|
1003
|
-
// Gather text and inline elements after the currentNode
|
|
1004
|
-
currentNode = pWrap.nextSibling ? pWrap.nextSibling : pWrap.parentElement.nextSibling;
|
|
1005
|
-
while (currentNode !== null && currentNode.nodeName !== 'BR' &&
|
|
1006
|
-
!this.parent.domNode.isBlockNode(currentNode)) {
|
|
1007
|
-
var nextSibling = currentNode.nextSibling ?
|
|
1008
|
-
currentNode.nextSibling : currentNode.parentElement.nextSibling;
|
|
1009
|
-
if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
|
|
1010
|
-
pWrap.appendChild(currentNode);
|
|
1011
|
-
}
|
|
1012
|
-
currentNode = nextSibling;
|
|
1013
|
-
}
|
|
1014
|
-
return pWrap;
|
|
1015
|
-
};
|
|
1016
993
|
return Lists;
|
|
1017
994
|
}());
|
|
1018
995
|
export { Lists };
|
|
@@ -5,7 +5,7 @@ import { PASTE_SOURCE } from '../base/constant';
|
|
|
5
5
|
* PasteCleanup for MsWord content
|
|
6
6
|
*
|
|
7
7
|
* @hidden
|
|
8
|
-
|
|
8
|
+
* @deprecated
|
|
9
9
|
*/
|
|
10
10
|
var MsWordPaste = /** @class */ (function () {
|
|
11
11
|
function MsWordPaste(parent) {
|
|
@@ -66,9 +66,9 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
66
66
|
var patern2 = /class="?Mso|style="[^ ]*\bmso-/i;
|
|
67
67
|
var patern3 = /(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi;
|
|
68
68
|
var pattern4 = /style='mso-width-source:/i;
|
|
69
|
+
var source = this.findSource(elm);
|
|
69
70
|
if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
|
|
70
71
|
pattern4.test(tempHTMLContent)) {
|
|
71
|
-
var source = this.findSource(elm);
|
|
72
72
|
tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
|
|
73
73
|
this.addListClass(elm);
|
|
74
74
|
listNodes = this.cleanUp(elm, listNodes);
|
|
@@ -93,7 +93,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
93
93
|
e.callBack(elm.innerHTML, this.cropImageDimensions, source);
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
|
-
e.callBack(elm.innerHTML);
|
|
96
|
+
e.callBack(elm.innerHTML, null, source);
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
MsWordPaste.prototype.addDoubleBr = function (elm) {
|
|
@@ -821,7 +821,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
821
821
|
!isNormalList) {
|
|
822
822
|
prevList = null;
|
|
823
823
|
}
|
|
824
|
-
var pElement = createElement('p', { className: '
|
|
824
|
+
var pElement = createElement('p', { className: 'MsoNoSpacing' });
|
|
825
825
|
pElement.innerHTML = collection[index].content.join(' ');
|
|
826
826
|
if ((collection[index].nestedLevel === 1) &&
|
|
827
827
|
(listCount === 0 || lfo !== collection[index].listFormatOverride) &&
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Split the Node based on selection
|
|
3
3
|
*
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export declare class NodeCutter {
|
|
8
8
|
enterAction: string;
|
|
@@ -15,7 +15,7 @@ export declare class NodeCutter {
|
|
|
15
15
|
* @param {HTMLElement} node - specifies the node element.
|
|
16
16
|
* @returns {Node} - returns the node value
|
|
17
17
|
* @hidden
|
|
18
|
-
|
|
18
|
+
* @deprecated
|
|
19
19
|
*/
|
|
20
20
|
GetSpliceNode(range: Range, node: HTMLElement): Node;
|
|
21
21
|
/**
|
|
@@ -24,7 +24,7 @@ export declare class NodeCutter {
|
|
|
24
24
|
* @param {boolean} isCollapsed - specifies the boolean value
|
|
25
25
|
* @returns {HTMLElement} - returns the element
|
|
26
26
|
* @hidden
|
|
27
|
-
|
|
27
|
+
* @deprecated
|
|
28
28
|
*/
|
|
29
29
|
SplitNode(range: Range, node: HTMLElement, isCollapsed: boolean): HTMLElement;
|
|
30
30
|
private isRteElm;
|
|
@@ -38,7 +38,7 @@ export declare class NodeCutter {
|
|
|
38
38
|
* @param {Node} node - specifies the node.
|
|
39
39
|
* @returns {Range} - returns the range value
|
|
40
40
|
* @hidden
|
|
41
|
-
|
|
41
|
+
* @deprecated
|
|
42
42
|
*/
|
|
43
43
|
GetCursorRange(docElement: Document, range: Range, node: Node): Range;
|
|
44
44
|
/**
|
|
@@ -49,7 +49,7 @@ export declare class NodeCutter {
|
|
|
49
49
|
* @param {Node} node - specifies the node.
|
|
50
50
|
* @returns {Node} - returns the node value
|
|
51
51
|
* @hidden
|
|
52
|
-
|
|
52
|
+
* @deprecated
|
|
53
53
|
*/
|
|
54
54
|
GetCursorNode(docElement: Document, range: Range, node: Node): Node;
|
|
55
55
|
/**
|
|
@@ -58,7 +58,7 @@ export declare class NodeCutter {
|
|
|
58
58
|
* @param {string} line - specifies the string value.
|
|
59
59
|
* @returns {string} - returns the string
|
|
60
60
|
* @hidden
|
|
61
|
-
|
|
61
|
+
* @deprecated
|
|
62
62
|
*/
|
|
63
63
|
TrimLineBreak(line: string): string;
|
|
64
64
|
}
|
|
@@ -5,7 +5,7 @@ import { InsertMethods } from './insert-methods';
|
|
|
5
5
|
* Split the Node based on selection
|
|
6
6
|
*
|
|
7
7
|
* @hidden
|
|
8
|
-
|
|
8
|
+
* @deprecated
|
|
9
9
|
*/
|
|
10
10
|
var NodeCutter = /** @class */ (function () {
|
|
11
11
|
function NodeCutter() {
|
|
@@ -21,7 +21,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
21
21
|
* @param {HTMLElement} node - specifies the node element.
|
|
22
22
|
* @returns {Node} - returns the node value
|
|
23
23
|
* @hidden
|
|
24
|
-
|
|
24
|
+
* @deprecated
|
|
25
25
|
*/
|
|
26
26
|
NodeCutter.prototype.GetSpliceNode = function (range, node) {
|
|
27
27
|
node = this.SplitNode(range, node, true);
|
|
@@ -34,7 +34,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
34
34
|
* @param {boolean} isCollapsed - specifies the boolean value
|
|
35
35
|
* @returns {HTMLElement} - returns the element
|
|
36
36
|
* @hidden
|
|
37
|
-
|
|
37
|
+
* @deprecated
|
|
38
38
|
*/
|
|
39
39
|
NodeCutter.prototype.SplitNode = function (range, node, isCollapsed) {
|
|
40
40
|
if (node) {
|
|
@@ -147,7 +147,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
147
147
|
* @param {Node} node - specifies the node.
|
|
148
148
|
* @returns {Range} - returns the range value
|
|
149
149
|
* @hidden
|
|
150
|
-
|
|
150
|
+
* @deprecated
|
|
151
151
|
*/
|
|
152
152
|
NodeCutter.prototype.GetCursorRange = function (docElement, range, node) {
|
|
153
153
|
var cursorRange = docElement.createRange();
|
|
@@ -194,7 +194,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
194
194
|
* @param {Node} node - specifies the node.
|
|
195
195
|
* @returns {Node} - returns the node value
|
|
196
196
|
* @hidden
|
|
197
|
-
|
|
197
|
+
* @deprecated
|
|
198
198
|
*/
|
|
199
199
|
NodeCutter.prototype.GetCursorNode = function (docElement, range, node) {
|
|
200
200
|
return this.GetSpliceNode(this.GetCursorRange(docElement, range, node), node);
|
|
@@ -205,7 +205,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
205
205
|
* @param {string} line - specifies the string value.
|
|
206
206
|
* @returns {string} - returns the string
|
|
207
207
|
* @hidden
|
|
208
|
-
|
|
208
|
+
* @deprecated
|
|
209
209
|
*/
|
|
210
210
|
NodeCutter.prototype.TrimLineBreak = function (line) {
|
|
211
211
|
return line.replace(/(\r\n\t|\n|\r\t)/gm, ' ');
|