@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.43-569781
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 +1927 -1749
- 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 +3069 -1283
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +3173 -1386
- 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 +74 -74
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -1
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/interface.d.ts +19 -7
- package/src/common/types.d.ts +6 -0
- package/src/common/util.d.ts +6 -0
- package/src/common/util.js +61 -20
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/base/editor-manager.d.ts +8 -3
- package/src/editor-manager/base/editor-manager.js +62 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +17 -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 +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +16 -6
- 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 +39 -35
- package/src/editor-manager/plugin/dom-node.js +203 -62
- package/src/editor-manager/plugin/format-painter-actions.d.ts +2 -1
- package/src/editor-manager/plugin/format-painter-actions.js +20 -2
- package/src/editor-manager/plugin/formats.d.ts +3 -2
- package/src/editor-manager/plugin/formats.js +40 -5
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +41 -18
- 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 +3 -2
- package/src/editor-manager/plugin/inserthtml.js +69 -9
- 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 +6 -3
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +123 -67
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +4 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +216 -86
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +8 -8
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -1
- package/src/editor-manager/plugin/selection-commands.js +166 -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 -3
- package/src/editor-manager/plugin/table.js +35 -32
- package/src/editor-manager/plugin/toolbar-status.d.ts +4 -4
- package/src/editor-manager/plugin/toolbar-status.js +22 -12
- package/src/editor-manager/plugin/undo.d.ts +7 -6
- package/src/editor-manager/plugin/undo.js +27 -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 +12 -12
- package/src/rich-text-editor/actions/base-quick-toolbar.js +75 -24
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +35 -37
- package/src/rich-text-editor/actions/color-picker.d.ts +3 -2
- package/src/rich-text-editor/actions/color-picker.js +15 -5
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +4 -4
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +27 -6
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +16 -7
- package/src/rich-text-editor/actions/enter-key.js +6 -4
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +8 -7
- package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
- package/src/rich-text-editor/actions/html-editor.js +137 -22
- 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 +23 -21
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +5 -3
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +6 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +157 -29
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +16 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +54 -20
- package/src/rich-text-editor/actions/resize.js +2 -1
- package/src/rich-text-editor/actions/toolbar-action.js +1 -1
- package/src/rich-text-editor/actions/toolbar.d.ts +16 -16
- package/src/rich-text-editor/actions/toolbar.js +48 -109
- 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 +125 -125
- package/src/rich-text-editor/base/classes.js +125 -125
- package/src/rich-text-editor/base/constant.d.ts +195 -150
- package/src/rich-text-editor/base/constant.js +364 -150
- 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 +96 -52
- 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 +76 -64
- package/src/rich-text-editor/base/rich-text-editor.js +259 -163
- package/src/rich-text-editor/base/util.d.ts +5 -1
- package/src/rich-text-editor/base/util.js +58 -6
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +23 -12
- 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/default-locale.js +31 -25
- 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/items.js +3 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +20 -20
- package/src/rich-text-editor/renderer/audio-module.d.ts +2 -1
- package/src/rich-text-editor/renderer/audio-module.js +14 -1
- 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 +4 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +24 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +19 -18
- package/src/rich-text-editor/renderer/image-module.d.ts +10 -2
- package/src/rich-text-editor/renderer/image-module.js +261 -220
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +54 -25
- 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 +11 -2
- package/src/rich-text-editor/renderer/table-module.js +331 -166
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +13 -15
- package/src/rich-text-editor/renderer/toolbar-renderer.js +114 -115
- package/src/rich-text-editor/renderer/video-module.d.ts +4 -1
- package/src/rich-text-editor/renderer/video-module.js +62 -35
- package/src/rich-text-editor/renderer/view-source.d.ts +7 -6
- package/src/rich-text-editor/renderer/view-source.js +21 -11
- 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 +25 -22
- package/styles/_all.scss +1 -1
- package/styles/bootstrap-dark.css +345 -99
- package/styles/bootstrap.css +353 -108
- package/styles/bootstrap4.css +337 -95
- package/styles/bootstrap5-dark.css +343 -96
- package/styles/bootstrap5.css +343 -96
- package/styles/fabric-dark.css +331 -89
- package/styles/fabric.css +332 -90
- package/styles/fluent-dark.css +342 -92
- package/styles/fluent.css +342 -92
- package/styles/highcontrast-light.css +331 -89
- package/styles/highcontrast.css +335 -90
- package/styles/material-dark.css +337 -90
- package/styles/material.css +337 -90
- package/styles/material3-dark.css +347 -99
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +347 -99
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +281 -277
- package/styles/rich-text-editor/_bootstrap-definition.scss +337 -334
- package/styles/rich-text-editor/_bootstrap4-definition.scss +464 -460
- package/styles/rich-text-editor/_bootstrap5-definition.scss +266 -262
- package/styles/rich-text-editor/_fabric-dark-definition.scss +263 -259
- package/styles/rich-text-editor/_fabric-definition.scss +261 -257
- package/styles/rich-text-editor/_fluent-definition.scss +267 -263
- package/styles/rich-text-editor/_fusionnew-definition.scss +265 -261
- package/styles/rich-text-editor/_highcontrast-definition.scss +261 -257
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +261 -257
- package/styles/rich-text-editor/_layout.scss +2249 -2072
- package/styles/rich-text-editor/_material-dark-definition.scss +266 -262
- package/styles/rich-text-editor/_material-definition.scss +264 -260
- package/styles/rich-text-editor/_material3-definition.scss +266 -262
- package/styles/rich-text-editor/_tailwind-definition.scss +261 -257
- package/styles/rich-text-editor/_theme.scss +906 -837
- package/styles/rich-text-editor/bootstrap-dark.css +345 -99
- package/styles/rich-text-editor/bootstrap.css +353 -108
- package/styles/rich-text-editor/bootstrap4.css +337 -95
- package/styles/rich-text-editor/bootstrap5-dark.css +343 -96
- package/styles/rich-text-editor/bootstrap5.css +343 -96
- package/styles/rich-text-editor/fabric-dark.css +331 -89
- package/styles/rich-text-editor/fabric.css +332 -90
- package/styles/rich-text-editor/fluent-dark.css +342 -92
- package/styles/rich-text-editor/fluent.css +342 -92
- package/styles/rich-text-editor/highcontrast-light.css +331 -89
- package/styles/rich-text-editor/highcontrast.css +335 -90
- package/styles/rich-text-editor/icons/_bds.scss +348 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
- package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_fabric.scss +349 -349
- package/styles/rich-text-editor/icons/_fluent.scss +348 -348
- package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
- package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
- package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_material.scss +349 -349
- package/styles/rich-text-editor/icons/_material3.scss +348 -348
- package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
- package/styles/rich-text-editor/material-dark.css +337 -90
- package/styles/rich-text-editor/material.css +337 -90
- package/styles/rich-text-editor/material3-dark.css +347 -99
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +347 -99
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +386 -116
- package/styles/rich-text-editor/tailwind.css +386 -116
- package/styles/tailwind-dark.css +386 -116
- package/styles/tailwind.css +386 -116
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
- 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
|
@@ -3,7 +3,7 @@ import { IMDTable } from './../base/interface';
|
|
|
3
3
|
* Link internal component
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
export declare class MDTable {
|
|
9
9
|
private parent;
|
|
@@ -16,7 +16,7 @@ export declare class MDTable {
|
|
|
16
16
|
*
|
|
17
17
|
* @param {IMDTable} options - specifies the options
|
|
18
18
|
* @hidden
|
|
19
|
-
|
|
19
|
+
* @deprecated
|
|
20
20
|
*/
|
|
21
21
|
constructor(options: IMDTable);
|
|
22
22
|
private addEventListener;
|
|
@@ -26,7 +26,7 @@ export declare class MDTable {
|
|
|
26
26
|
*
|
|
27
27
|
* @returns {void}
|
|
28
28
|
* @hidden
|
|
29
|
-
|
|
29
|
+
* @deprecated
|
|
30
30
|
*/
|
|
31
31
|
destroy(): void;
|
|
32
32
|
private onKeyDown;
|
|
@@ -5,7 +5,7 @@ import * as EVENTS from './../../common/constant';
|
|
|
5
5
|
* Link internal component
|
|
6
6
|
*
|
|
7
7
|
* @hidden
|
|
8
|
-
|
|
8
|
+
* @deprecated
|
|
9
9
|
*/
|
|
10
10
|
var MDTable = /** @class */ (function () {
|
|
11
11
|
/**
|
|
@@ -13,7 +13,7 @@ var MDTable = /** @class */ (function () {
|
|
|
13
13
|
*
|
|
14
14
|
* @param {IMDTable} options - specifies the options
|
|
15
15
|
* @hidden
|
|
16
|
-
|
|
16
|
+
* @deprecated
|
|
17
17
|
*/
|
|
18
18
|
function MDTable(options) {
|
|
19
19
|
extend(this, this, options, true);
|
|
@@ -33,7 +33,7 @@ var MDTable = /** @class */ (function () {
|
|
|
33
33
|
*
|
|
34
34
|
* @returns {void}
|
|
35
35
|
* @hidden
|
|
36
|
-
|
|
36
|
+
* @deprecated
|
|
37
37
|
*/
|
|
38
38
|
MDTable.prototype.destroy = function () {
|
|
39
39
|
this.removeEventListener();
|
|
@@ -24,7 +24,7 @@ export declare class UndoRedoCommands {
|
|
|
24
24
|
* @function destroy
|
|
25
25
|
* @returns {void}
|
|
26
26
|
* @hidden
|
|
27
|
-
|
|
27
|
+
* @deprecated
|
|
28
28
|
*/
|
|
29
29
|
destroy(): void;
|
|
30
30
|
/**
|
|
@@ -33,7 +33,7 @@ export declare class UndoRedoCommands {
|
|
|
33
33
|
* @param {IMarkdownSubCommands} e - specifies the sub commands
|
|
34
34
|
* @returns {void}
|
|
35
35
|
* @hidden
|
|
36
|
-
|
|
36
|
+
* @deprecated
|
|
37
37
|
*/
|
|
38
38
|
onAction(e: IMarkdownSubCommands): void;
|
|
39
39
|
private keyDown;
|
|
@@ -45,7 +45,7 @@ export declare class UndoRedoCommands {
|
|
|
45
45
|
* @function saveData
|
|
46
46
|
* @returns {void}
|
|
47
47
|
* @hidden
|
|
48
|
-
|
|
48
|
+
* @deprecated
|
|
49
49
|
*/
|
|
50
50
|
saveData(e?: KeyboardEvent | MouseEvent | IUndoCallBack): void;
|
|
51
51
|
/**
|
|
@@ -55,7 +55,7 @@ export declare class UndoRedoCommands {
|
|
|
55
55
|
* @function undo
|
|
56
56
|
* @returns {void}
|
|
57
57
|
* @hidden
|
|
58
|
-
|
|
58
|
+
* @deprecated
|
|
59
59
|
*/
|
|
60
60
|
undo(e?: IMarkdownSubCommands | IMDKeyboardEvent): void;
|
|
61
61
|
/**
|
|
@@ -65,7 +65,7 @@ export declare class UndoRedoCommands {
|
|
|
65
65
|
* @function redo
|
|
66
66
|
* @returns {void}
|
|
67
67
|
* @hidden
|
|
68
|
-
|
|
68
|
+
* @deprecated
|
|
69
69
|
*/
|
|
70
70
|
redo(e?: IMarkdownSubCommands | IMDKeyboardEvent): void;
|
|
71
71
|
private restore;
|
|
@@ -74,7 +74,7 @@ export declare class UndoRedoCommands {
|
|
|
74
74
|
*
|
|
75
75
|
* @returns {boolean} - returns the boolean value
|
|
76
76
|
* @hidden
|
|
77
|
-
|
|
77
|
+
* @deprecated
|
|
78
78
|
*/
|
|
79
79
|
getUndoStatus(): {
|
|
80
80
|
[key: string]: boolean;
|
|
@@ -45,7 +45,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
45
45
|
* @function destroy
|
|
46
46
|
* @returns {void}
|
|
47
47
|
* @hidden
|
|
48
|
-
|
|
48
|
+
* @deprecated
|
|
49
49
|
*/
|
|
50
50
|
UndoRedoCommands.prototype.destroy = function () {
|
|
51
51
|
this.removeEventListener();
|
|
@@ -56,7 +56,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
56
56
|
* @param {IMarkdownSubCommands} e - specifies the sub commands
|
|
57
57
|
* @returns {void}
|
|
58
58
|
* @hidden
|
|
59
|
-
|
|
59
|
+
* @deprecated
|
|
60
60
|
*/
|
|
61
61
|
UndoRedoCommands.prototype.onAction = function (e) {
|
|
62
62
|
if (e.subCommand === 'Undo') {
|
|
@@ -93,7 +93,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
93
93
|
* @function saveData
|
|
94
94
|
* @returns {void}
|
|
95
95
|
* @hidden
|
|
96
|
-
|
|
96
|
+
* @deprecated
|
|
97
97
|
*/
|
|
98
98
|
UndoRedoCommands.prototype.saveData = function (e) {
|
|
99
99
|
var textArea = this.parent.element;
|
|
@@ -126,7 +126,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
126
126
|
* @function undo
|
|
127
127
|
* @returns {void}
|
|
128
128
|
* @hidden
|
|
129
|
-
|
|
129
|
+
* @deprecated
|
|
130
130
|
*/
|
|
131
131
|
UndoRedoCommands.prototype.undo = function (e) {
|
|
132
132
|
if (this.steps > 0) {
|
|
@@ -147,7 +147,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
147
147
|
* @function redo
|
|
148
148
|
* @returns {void}
|
|
149
149
|
* @hidden
|
|
150
|
-
|
|
150
|
+
* @deprecated
|
|
151
151
|
*/
|
|
152
152
|
UndoRedoCommands.prototype.redo = function (e) {
|
|
153
153
|
if (this.undoRedoStack[this.steps + 1] != null) {
|
|
@@ -177,7 +177,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
177
177
|
*
|
|
178
178
|
* @returns {boolean} - returns the boolean value
|
|
179
179
|
* @hidden
|
|
180
|
-
|
|
180
|
+
* @deprecated
|
|
181
181
|
*/
|
|
182
182
|
UndoRedoCommands.prototype.getUndoStatus = function () {
|
|
183
183
|
var status = { undo: false, redo: false };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
2
|
-
import { IRichTextEditor } from '../base/interface';
|
|
2
|
+
import { IRichTextEditor, IBaseQuickToolbar } from '../base/interface';
|
|
3
3
|
import { IToolbarItems, IQuickToolbarOptions } from '../base/interface';
|
|
4
4
|
import { ServiceLocator } from '../services/service-locator';
|
|
5
5
|
import { BaseToolbar } from './base-toolbar';
|
|
@@ -7,10 +7,10 @@ import { RichTextEditorModel } from '../base/rich-text-editor-model';
|
|
|
7
7
|
/**
|
|
8
8
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
9
9
|
*/
|
|
10
|
-
export declare class BaseQuickToolbar {
|
|
10
|
+
export declare class BaseQuickToolbar implements IBaseQuickToolbar {
|
|
11
11
|
popupObj: Popup;
|
|
12
12
|
element: HTMLElement;
|
|
13
|
-
|
|
13
|
+
isRendered: boolean;
|
|
14
14
|
quickTBarObj: BaseToolbar;
|
|
15
15
|
private stringItems;
|
|
16
16
|
private dropDownButtons;
|
|
@@ -30,7 +30,7 @@ export declare class BaseQuickToolbar {
|
|
|
30
30
|
* @param {IQuickToolbarOptions} args - specifies the arguments
|
|
31
31
|
* @returns {void}
|
|
32
32
|
* @hidden
|
|
33
|
-
|
|
33
|
+
* @deprecated
|
|
34
34
|
*/
|
|
35
35
|
render(args: IQuickToolbarOptions): void;
|
|
36
36
|
private createToolbar;
|
|
@@ -45,7 +45,7 @@ export declare class BaseQuickToolbar {
|
|
|
45
45
|
* @param {string} type - specifies the type
|
|
46
46
|
* @returns {void}
|
|
47
47
|
* @hidden
|
|
48
|
-
|
|
48
|
+
* @deprecated
|
|
49
49
|
*/
|
|
50
50
|
showPopup(x: number, y: number, target: Element, type?: string): void;
|
|
51
51
|
/**
|
|
@@ -53,7 +53,7 @@ export declare class BaseQuickToolbar {
|
|
|
53
53
|
*
|
|
54
54
|
* @returns {void}
|
|
55
55
|
* @hidden
|
|
56
|
-
|
|
56
|
+
* @deprecated
|
|
57
57
|
*/
|
|
58
58
|
hidePopup(): void;
|
|
59
59
|
/**
|
|
@@ -61,14 +61,14 @@ export declare class BaseQuickToolbar {
|
|
|
61
61
|
* @param {number} index - specifies the index value
|
|
62
62
|
* @returns {void}
|
|
63
63
|
* @hidden
|
|
64
|
-
|
|
64
|
+
* @deprecated
|
|
65
65
|
*/
|
|
66
66
|
addQTBarItem(item: (string | IToolbarItems)[], index: number): void;
|
|
67
67
|
/**
|
|
68
68
|
* @param {number} index - specifies the index value
|
|
69
69
|
* @returns {void}
|
|
70
70
|
* @hidden
|
|
71
|
-
|
|
71
|
+
* @deprecated
|
|
72
72
|
*/
|
|
73
73
|
removeQTBarItem(index: number | HTMLElement[] | Element[]): void;
|
|
74
74
|
private removeEleFromDOM;
|
|
@@ -79,7 +79,7 @@ export declare class BaseQuickToolbar {
|
|
|
79
79
|
* @function destroy
|
|
80
80
|
* @returns {void}
|
|
81
81
|
* @hidden
|
|
82
|
-
|
|
82
|
+
* @deprecated
|
|
83
83
|
*/
|
|
84
84
|
destroy(): void;
|
|
85
85
|
/**
|
|
@@ -87,7 +87,7 @@ export declare class BaseQuickToolbar {
|
|
|
87
87
|
*
|
|
88
88
|
* @returns {void}
|
|
89
89
|
* @hidden
|
|
90
|
-
|
|
90
|
+
* @deprecated
|
|
91
91
|
*/
|
|
92
92
|
addEventListener(): void;
|
|
93
93
|
/**
|
|
@@ -96,7 +96,7 @@ export declare class BaseQuickToolbar {
|
|
|
96
96
|
* @param {RichTextEditorModel} e - specifies the model element
|
|
97
97
|
* @returns {void}
|
|
98
98
|
* @hidden
|
|
99
|
-
|
|
99
|
+
* @deprecated
|
|
100
100
|
*/
|
|
101
101
|
protected onPropertyChanged(e: {
|
|
102
102
|
[key: string]: RichTextEditorModel;
|
|
@@ -106,7 +106,7 @@ export declare class BaseQuickToolbar {
|
|
|
106
106
|
*
|
|
107
107
|
* @returns {void}
|
|
108
108
|
* @hidden
|
|
109
|
-
|
|
109
|
+
* @deprecated
|
|
110
110
|
*/
|
|
111
111
|
removeEventListener(): void;
|
|
112
112
|
}
|
|
@@ -15,7 +15,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
15
15
|
function BaseQuickToolbar(parent, locator) {
|
|
16
16
|
this.parent = parent;
|
|
17
17
|
this.locator = locator;
|
|
18
|
-
this.
|
|
18
|
+
this.isRendered = false;
|
|
19
19
|
this.renderFactory = this.locator.getService('rendererFactory');
|
|
20
20
|
this.contentRenderer = this.renderFactory.getRenderer(RenderType.Content);
|
|
21
21
|
this.popupRenderer = this.renderFactory.getRenderer(RenderType.Popup);
|
|
@@ -24,6 +24,9 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
24
24
|
}
|
|
25
25
|
BaseQuickToolbar.prototype.appendPopupContent = function () {
|
|
26
26
|
this.toolbarElement = this.parent.createElement('div', { className: classes.CLS_QUICK_TB });
|
|
27
|
+
if (this.element.classList.contains(classes.CLS_TEXT_POP)) {
|
|
28
|
+
this.toolbarElement.classList.add(classes.CLS_TEXT_QUICK_TB);
|
|
29
|
+
}
|
|
27
30
|
this.element.appendChild(this.toolbarElement);
|
|
28
31
|
};
|
|
29
32
|
/**
|
|
@@ -32,7 +35,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
32
35
|
* @param {IQuickToolbarOptions} args - specifies the arguments
|
|
33
36
|
* @returns {void}
|
|
34
37
|
* @hidden
|
|
35
|
-
|
|
38
|
+
* @deprecated
|
|
36
39
|
*/
|
|
37
40
|
BaseQuickToolbar.prototype.render = function (args) {
|
|
38
41
|
var className;
|
|
@@ -76,7 +79,18 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
76
79
|
e.target.classList.contains('e-imgbreak')) ? false : true;
|
|
77
80
|
var target = !isNOU(imgWrapper) ? imgWrapper : e.target;
|
|
78
81
|
addClass([this.toolbarElement], [classes.CLS_RM_WHITE_SPACE]);
|
|
79
|
-
var targetOffsetTop
|
|
82
|
+
var targetOffsetTop;
|
|
83
|
+
if (!isNOU(closest(target, 'table'))) {
|
|
84
|
+
targetOffsetTop = target.offsetTop;
|
|
85
|
+
var parentTable = closest(target, 'table');
|
|
86
|
+
while (!isNOU(parentTable)) {
|
|
87
|
+
targetOffsetTop += parentTable.offsetTop;
|
|
88
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
targetOffsetTop = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetTop : target.offsetTop;
|
|
93
|
+
}
|
|
80
94
|
var parentOffsetTop = window.pageYOffset + e.parentData.top;
|
|
81
95
|
if ((targetOffsetTop - e.editTop) > e.popHeight) {
|
|
82
96
|
y = parentOffsetTop + e.tBarElementHeight + (targetOffsetTop - e.editTop) - e.popHeight - 5;
|
|
@@ -88,11 +102,30 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
88
102
|
y = e.y;
|
|
89
103
|
}
|
|
90
104
|
target = isAligned ? e.target : target;
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
var targetOffsetLeft;
|
|
106
|
+
var currentOffsetWidth;
|
|
107
|
+
if (!isNOU(closest(target, 'table'))) {
|
|
108
|
+
targetOffsetLeft = target.offsetLeft;
|
|
109
|
+
var parentTable = closest(target, 'table');
|
|
110
|
+
var checkOffSetParentWidth = false;
|
|
111
|
+
if (!isNOU(closest(parentTable, 'TD'))) {
|
|
112
|
+
checkOffSetParentWidth = true;
|
|
113
|
+
}
|
|
114
|
+
while (!isNOU(parentTable)) {
|
|
115
|
+
targetOffsetLeft += parentTable.offsetLeft;
|
|
116
|
+
currentOffsetWidth = checkOffSetParentWidth ? parentTable.offsetWidth : target.offsetWidth;
|
|
117
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
118
|
+
}
|
|
93
119
|
}
|
|
94
120
|
else {
|
|
95
|
-
|
|
121
|
+
currentOffsetWidth = target.offsetWidth;
|
|
122
|
+
targetOffsetLeft = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetLeft : target.offsetLeft;
|
|
123
|
+
}
|
|
124
|
+
if (currentOffsetWidth > e.popWidth) {
|
|
125
|
+
x = (currentOffsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + targetOffsetLeft;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
x = e.parentData.left + targetOffsetLeft;
|
|
96
129
|
}
|
|
97
130
|
this.popupObj.position.X = ((x + e.popWidth) > e.parentData.right) ? e.parentData.right - e.popWidth : x;
|
|
98
131
|
this.popupObj.position.Y = (y >= 0) ? y : e.y + 5;
|
|
@@ -183,7 +216,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
183
216
|
* @param {string} type - specifies the type
|
|
184
217
|
* @returns {void}
|
|
185
218
|
* @hidden
|
|
186
|
-
|
|
219
|
+
* @deprecated
|
|
187
220
|
*/
|
|
188
221
|
BaseQuickToolbar.prototype.showPopup = function (x, y, target, type) {
|
|
189
222
|
var _this = this;
|
|
@@ -216,10 +249,13 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
216
249
|
editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
|
|
217
250
|
editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
|
|
218
251
|
}
|
|
219
|
-
if (!_this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text') {
|
|
252
|
+
if ((!_this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text' && type !== 'link') || target.tagName === 'IMG') {
|
|
220
253
|
_this.parent.disableToolbarItem(_this.parent.toolbarSettings.items);
|
|
221
254
|
_this.parent.enableToolbarItem(['Undo', 'Redo']);
|
|
222
255
|
}
|
|
256
|
+
else {
|
|
257
|
+
_this.parent.enableToolbarItem(_this.parent.toolbarSettings.items);
|
|
258
|
+
}
|
|
223
259
|
append([_this.element], document.body);
|
|
224
260
|
if (_this.parent.showTooltip) {
|
|
225
261
|
_this.tooltip = new Tooltip({
|
|
@@ -227,7 +263,8 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
227
263
|
openDelay: 400,
|
|
228
264
|
showTipPointer: true,
|
|
229
265
|
windowCollision: true,
|
|
230
|
-
position: 'BottomCenter'
|
|
266
|
+
position: 'BottomCenter',
|
|
267
|
+
cssClass: _this.parent.getCssClass()
|
|
231
268
|
});
|
|
232
269
|
_this.tooltip.appendTo(_this.element);
|
|
233
270
|
}
|
|
@@ -261,9 +298,9 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
261
298
|
parentData: parent_1.getBoundingClientRect(),
|
|
262
299
|
tBarElementHeight: tBarHeight
|
|
263
300
|
};
|
|
264
|
-
if (target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
301
|
+
if ((closest(target, 'TABLE') || target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
265
302
|
(target.classList.contains(classes.CLS_AUDIOWRAP) || target.classList.contains(classes.CLS_CLICKELEM) ||
|
|
266
|
-
target.classList.contains(classes.CLS_VID_CLICK_ELEM)))) {
|
|
303
|
+
target.classList.contains(classes.CLS_VID_CLICK_ELEM)))) && (x == beforeQuickToolbarArgs.positionX || y == beforeQuickToolbarArgs.positionY)) {
|
|
267
304
|
_this.setPosition(showPopupData);
|
|
268
305
|
}
|
|
269
306
|
if (!_this.parent.inlineMode.enable) {
|
|
@@ -281,7 +318,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
281
318
|
maxWidth: window.outerWidth + 'px'
|
|
282
319
|
});
|
|
283
320
|
addClass([_this.element], [classes.CLS_POP]);
|
|
284
|
-
_this.
|
|
321
|
+
_this.isRendered = true;
|
|
285
322
|
}
|
|
286
323
|
});
|
|
287
324
|
};
|
|
@@ -290,7 +327,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
290
327
|
*
|
|
291
328
|
* @returns {void}
|
|
292
329
|
* @hidden
|
|
293
|
-
|
|
330
|
+
* @deprecated
|
|
294
331
|
*/
|
|
295
332
|
BaseQuickToolbar.prototype.hidePopup = function () {
|
|
296
333
|
var viewSourcePanel = this.parent.sourceCodeModule.getViewPanel();
|
|
@@ -317,15 +354,18 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
317
354
|
this.parent.enableToolbarItem(this.parent.toolbarSettings.items);
|
|
318
355
|
}
|
|
319
356
|
}
|
|
357
|
+
if (this.parent.showTooltip && !isNOU(document.querySelector('.e-tooltip-wrap'))) {
|
|
358
|
+
this.parent.notify(events.destroyTooltip, { args: event });
|
|
359
|
+
}
|
|
320
360
|
this.removeEleFromDOM();
|
|
321
|
-
this.
|
|
361
|
+
this.isRendered = false;
|
|
322
362
|
};
|
|
323
363
|
/**
|
|
324
364
|
* @param {string} item - specifies the string value
|
|
325
365
|
* @param {number} index - specifies the index value
|
|
326
366
|
* @returns {void}
|
|
327
367
|
* @hidden
|
|
328
|
-
|
|
368
|
+
* @deprecated
|
|
329
369
|
*/
|
|
330
370
|
BaseQuickToolbar.prototype.addQTBarItem = function (item, index) {
|
|
331
371
|
this.quickTBarObj.toolbarObj.addItems(this.quickTBarObj.getItems(item, 'toolbar'), index);
|
|
@@ -334,14 +374,14 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
334
374
|
* @param {number} index - specifies the index value
|
|
335
375
|
* @returns {void}
|
|
336
376
|
* @hidden
|
|
337
|
-
|
|
377
|
+
* @deprecated
|
|
338
378
|
*/
|
|
339
379
|
BaseQuickToolbar.prototype.removeQTBarItem = function (index) {
|
|
340
380
|
this.quickTBarObj.toolbarObj.removeItems(index);
|
|
341
381
|
};
|
|
342
382
|
BaseQuickToolbar.prototype.removeEleFromDOM = function () {
|
|
343
383
|
var element = this.popupObj.element;
|
|
344
|
-
if (this.
|
|
384
|
+
if (this.isRendered) {
|
|
345
385
|
this.dropDownButtons.destroyDropDowns();
|
|
346
386
|
this.colorPickerObj.destroyColorPicker();
|
|
347
387
|
removeClass([this.element], [classes.CLS_POP]);
|
|
@@ -359,7 +399,18 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
359
399
|
tbItems: this.quickTBarObj.toolbarObj.items
|
|
360
400
|
};
|
|
361
401
|
setToolbarStatus(options, true, this.parent);
|
|
362
|
-
if (
|
|
402
|
+
if (this.parent.quickToolbarSettings.text && this.parent.quickToolbarModule.textQTBar) {
|
|
403
|
+
var options_1 = {
|
|
404
|
+
args: args,
|
|
405
|
+
dropDownModule: this.parent.quickToolbarModule.textQTBar.dropDownButtons,
|
|
406
|
+
parent: this.parent,
|
|
407
|
+
tbElements: selectAll('.' + classes.CLS_TB_ITEM, this.parent.quickToolbarModule.textQTBar.element),
|
|
408
|
+
tbItems: this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items
|
|
409
|
+
};
|
|
410
|
+
setToolbarStatus(options_1, true, this.parent);
|
|
411
|
+
updateUndoRedoStatus(this.parent.quickToolbarModule.textQTBar.quickTBarObj, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
412
|
+
}
|
|
413
|
+
if (!select('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
363
414
|
updateUndoRedoStatus(this.parent.getBaseToolbarObject(), this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
364
415
|
}
|
|
365
416
|
};
|
|
@@ -369,7 +420,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
369
420
|
* @function destroy
|
|
370
421
|
* @returns {void}
|
|
371
422
|
* @hidden
|
|
372
|
-
|
|
423
|
+
* @deprecated
|
|
373
424
|
*/
|
|
374
425
|
BaseQuickToolbar.prototype.destroy = function () {
|
|
375
426
|
if (this.popupObj && !this.popupObj.isDestroyed) {
|
|
@@ -383,7 +434,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
383
434
|
*
|
|
384
435
|
* @returns {void}
|
|
385
436
|
* @hidden
|
|
386
|
-
|
|
437
|
+
* @deprecated
|
|
387
438
|
*/
|
|
388
439
|
BaseQuickToolbar.prototype.addEventListener = function () {
|
|
389
440
|
if (this.parent.isDestroyed) {
|
|
@@ -391,7 +442,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
391
442
|
}
|
|
392
443
|
this.parent.on(events.destroy, this.destroy, this);
|
|
393
444
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
394
|
-
if (this.parent.inlineMode.enable) {
|
|
445
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
395
446
|
this.parent.on(events.toolbarUpdated, this.updateStatus, this);
|
|
396
447
|
}
|
|
397
448
|
};
|
|
@@ -401,7 +452,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
401
452
|
* @param {RichTextEditorModel} e - specifies the model element
|
|
402
453
|
* @returns {void}
|
|
403
454
|
* @hidden
|
|
404
|
-
|
|
455
|
+
* @deprecated
|
|
405
456
|
*/
|
|
406
457
|
BaseQuickToolbar.prototype.onPropertyChanged = function (e) {
|
|
407
458
|
if (!isNullOrUndefined(e.newProp.inlineMode)) {
|
|
@@ -425,7 +476,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
425
476
|
*
|
|
426
477
|
* @returns {void}
|
|
427
478
|
* @hidden
|
|
428
|
-
|
|
479
|
+
* @deprecated
|
|
429
480
|
*/
|
|
430
481
|
BaseQuickToolbar.prototype.removeEventListener = function () {
|
|
431
482
|
if (this.parent.isDestroyed) {
|
|
@@ -433,7 +484,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
433
484
|
}
|
|
434
485
|
this.parent.off(events.destroy, this.destroy);
|
|
435
486
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
436
|
-
if (this.parent.inlineMode.enable) {
|
|
487
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
437
488
|
this.parent.off(events.toolbarUpdated, this.updateStatus);
|
|
438
489
|
}
|
|
439
490
|
};
|
|
@@ -32,7 +32,7 @@ export declare class BaseToolbar {
|
|
|
32
32
|
* @param {string} container - specifies the value of string
|
|
33
33
|
* @returns {IToolbarItemModel} - returns the model element
|
|
34
34
|
* @hidden
|
|
35
|
-
|
|
35
|
+
* @deprecated
|
|
36
36
|
*/
|
|
37
37
|
getObject(item: string, container: string): IToolbarItemModel;
|
|
38
38
|
/**
|
|
@@ -40,7 +40,7 @@ export declare class BaseToolbar {
|
|
|
40
40
|
* @param {string} container - specifies the container value
|
|
41
41
|
* @returns {ItemModel} - retunrs the model element
|
|
42
42
|
* @hidden
|
|
43
|
-
|
|
43
|
+
* @deprecated
|
|
44
44
|
*/
|
|
45
45
|
getItems(tbItems: (string | IToolbarItems)[], container: string): ItemModel[];
|
|
46
46
|
private getToolbarOptions;
|
|
@@ -50,7 +50,7 @@ export declare class BaseToolbar {
|
|
|
50
50
|
* @param {IToolbarRenderOptions} args - specifies the toolbar options
|
|
51
51
|
* @returns {void}
|
|
52
52
|
* @hidden
|
|
53
|
-
|
|
53
|
+
* @deprecated
|
|
54
54
|
*/
|
|
55
55
|
render(args: IToolbarRenderOptions): void;
|
|
56
56
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RenderType } from '../base/enum';
|
|
2
2
|
import { CLS_HR_SEPARATOR } from '../base/classes';
|
|
3
3
|
import * as events from '../base/constant';
|
|
4
|
-
import { getTooltipText,
|
|
4
|
+
import { getTooltipText, toObjectLowerCase } from '../base/util';
|
|
5
5
|
import { tools, templateItems, windowKeys } from '../models/items';
|
|
6
|
-
import { isNullOrUndefined, extend
|
|
6
|
+
import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';
|
|
7
7
|
/**
|
|
8
8
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
9
9
|
*/
|
|
@@ -93,7 +93,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
93
93
|
* @param {string} container - specifies the value of string
|
|
94
94
|
* @returns {IToolbarItemModel} - returns the model element
|
|
95
95
|
* @hidden
|
|
96
|
-
|
|
96
|
+
* @deprecated
|
|
97
97
|
*/
|
|
98
98
|
BaseToolbar.prototype.getObject = function (item, container) {
|
|
99
99
|
var itemStr = item.toLowerCase();
|
|
@@ -107,23 +107,13 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
107
107
|
case '-':
|
|
108
108
|
return { type: 'Separator', cssClass: CLS_HR_SEPARATOR };
|
|
109
109
|
default:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
return {
|
|
121
|
-
id: this.parent.getID() + '_' + container + '_' + this.tools[itemStr.toLocaleLowerCase()].id,
|
|
122
|
-
prefixIcon: this.tools[itemStr.toLocaleLowerCase()].icon,
|
|
123
|
-
command: this.tools[itemStr.toLocaleLowerCase()].command,
|
|
124
|
-
subCommand: this.tools[itemStr.toLocaleLowerCase()].subCommand
|
|
125
|
-
};
|
|
126
|
-
}
|
|
110
|
+
return {
|
|
111
|
+
id: this.parent.getID() + '_' + container + '_' + this.tools[itemStr.toLocaleLowerCase()].id,
|
|
112
|
+
prefixIcon: this.tools[itemStr.toLocaleLowerCase()].icon,
|
|
113
|
+
tooltipText: getTooltipText(itemStr, this.locator),
|
|
114
|
+
command: this.tools[itemStr.toLocaleLowerCase()].command,
|
|
115
|
+
subCommand: this.tools[itemStr.toLocaleLowerCase()].subCommand
|
|
116
|
+
};
|
|
127
117
|
}
|
|
128
118
|
}
|
|
129
119
|
};
|
|
@@ -132,7 +122,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
132
122
|
* @param {string} container - specifies the container value
|
|
133
123
|
* @returns {ItemModel} - retunrs the model element
|
|
134
124
|
* @hidden
|
|
135
|
-
|
|
125
|
+
* @deprecated
|
|
136
126
|
*/
|
|
137
127
|
BaseToolbar.prototype.getItems = function (tbItems, container) {
|
|
138
128
|
var _this = this;
|
|
@@ -154,10 +144,14 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
154
144
|
_this.parent.formatter.saveData();
|
|
155
145
|
}
|
|
156
146
|
callback_1.call(_this);
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
147
|
+
if (_this.parent.formatter.getUndoRedoStack().length > 0) {
|
|
148
|
+
var currentContentElem = _this.parent.createElement('div');
|
|
149
|
+
var stackItem = _this.parent.formatter.getUndoRedoStack()[_this.parent.formatter.getUndoRedoStack().length - 1];
|
|
150
|
+
var clonedItem = (stackItem.text).cloneNode(true);
|
|
151
|
+
currentContentElem.appendChild(clonedItem);
|
|
152
|
+
if (currentContentElem.innerHTML.trim() === _this.parent.inputElement.innerHTML.trim()) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
161
155
|
}
|
|
162
156
|
if (proxy_1.undo) {
|
|
163
157
|
_this.parent.formatter.saveData();
|
|
@@ -172,17 +166,21 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
172
166
|
var item = tbItems_1[_i];
|
|
173
167
|
_loop_1(item);
|
|
174
168
|
}
|
|
175
|
-
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
169
|
+
if (this.parent.showTooltip) {
|
|
170
|
+
for (var num = 0; num < items.length; num++) {
|
|
171
|
+
var tooltipText = items[num].tooltipText;
|
|
172
|
+
var shortCutKey = void 0;
|
|
173
|
+
if (windowKeys["" + tooltipText]) {
|
|
174
|
+
shortCutKey = window.navigator.platform.toLocaleLowerCase().includes('mac') ? windowKeys["" + tooltipText].replace('Ctrl', 'Cmd') : windowKeys["" + tooltipText];
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
shortCutKey = tooltipText;
|
|
178
|
+
}
|
|
179
|
+
if (shortCutKey) {
|
|
180
|
+
if (!(items[num].command === "Images" && items[num].subCommand === "InsertLink")) {
|
|
181
|
+
items[num].tooltipText = (tooltipText !== shortCutKey) ? tooltipText + ' (' + shortCutKey + ')' : tooltipText;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
186
184
|
}
|
|
187
185
|
}
|
|
188
186
|
return items;
|
|
@@ -204,7 +202,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
204
202
|
* @param {IToolbarRenderOptions} args - specifies the toolbar options
|
|
205
203
|
* @returns {void}
|
|
206
204
|
* @hidden
|
|
207
|
-
|
|
205
|
+
* @deprecated
|
|
208
206
|
*/
|
|
209
207
|
BaseToolbar.prototype.render = function (args) {
|
|
210
208
|
this.toolbarRenderer = this.renderFactory.getRenderer(RenderType.Toolbar);
|