@syncfusion/ej2-richtexteditor 20.2.49 → 20.3.47
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 +22 -0
- package/dist/ej2-richtexteditor.min.js +10 -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 +3790 -358
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +3780 -319
- 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 +13 -13
- package/src/common/config.js +2 -0
- package/src/common/types.d.ts +4 -0
- package/src/editor-manager/base/classes.d.ts +16 -0
- package/src/editor-manager/base/classes.js +16 -0
- package/src/editor-manager/base/constant.d.ts +2 -0
- package/src/editor-manager/base/constant.js +2 -0
- package/src/editor-manager/base/editor-manager.d.ts +4 -0
- package/src/editor-manager/base/editor-manager.js +14 -0
- package/src/editor-manager/base/interface.d.ts +2 -0
- package/src/editor-manager/plugin/audio.d.ts +32 -0
- package/src/editor-manager/plugin/audio.js +133 -0
- package/src/editor-manager/plugin/dom-node.js +1 -1
- package/src/editor-manager/plugin/image.js +1 -1
- package/src/editor-manager/plugin/inserthtml.js +1 -1
- package/src/editor-manager/plugin/lists.js +10 -8
- package/src/editor-manager/plugin/ms-word-clean-up.js +18 -18
- package/src/editor-manager/plugin/nodecutter.d.ts +1 -1
- package/src/editor-manager/plugin/nodecutter.js +7 -5
- package/src/editor-manager/plugin/selection-commands.js +3 -2
- package/src/editor-manager/plugin/table.js +3 -2
- package/src/editor-manager/plugin/undo.js +2 -1
- package/src/editor-manager/plugin/video.d.ts +34 -0
- package/src/editor-manager/plugin/video.js +249 -0
- package/src/editor-manager/plugin.d.ts +2 -0
- package/src/editor-manager/plugin.js +2 -0
- package/src/global.js +1 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.js +3 -1
- package/src/rich-text-editor/actions/base-toolbar.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +14 -11
- package/src/rich-text-editor/actions/enter-key.d.ts +1 -0
- package/src/rich-text-editor/actions/enter-key.js +157 -103
- package/src/rich-text-editor/actions/html-editor.d.ts +1 -0
- package/src/rich-text-editor/actions/html-editor.js +59 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +2 -1
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +2 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +52 -6
- package/src/rich-text-editor/actions/resize.js +11 -1
- package/src/rich-text-editor/actions/toolbar-action.js +2 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/audio.d.ts +4 -0
- package/src/rich-text-editor/audio.js +4 -0
- package/src/rich-text-editor/base/classes.d.ts +50 -0
- package/src/rich-text-editor/base/classes.js +50 -0
- package/src/rich-text-editor/base/constant.d.ts +74 -14
- package/src/rich-text-editor/base/constant.js +76 -16
- package/src/rich-text-editor/base/enum.d.ts +10 -2
- package/src/rich-text-editor/base/enum.js +10 -2
- package/src/rich-text-editor/base/interface.d.ts +86 -2
- package/src/rich-text-editor/base/interface.js +8 -0
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +130 -29
- package/src/rich-text-editor/base/rich-text-editor.d.ts +150 -30
- package/src/rich-text-editor/base/rich-text-editor.js +200 -6
- package/src/rich-text-editor/formatter/formatter.js +7 -2
- package/src/rich-text-editor/models/default-locale.js +46 -0
- package/src/rich-text-editor/models/items.d.ts +3 -0
- package/src/rich-text-editor/models/items.js +100 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +169 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +143 -1
- package/src/rich-text-editor/models/toolbar-settings.js +88 -0
- package/src/rich-text-editor/renderer/audio-module.d.ts +76 -0
- package/src/rich-text-editor/renderer/audio-module.js +875 -0
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +9 -6
- package/src/rich-text-editor/renderer/link-module.js +2 -1
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +43 -7
- package/src/rich-text-editor/renderer/video-module.d.ts +105 -0
- package/src/rich-text-editor/renderer/video-module.js +1422 -0
- package/src/rich-text-editor/renderer/view-source.js +2 -0
- package/src/rich-text-editor/renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer.js +2 -0
- package/src/rich-text-editor/video.d.ts +4 -0
- package/src/rich-text-editor/video.js +4 -0
- package/styles/_all.scss +1 -2
- package/styles/bootstrap-dark.css +220 -70
- package/styles/bootstrap.css +220 -70
- package/styles/bootstrap4.css +220 -70
- package/styles/bootstrap5-dark.css +220 -70
- package/styles/bootstrap5.css +220 -70
- package/styles/fabric-dark.css +220 -70
- package/styles/fabric.css +222 -72
- package/styles/fluent-dark.css +222 -72
- package/styles/fluent.css +222 -72
- package/styles/highcontrast-light.css +222 -72
- package/styles/highcontrast.css +222 -72
- package/styles/material-dark.css +220 -70
- package/styles/material.css +220 -70
- package/styles/rich-text-editor/_all.scss +1 -1
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +3 -0
- package/styles/rich-text-editor/_bootstrap-definition.scss +2 -1
- package/styles/rich-text-editor/_bootstrap4-definition.scss +5 -3
- package/styles/rich-text-editor/_bootstrap5-definition.scss +8 -3
- package/styles/rich-text-editor/_fabric-dark-definition.scss +3 -0
- package/styles/rich-text-editor/_fabric-definition.scss +2 -0
- package/styles/rich-text-editor/_fluent-definition.scss +8 -3
- package/styles/rich-text-editor/_fusionnew-definition.scss +8 -3
- package/styles/rich-text-editor/_highcontrast-definition.scss +2 -0
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +2 -0
- package/styles/rich-text-editor/_layout.scss +116 -74
- package/styles/rich-text-editor/_material-dark-definition.scss +3 -0
- package/styles/rich-text-editor/_material-definition.scss +2 -0
- package/styles/rich-text-editor/_material3-definition.scss +8 -3
- package/styles/rich-text-editor/_tailwind-definition.scss +7 -2
- package/styles/rich-text-editor/_theme.scss +74 -15
- package/styles/rich-text-editor/bootstrap-dark.css +220 -70
- package/styles/rich-text-editor/bootstrap.css +220 -70
- package/styles/rich-text-editor/bootstrap4.css +220 -70
- package/styles/rich-text-editor/bootstrap5-dark.css +220 -70
- package/styles/rich-text-editor/bootstrap5.css +220 -70
- package/styles/rich-text-editor/fabric-dark.css +220 -70
- package/styles/rich-text-editor/fabric.css +222 -72
- package/styles/rich-text-editor/fluent-dark.css +222 -72
- package/styles/rich-text-editor/fluent.css +222 -72
- package/styles/rich-text-editor/highcontrast-light.css +222 -72
- package/styles/rich-text-editor/highcontrast.css +222 -72
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +20 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +20 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +20 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +20 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +20 -4
- package/styles/rich-text-editor/icons/_fabric.scss +20 -4
- package/styles/rich-text-editor/icons/_fluent.scss +20 -4
- package/styles/rich-text-editor/icons/_fusionnew.scss +20 -4
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +20 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +20 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +20 -4
- package/styles/rich-text-editor/icons/_material.scss +20 -4
- package/styles/rich-text-editor/icons/_material3.scss +20 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +20 -4
- package/styles/rich-text-editor/material-dark.css +220 -70
- package/styles/rich-text-editor/material.css +220 -70
- package/styles/rich-text-editor/tailwind-dark.css +220 -70
- package/styles/rich-text-editor/tailwind.css +220 -70
- package/styles/tailwind-dark.css +220 -70
- package/styles/tailwind.css +220 -70
- package/.eslintrc.json +0 -244
- package/tslint.json +0 -111
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.
|
|
3
|
+
* version : 20.3.47
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@19.11.12",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-4q7ZJue2f3t843HZSANxj3NEeKIu8zvk5EuS7BYow2Q0OQkVnp+KuG7B5Kz6I2bnbPvHgY+zPDmNqmsn+isMvg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-19.11.12.tgz",
|
|
30
|
+
"_shasum": "7f18820fe6681dab037841759aafeab03a840dbf",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~20.
|
|
42
|
-
"@syncfusion/ej2-buttons": "~20.
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~20.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~20.
|
|
46
|
-
"@syncfusion/ej2-popups": "~20.
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~20.
|
|
41
|
+
"@syncfusion/ej2-base": "~20.3.47",
|
|
42
|
+
"@syncfusion/ej2-buttons": "~20.3.47",
|
|
43
|
+
"@syncfusion/ej2-filemanager": "~20.3.47",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.3.47",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.3.47",
|
|
46
|
+
"@syncfusion/ej2-popups": "~20.3.47",
|
|
47
|
+
"@syncfusion/ej2-splitbuttons": "~20.3.47"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "Essential JS 2 RichTextEditor component",
|
|
51
51
|
"devDependencies": {},
|
|
52
|
-
"es2015": "./dist/es6/ej2-richtexteditor.
|
|
52
|
+
"es2015": "./dist/es6/ej2-richtexteditor.es5.js",
|
|
53
53
|
"homepage": "https://github.com/syncfusion/ej2-javascript-ui-controls#readme",
|
|
54
54
|
"keywords": [
|
|
55
55
|
"ej2",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "20.
|
|
73
|
+
"version": "20.3.47",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
package/src/common/config.js
CHANGED
package/src/common/types.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ export declare type EditorMode = 'HTML' | 'Markdown';
|
|
|
6
6
|
* Defines types to be used to save the image.
|
|
7
7
|
*/
|
|
8
8
|
export declare type SaveFormat = 'Base64' | 'Blob';
|
|
9
|
+
/**
|
|
10
|
+
* Defines types to be used to display the layout of the audio/video.
|
|
11
|
+
*/
|
|
12
|
+
export declare type DisplayLayoutOptions = 'Inline' | 'Break';
|
|
9
13
|
/**
|
|
10
14
|
* Defines tag to be used when enter key is pressed.
|
|
11
15
|
*/
|
|
@@ -8,8 +8,24 @@
|
|
|
8
8
|
export declare const CLASS_IMAGE_RIGHT: string;
|
|
9
9
|
export declare const CLASS_IMAGE_LEFT: string;
|
|
10
10
|
export declare const CLASS_IMAGE_CENTER: string;
|
|
11
|
+
export declare const CLASS_VIDEO_RIGHT: string;
|
|
12
|
+
export declare const CLASS_VIDEO_LEFT: string;
|
|
13
|
+
export declare const CLASS_VIDEO_CENTER: string;
|
|
11
14
|
export declare const CLASS_IMAGE_BREAK: string;
|
|
15
|
+
export declare const CLASS_AUDIO_BREAK: string;
|
|
16
|
+
export declare const CLASS_VIDEO_BREAK: string;
|
|
12
17
|
export declare const CLASS_CAPTION: string;
|
|
13
18
|
export declare const CLASS_RTE_CAPTION: string;
|
|
14
19
|
export declare const CLASS_CAPTION_INLINE: string;
|
|
15
20
|
export declare const CLASS_IMAGE_INLINE: string;
|
|
21
|
+
export declare const CLASS_AUDIO_INLINE: string;
|
|
22
|
+
export declare const CLASS_CLICK_ELEM: string;
|
|
23
|
+
export declare const CLASS_VIDEO_CLICK_ELEM: string;
|
|
24
|
+
export declare const CLASS_AUDIO: string;
|
|
25
|
+
export declare const CLASS_VIDEO: string;
|
|
26
|
+
export declare const CLASS_AUDIO_WRAP: string;
|
|
27
|
+
export declare const CLASS_VIDEO_WRAP: string;
|
|
28
|
+
export declare const CLASS_EMBED_VIDEO_WRAP: string;
|
|
29
|
+
export declare const CLASS_AUDIO_FOCUS: string;
|
|
30
|
+
export declare const CLASS_VIDEO_FOCUS: string;
|
|
31
|
+
export declare const CLASS_VIDEO_INLINE: string;
|
|
@@ -8,8 +8,24 @@
|
|
|
8
8
|
export var CLASS_IMAGE_RIGHT = 'e-imgright';
|
|
9
9
|
export var CLASS_IMAGE_LEFT = 'e-imgleft';
|
|
10
10
|
export var CLASS_IMAGE_CENTER = 'e-imgcenter';
|
|
11
|
+
export var CLASS_VIDEO_RIGHT = 'e-video-right';
|
|
12
|
+
export var CLASS_VIDEO_LEFT = 'e-video-left';
|
|
13
|
+
export var CLASS_VIDEO_CENTER = 'e-video-center';
|
|
11
14
|
export var CLASS_IMAGE_BREAK = 'e-imgbreak';
|
|
15
|
+
export var CLASS_AUDIO_BREAK = 'e-audio-break';
|
|
16
|
+
export var CLASS_VIDEO_BREAK = 'e-video-break';
|
|
12
17
|
export var CLASS_CAPTION = 'e-img-caption';
|
|
13
18
|
export var CLASS_RTE_CAPTION = 'e-rte-img-caption';
|
|
14
19
|
export var CLASS_CAPTION_INLINE = 'e-caption-inline';
|
|
15
20
|
export var CLASS_IMAGE_INLINE = 'e-imginline';
|
|
21
|
+
export var CLASS_AUDIO_INLINE = 'e-audio-inline';
|
|
22
|
+
export var CLASS_CLICK_ELEM = 'e-clickelem';
|
|
23
|
+
export var CLASS_VIDEO_CLICK_ELEM = 'e-video-clickelem';
|
|
24
|
+
export var CLASS_AUDIO = 'e-rte-audio';
|
|
25
|
+
export var CLASS_VIDEO = 'e-rte-video';
|
|
26
|
+
export var CLASS_AUDIO_WRAP = 'e-audio-wrap';
|
|
27
|
+
export var CLASS_VIDEO_WRAP = 'e-video-wrap';
|
|
28
|
+
export var CLASS_EMBED_VIDEO_WRAP = 'e-embed-video-wrap';
|
|
29
|
+
export var CLASS_AUDIO_FOCUS = 'e-audio-focus';
|
|
30
|
+
export var CLASS_VIDEO_FOCUS = 'e-video-focus';
|
|
31
|
+
export var CLASS_VIDEO_INLINE = 'e-video-inline';
|
|
@@ -9,6 +9,8 @@ import { LinkCommand } from './../plugin/link';
|
|
|
9
9
|
import { Alignments } from './../plugin/alignments';
|
|
10
10
|
import { Indents } from './../plugin/indents';
|
|
11
11
|
import { ImageCommand } from './../plugin/image';
|
|
12
|
+
import { AudioCommand } from './../plugin/audio';
|
|
13
|
+
import { VideoCommand } from './../plugin/video';
|
|
12
14
|
import { TableCommand } from './../plugin/table';
|
|
13
15
|
import { SelectionBasedExec } from './../plugin/selection-exec';
|
|
14
16
|
import { InsertHtmlExec } from './../plugin/inserthtml-exec';
|
|
@@ -35,6 +37,8 @@ export declare class EditorManager {
|
|
|
35
37
|
alignmentObj: Alignments;
|
|
36
38
|
indentsObj: Indents;
|
|
37
39
|
imgObj: ImageCommand;
|
|
40
|
+
audioObj: AudioCommand;
|
|
41
|
+
videoObj: VideoCommand;
|
|
38
42
|
tableObj: TableCommand;
|
|
39
43
|
selectionObj: SelectionBasedExec;
|
|
40
44
|
inserthtmlObj: InsertHtmlExec;
|
|
@@ -8,6 +8,8 @@ import { LinkCommand } from './../plugin/link';
|
|
|
8
8
|
import { Alignments } from './../plugin/alignments';
|
|
9
9
|
import { Indents } from './../plugin/indents';
|
|
10
10
|
import { ImageCommand } from './../plugin/image';
|
|
11
|
+
import { AudioCommand } from './../plugin/audio';
|
|
12
|
+
import { VideoCommand } from './../plugin/video';
|
|
11
13
|
import { TableCommand } from './../plugin/table';
|
|
12
14
|
import { SelectionBasedExec } from './../plugin/selection-exec';
|
|
13
15
|
import { InsertHtmlExec } from './../plugin/inserthtml-exec';
|
|
@@ -44,6 +46,8 @@ var EditorManager = /** @class */ (function () {
|
|
|
44
46
|
this.indentsObj = new Indents(this);
|
|
45
47
|
this.linkObj = new LinkCommand(this);
|
|
46
48
|
this.imgObj = new ImageCommand(this);
|
|
49
|
+
this.audioObj = new AudioCommand(this);
|
|
50
|
+
this.videoObj = new VideoCommand(this);
|
|
47
51
|
this.selectionObj = new SelectionBasedExec(this);
|
|
48
52
|
this.inserthtmlObj = new InsertHtmlExec(this);
|
|
49
53
|
this.insertTextObj = new InsertTextExec(this);
|
|
@@ -126,6 +130,16 @@ var EditorManager = /** @class */ (function () {
|
|
|
126
130
|
command: command, value: value, item: exeValue, event: event, callBack: callBack, selector: selector
|
|
127
131
|
});
|
|
128
132
|
break;
|
|
133
|
+
case 'audios':
|
|
134
|
+
this.observer.notify(CONSTANT.AUDIO, {
|
|
135
|
+
command: command, value: value, item: exeValue, event: event, callBack: callBack, selector: selector
|
|
136
|
+
});
|
|
137
|
+
break;
|
|
138
|
+
case 'videos':
|
|
139
|
+
this.observer.notify(CONSTANT.VIDEO, {
|
|
140
|
+
command: command, value: value, item: exeValue, event: event, callBack: callBack, selector: selector
|
|
141
|
+
});
|
|
142
|
+
break;
|
|
129
143
|
case 'table':
|
|
130
144
|
switch (value.toString().toLocaleLowerCase()) {
|
|
131
145
|
case 'createtable':
|
|
@@ -97,6 +97,7 @@ export interface IHtmlItemArgs {
|
|
|
97
97
|
selectParent?: Node[];
|
|
98
98
|
src?: string;
|
|
99
99
|
url?: string;
|
|
100
|
+
isEmbedUrl?: string;
|
|
100
101
|
text?: string;
|
|
101
102
|
title?: string;
|
|
102
103
|
target?: string;
|
|
@@ -111,6 +112,7 @@ export interface IHtmlItemArgs {
|
|
|
111
112
|
height?: string | number;
|
|
112
113
|
};
|
|
113
114
|
altText?: string;
|
|
115
|
+
fileName?: string;
|
|
114
116
|
rows?: number;
|
|
115
117
|
columns?: number;
|
|
116
118
|
subCommand?: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EditorManager } from './../base/editor-manager';
|
|
2
|
+
import { IHtmlItem } from './../base/interface';
|
|
3
|
+
/**
|
|
4
|
+
* Audio internal component
|
|
5
|
+
*
|
|
6
|
+
* @hidden
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
export declare class AudioCommand {
|
|
10
|
+
private parent;
|
|
11
|
+
/**
|
|
12
|
+
* Constructor for creating the Audio plugin
|
|
13
|
+
*
|
|
14
|
+
* @param {EditorManager} parent - specifies the parent element
|
|
15
|
+
* @hidden
|
|
16
|
+
|
|
17
|
+
*/
|
|
18
|
+
constructor(parent: EditorManager);
|
|
19
|
+
private addEventListener;
|
|
20
|
+
/**
|
|
21
|
+
* audioCommand method
|
|
22
|
+
*
|
|
23
|
+
* @param {IHtmlItem} e - specifies the element
|
|
24
|
+
* @returns {void}
|
|
25
|
+
* @hidden
|
|
26
|
+
|
|
27
|
+
*/
|
|
28
|
+
audioCommand(e: IHtmlItem): void;
|
|
29
|
+
private createAudio;
|
|
30
|
+
private setStyle;
|
|
31
|
+
private callBack;
|
|
32
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { createElement, isNullOrUndefined as isNOU, detach, addClass, Browser } from '@syncfusion/ej2-base';
|
|
2
|
+
import * as CONSTANT from './../base/constant';
|
|
3
|
+
import * as classes from './../base/classes';
|
|
4
|
+
import { InsertHtml } from './inserthtml';
|
|
5
|
+
/**
|
|
6
|
+
* Audio internal component
|
|
7
|
+
*
|
|
8
|
+
* @hidden
|
|
9
|
+
|
|
10
|
+
*/
|
|
11
|
+
var AudioCommand = /** @class */ (function () {
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for creating the Audio plugin
|
|
14
|
+
*
|
|
15
|
+
* @param {EditorManager} parent - specifies the parent element
|
|
16
|
+
* @hidden
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
function AudioCommand(parent) {
|
|
20
|
+
this.parent = parent;
|
|
21
|
+
this.addEventListener();
|
|
22
|
+
}
|
|
23
|
+
AudioCommand.prototype.addEventListener = function () {
|
|
24
|
+
this.parent.observer.on(CONSTANT.AUDIO, this.audioCommand, this);
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* audioCommand method
|
|
28
|
+
*
|
|
29
|
+
* @param {IHtmlItem} e - specifies the element
|
|
30
|
+
* @returns {void}
|
|
31
|
+
* @hidden
|
|
32
|
+
|
|
33
|
+
*/
|
|
34
|
+
AudioCommand.prototype.audioCommand = function (e) {
|
|
35
|
+
var selectNode;
|
|
36
|
+
var value = e.value.toString().toLowerCase();
|
|
37
|
+
if (value === 'inline' || value === 'break' || value === 'audioremove') {
|
|
38
|
+
selectNode = e.item.selectNode[0];
|
|
39
|
+
}
|
|
40
|
+
switch (value) {
|
|
41
|
+
case 'audio':
|
|
42
|
+
case 'audioreplace':
|
|
43
|
+
this.createAudio(e);
|
|
44
|
+
break;
|
|
45
|
+
case 'inline':
|
|
46
|
+
selectNode.removeAttribute('class');
|
|
47
|
+
selectNode.closest('.' + classes.CLASS_AUDIO_WRAP).style.display = 'inline-block';
|
|
48
|
+
addClass([selectNode], [classes.CLASS_AUDIO, classes.CLASS_AUDIO_INLINE, classes.CLASS_AUDIO_FOCUS]);
|
|
49
|
+
this.callBack(e);
|
|
50
|
+
break;
|
|
51
|
+
case 'break':
|
|
52
|
+
selectNode.removeAttribute('class');
|
|
53
|
+
selectNode.closest('.' + classes.CLASS_AUDIO_WRAP).style.display = 'block';
|
|
54
|
+
addClass([selectNode], [classes.CLASS_AUDIO_BREAK, classes.CLASS_AUDIO, classes.CLASS_AUDIO_FOCUS]);
|
|
55
|
+
this.callBack(e);
|
|
56
|
+
break;
|
|
57
|
+
case 'audioremove':
|
|
58
|
+
detach(selectNode);
|
|
59
|
+
this.callBack(e);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
AudioCommand.prototype.createAudio = function (e) {
|
|
64
|
+
var _this = this;
|
|
65
|
+
var isReplaced = false;
|
|
66
|
+
var wrapElement;
|
|
67
|
+
if (!isNOU(e.item.selectParent) && e.item.selectParent[0].classList &&
|
|
68
|
+
(e.item.selectParent[0].classList.contains(classes.CLASS_CLICK_ELEM) ||
|
|
69
|
+
e.item.selectParent[0].classList.contains(classes.CLASS_AUDIO_WRAP))) {
|
|
70
|
+
var audioEle = e.item.selectParent[0].querySelector('source');
|
|
71
|
+
this.setStyle(audioEle, e);
|
|
72
|
+
isReplaced = true;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
wrapElement = createElement('span', { className: classes.CLASS_AUDIO_WRAP, attrs: { contentEditable: 'false', title: e.item.fileName } });
|
|
76
|
+
var audElement = createElement('audio', { className: classes.CLASS_AUDIO + ' ' + classes.CLASS_AUDIO_INLINE, attrs: { controls: '' } });
|
|
77
|
+
var sourceElement = createElement('source');
|
|
78
|
+
var clickElement = createElement('span', { className: classes.CLASS_CLICK_ELEM });
|
|
79
|
+
this.setStyle(sourceElement, e);
|
|
80
|
+
audElement.appendChild(sourceElement);
|
|
81
|
+
clickElement.appendChild(audElement);
|
|
82
|
+
wrapElement.appendChild(clickElement);
|
|
83
|
+
if (!isNOU(e.item.selection)) {
|
|
84
|
+
e.item.selection.restore();
|
|
85
|
+
}
|
|
86
|
+
InsertHtml.Insert(this.parent.currentDocument, wrapElement, this.parent.editableElement);
|
|
87
|
+
if (wrapElement.nextElementSibling === null) {
|
|
88
|
+
var insertElem = createElement('br');
|
|
89
|
+
wrapElement.parentNode.insertBefore(insertElem, wrapElement.nextSibling);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (e.callBack && (isNOU(e.selector) || !isNOU(e.selector) && e.selector !== 'pasteCleanupModule')) {
|
|
93
|
+
var selectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
94
|
+
var audioElm_1 = (e.value === 'AudioReplace' || isReplaced) ? e.item.selectParent[0].querySelector('audio')
|
|
95
|
+
: (Browser.isIE ? selectedNode : selectedNode.querySelector('audio'));
|
|
96
|
+
audioElm_1.addEventListener('loadeddata', function () {
|
|
97
|
+
if (e.value !== 'AudioReplace' || !isReplaced) {
|
|
98
|
+
e.callBack({
|
|
99
|
+
requestType: 'Audios',
|
|
100
|
+
editorMode: 'HTML',
|
|
101
|
+
event: e.event,
|
|
102
|
+
range: _this.parent.nodeSelection.getRange(_this.parent.currentDocument),
|
|
103
|
+
elements: [audioElm_1]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
if (isReplaced) {
|
|
108
|
+
audioElm_1.load();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
AudioCommand.prototype.setStyle = function (sourceElement, e) {
|
|
113
|
+
if (!isNOU(e.item.url)) {
|
|
114
|
+
sourceElement.setAttribute('src', e.item.url);
|
|
115
|
+
}
|
|
116
|
+
sourceElement.type = e.item.fileName && e.item.fileName.split('.').length > 0 ?
|
|
117
|
+
'audio/' + e.item.fileName.split('.')[e.item.fileName.split('.').length - 1] :
|
|
118
|
+
e.item.url && e.item.url.split('.').length > 0 ? 'audio/' + e.item.url.split('.')[e.item.url.split('.').length - 1] : '';
|
|
119
|
+
};
|
|
120
|
+
AudioCommand.prototype.callBack = function (e) {
|
|
121
|
+
if (e.callBack) {
|
|
122
|
+
e.callBack({
|
|
123
|
+
requestType: e.item.subCommand,
|
|
124
|
+
editorMode: 'HTML',
|
|
125
|
+
event: e.event,
|
|
126
|
+
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
127
|
+
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
return AudioCommand;
|
|
132
|
+
}());
|
|
133
|
+
export { AudioCommand };
|
|
@@ -541,7 +541,7 @@ var DOMNode = /** @class */ (function () {
|
|
|
541
541
|
markerStart.appendChild(start);
|
|
542
542
|
}
|
|
543
543
|
else {
|
|
544
|
-
if (start.nodeType
|
|
544
|
+
if (start.nodeType !== 3 && start.nodeName !== '#text') {
|
|
545
545
|
var marker = this.marker(markerClassName.startSelection, '');
|
|
546
546
|
append([this.parseHTMLFragment(marker)], start);
|
|
547
547
|
}
|
|
@@ -198,7 +198,7 @@ var ImageCommand = /** @class */ (function () {
|
|
|
198
198
|
}
|
|
199
199
|
else {
|
|
200
200
|
detach(selectParent);
|
|
201
|
-
if (Browser.isIE) {
|
|
201
|
+
if (Browser.isIE && e.item.selection) {
|
|
202
202
|
e.item.selection.restore();
|
|
203
203
|
}
|
|
204
204
|
InsertHtml.Insert(this.parent.currentDocument, e.item.insertElement, this.parent.editableElement);
|
|
@@ -320,7 +320,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
320
320
|
InsertHtml.getNodeCollection = function (range, nodeSelection, node) {
|
|
321
321
|
var nodes = [];
|
|
322
322
|
if (range.startOffset === range.endOffset && range.startContainer === range.endContainer &&
|
|
323
|
-
range.startContainer.nodeName
|
|
323
|
+
range.startContainer.nodeName !== 'BR' && range.startContainer.childNodes.length > 0 &&
|
|
324
324
|
(range.startContainer.nodeName === 'TD' || (range.startContainer.nodeType !== 3 &&
|
|
325
325
|
node.classList && node.classList.contains('pasteContent')))) {
|
|
326
326
|
nodes.push(range.startContainer.childNodes[range.endOffset]);
|
|
@@ -26,8 +26,8 @@ var Lists = /** @class */ (function () {
|
|
|
26
26
|
}
|
|
27
27
|
Lists.prototype.addEventListener = function () {
|
|
28
28
|
this.parent.observer.on(EVENTS.LIST_TYPE, this.applyListsHandler, this);
|
|
29
|
-
this.parent.observer.on(EVENTS.KEY_DOWN_HANDLER, this.keyDownHandler, this);
|
|
30
29
|
this.parent.observer.on(EVENTS.KEY_UP_HANDLER, this.onKeyUp, this);
|
|
30
|
+
this.parent.observer.on(EVENTS.KEY_DOWN_HANDLER, this.keyDownHandler, this);
|
|
31
31
|
this.parent.observer.on(EVENTS.SPACE_ACTION, this.spaceKeyAction, this);
|
|
32
32
|
};
|
|
33
33
|
Lists.prototype.testList = function (elem) {
|
|
@@ -192,9 +192,9 @@ var Lists = /** @class */ (function () {
|
|
|
192
192
|
if (((range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'LI') &&
|
|
193
193
|
isNOU(endNode.nextElementSibling) && endNode.textContent.length === range.endOffset &&
|
|
194
194
|
isNOU(startNode.previousElementSibling) && range.startOffset === 0) ||
|
|
195
|
-
(Browser.userAgent.indexOf('Firefox')
|
|
195
|
+
(Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
196
196
|
range.startOffset === 0 && range.endOffset === 1)) {
|
|
197
|
-
if (Browser.userAgent.indexOf('Firefox')
|
|
197
|
+
if (Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
198
198
|
detach(range.commonAncestorContainer.childNodes[0]);
|
|
199
199
|
}
|
|
200
200
|
else if (range.commonAncestorContainer.nodeName === 'LI') {
|
|
@@ -472,10 +472,12 @@ var Lists = /** @class */ (function () {
|
|
|
472
472
|
};
|
|
473
473
|
Lists.prototype.applyListsHandler = function (e) {
|
|
474
474
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
475
|
-
if (Browser.userAgent.indexOf('Firefox')
|
|
475
|
+
if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement) {
|
|
476
476
|
var startChildNodes = range.startContainer.childNodes;
|
|
477
|
-
var startNode = ((startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) :
|
|
478
|
-
|
|
477
|
+
var startNode = ((startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) :
|
|
478
|
+
range.startOffset]) || range.startContainer);
|
|
479
|
+
var endNode = (range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) :
|
|
480
|
+
range.endOffset] || range.endContainer);
|
|
479
481
|
var lastSelectionNode = endNode.lastChild.nodeName === 'BR' ? (isNOU(endNode.lastChild.previousSibling) ? endNode
|
|
480
482
|
: endNode.lastChild.previousSibling) : endNode.lastChild;
|
|
481
483
|
while (!isNOU(lastSelectionNode) && lastSelectionNode.nodeName !== '#text' && lastSelectionNode.nodeName !== 'IMG' &&
|
|
@@ -487,8 +489,8 @@ var Lists = /** @class */ (function () {
|
|
|
487
489
|
}
|
|
488
490
|
if (range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
489
491
|
range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
490
|
-
this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName
|
|
491
|
-
this.parent.editableElement.childNodes[0].nodeName
|
|
492
|
+
this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName !== 'TABLE' &&
|
|
493
|
+
this.parent.editableElement.childNodes[0].nodeName !== 'IMG')) {
|
|
492
494
|
var focusNode = range.startContainer.childNodes[0];
|
|
493
495
|
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, focusNode, focusNode, 0, 0);
|
|
494
496
|
range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
@@ -525,36 +525,36 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
525
525
|
var currentListClass;
|
|
526
526
|
if (type === 'ol') {
|
|
527
527
|
switch (listContent.split('.')[0]) {
|
|
528
|
-
case
|
|
529
|
-
currentListClass =
|
|
528
|
+
case 'A':
|
|
529
|
+
currentListClass = 'upper-alpha';
|
|
530
530
|
break;
|
|
531
|
-
case
|
|
532
|
-
currentListClass =
|
|
531
|
+
case 'a':
|
|
532
|
+
currentListClass = 'lower-alpha';
|
|
533
533
|
break;
|
|
534
|
-
case
|
|
535
|
-
currentListClass =
|
|
534
|
+
case 'I':
|
|
535
|
+
currentListClass = 'upper-roman';
|
|
536
536
|
break;
|
|
537
|
-
case
|
|
538
|
-
currentListClass =
|
|
537
|
+
case 'i':
|
|
538
|
+
currentListClass = 'lower-roman';
|
|
539
539
|
break;
|
|
540
|
-
case
|
|
541
|
-
currentListClass =
|
|
540
|
+
case 'α':
|
|
541
|
+
currentListClass = 'lower-greek';
|
|
542
542
|
break;
|
|
543
543
|
default:
|
|
544
|
-
currentListClass =
|
|
544
|
+
currentListClass = 'decimal';
|
|
545
545
|
break;
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
else {
|
|
549
549
|
switch (listContent.split('.')[0]) {
|
|
550
|
-
case
|
|
551
|
-
currentListClass =
|
|
550
|
+
case 'o':
|
|
551
|
+
currentListClass = 'circle';
|
|
552
552
|
break;
|
|
553
|
-
case
|
|
554
|
-
currentListClass =
|
|
553
|
+
case '§':
|
|
554
|
+
currentListClass = 'square';
|
|
555
555
|
break;
|
|
556
556
|
default:
|
|
557
|
-
currentListClass =
|
|
557
|
+
currentListClass = 'disc';
|
|
558
558
|
break;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
@@ -598,8 +598,8 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
598
598
|
for (var j = 0; j < collection[index].nestedLevel - pLevel; j++) {
|
|
599
599
|
prevList.appendChild(temp = createElement(collection[index].listType));
|
|
600
600
|
prevList = createElement('li');
|
|
601
|
-
if (j
|
|
602
|
-
prevList.style.listStyleType =
|
|
601
|
+
if (j !== collection[index].nestedLevel - pLevel - 1 && collection[index].nestedLevel - pLevel > 1) {
|
|
602
|
+
prevList.style.listStyleType = 'none';
|
|
603
603
|
}
|
|
604
604
|
temp.appendChild(prevList);
|
|
605
605
|
}
|
|
@@ -50,7 +50,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
50
50
|
fragment = this.spliceEmptyNode(fragment, false);
|
|
51
51
|
if (fragment && fragment.childNodes.length > 0) {
|
|
52
52
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
|
|
53
|
-
&& this.
|
|
53
|
+
&& this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
|
|
54
54
|
if (!isEmpty) {
|
|
55
55
|
if (node) {
|
|
56
56
|
InsertMethods.AppendBefore(fragment, node);
|
|
@@ -71,7 +71,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
71
71
|
fragment = this.spliceEmptyNode(fragment, true);
|
|
72
72
|
if (fragment && fragment.childNodes.length > 0) {
|
|
73
73
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
|
|
74
|
-
&& this.
|
|
74
|
+
&& this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
|
|
75
75
|
if (!isEmpty) {
|
|
76
76
|
if (node) {
|
|
77
77
|
InsertMethods.AppendBefore(fragment, node, true);
|
|
@@ -92,12 +92,14 @@ var NodeCutter = /** @class */ (function () {
|
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
NodeCutter.prototype.
|
|
95
|
+
NodeCutter.prototype.isRteElm = function (fragment) {
|
|
96
96
|
var result = true;
|
|
97
97
|
if (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG') {
|
|
98
98
|
var firstChild = fragment.childNodes[0];
|
|
99
99
|
for (var i = 0; !isNOU(firstChild.childNodes) && i < firstChild.childNodes.length; i++) {
|
|
100
|
-
if (firstChild.childNodes[i].nodeName === 'IMG'
|
|
100
|
+
if (firstChild.childNodes[i].nodeName === 'IMG' || (firstChild.childNodes[i].nodeName === 'SPAN' &&
|
|
101
|
+
(firstChild.childNodes[i].classList.contains('e-video-wrap') ||
|
|
102
|
+
firstChild.childNodes[i].classList.contains('e-audio-wrap')))) {
|
|
101
103
|
result = false;
|
|
102
104
|
}
|
|
103
105
|
}
|
|
@@ -122,7 +124,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
122
124
|
else if (len > -1) {
|
|
123
125
|
this.spliceEmptyNode(fragment.childNodes[0], isStart);
|
|
124
126
|
}
|
|
125
|
-
else if (fragment.nodeType !== 3 && fragment.nodeType !== 11 && fragment.nodeName !== 'IMG') {
|
|
127
|
+
else if (fragment.nodeType !== 3 && fragment.nodeType !== 11 && fragment.nodeName !== 'IMG' && !(fragment.classList.contains('e-video-wrap')) && !(fragment.classList.contains('e-audio-wrap'))) {
|
|
126
128
|
fragment.parentNode.removeChild(fragment);
|
|
127
129
|
}
|
|
128
130
|
return fragment;
|
|
@@ -56,8 +56,9 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
56
56
|
}
|
|
57
57
|
else if (range.startContainer.nodeType === 3 && ((range.startContainer.parentElement.childElementCount > 0 &&
|
|
58
58
|
range.startOffset > 0 && range.startContainer.parentElement.firstElementChild.tagName.toLowerCase() !== 'br') ||
|
|
59
|
-
!isNOU(currentFormatNode) && currentFormatNode ===
|
|
60
|
-
(
|
|
59
|
+
!isNOU(currentFormatNode) && currentFormatNode ===
|
|
60
|
+
(range.startContainer.parentElement.closest(currentSelector)) &&
|
|
61
|
+
((range.startContainer.parentElement.closest(currentSelector)).textContent.replace(new RegExp(String.fromCharCode(8203), 'g'), '').trim().length !== 0))) {
|
|
61
62
|
isCollapsed = true;
|
|
62
63
|
range = nodeCutter.GetCursorRange(docElement, range, range.startContainer);
|
|
63
64
|
nodes.push(range.startContainer);
|
|
@@ -566,8 +566,9 @@ var TableCommand = /** @class */ (function () {
|
|
|
566
566
|
if (min < (max = Math.min(max, eleArray.length - 1))) {
|
|
567
567
|
for (rowValue = min; rowValue <= max; rowValue++) {
|
|
568
568
|
// eslint-disable-next-line
|
|
569
|
-
if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0])
|
|
570
|
-
1 < (index = Math.min(parseInt(eleArray[rowValue][0].getAttribute('rowspan'), 10) ||
|
|
569
|
+
if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0])
|
|
570
|
+
&& eleArray[rowValue][0] && 1 < (index = Math.min(parseInt(eleArray[rowValue][0].getAttribute('rowspan'), 10) ||
|
|
571
|
+
1, max - min + 1)) && eleArray[rowValue][0] === eleArray[rowValue + 1][0]) {
|
|
571
572
|
for (count = index - 1, colIndex = 1; colIndex < eleArray[0].length; colIndex++) {
|
|
572
573
|
if (eleArray[rowValue][colIndex] !== eleArray[rowValue][colIndex - 1]) {
|
|
573
574
|
for (rowMin = rowValue; rowMin < rowValue + index; rowMin++) {
|
|
@@ -96,7 +96,8 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
96
96
|
*/
|
|
97
97
|
UndoRedoManager.prototype.saveData = function (e) {
|
|
98
98
|
var range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
99
|
-
var currentContainer = this.parent.editableElement === range.startContainer.parentElement ?
|
|
99
|
+
var currentContainer = this.parent.editableElement === range.startContainer.parentElement ?
|
|
100
|
+
range.startContainer.parentElement : range.startContainer;
|
|
100
101
|
for (var i = currentContainer.childNodes.length - 1; i >= 0; i--) {
|
|
101
102
|
if (!isNullOrUndefined(currentContainer.childNodes[i]) && currentContainer.childNodes[i].nodeName === '#text' &&
|
|
102
103
|
currentContainer.childNodes[i].textContent.length === 0 && currentContainer.childNodes[i].nodeName !== 'IMG' &&
|