@syncfusion/ej2-richtexteditor 24.1.41 → 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 -1775
- 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 +2601 -1077
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +2706 -1181
- 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 +11 -0
- 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 +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 +39 -35
- package/src/editor-manager/plugin/dom-node.js +203 -49
- 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 +15 -19
- 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 +64 -7
- 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 +213 -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 +127 -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 +57 -20
- 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 +12 -2
- 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 +23 -4
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +4 -4
- package/src/rich-text-editor/actions/enter-key.js +4 -3
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +6 -5
- package/src/rich-text-editor/actions/html-editor.d.ts +5 -5
- package/src/rich-text-editor/actions/html-editor.js +129 -45
- 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 +4 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +87 -12
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +16 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +33 -18
- 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 +15 -16
- package/src/rich-text-editor/actions/toolbar.js +31 -100
- 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 -126
- package/src/rich-text-editor/base/classes.js +121 -126
- package/src/rich-text-editor/base/constant.d.ts +190 -150
- package/src/rich-text-editor/base/constant.js +359 -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 +87 -53
- 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 +68 -65
- package/src/rich-text-editor/base/rich-text-editor.js +232 -199
- package/src/rich-text-editor/base/util.d.ts +5 -1
- package/src/rich-text-editor/base/util.js +47 -4
- 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 +30 -26
- 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 +2 -2
- 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 +14 -3
- 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 +200 -168
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +11 -2
- 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 +9 -2
- package/src/rich-text-editor/renderer/table-module.js +289 -137
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +13 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +103 -24
- 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 +18 -10
- 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 +153 -49
- package/styles/bootstrap.css +158 -57
- package/styles/bootstrap4.css +145 -45
- package/styles/bootstrap5-dark.css +150 -45
- package/styles/bootstrap5.css +150 -45
- package/styles/fabric-dark.css +139 -39
- package/styles/fabric.css +140 -40
- package/styles/fluent-dark.css +147 -41
- package/styles/fluent.css +147 -41
- package/styles/highcontrast-light.css +139 -39
- package/styles/highcontrast.css +143 -40
- package/styles/material-dark.css +143 -39
- package/styles/material.css +143 -39
- package/styles/material3-dark.css +155 -49
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +155 -49
- 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 -2147
- 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 +153 -49
- package/styles/rich-text-editor/bootstrap.css +158 -57
- package/styles/rich-text-editor/bootstrap4.css +145 -45
- package/styles/rich-text-editor/bootstrap5-dark.css +150 -45
- package/styles/rich-text-editor/bootstrap5.css +150 -45
- package/styles/rich-text-editor/fabric-dark.css +139 -39
- package/styles/rich-text-editor/fabric.css +140 -40
- package/styles/rich-text-editor/fluent-dark.css +147 -41
- package/styles/rich-text-editor/fluent.css +147 -41
- package/styles/rich-text-editor/highcontrast-light.css +139 -39
- package/styles/rich-text-editor/highcontrast.css +143 -40
- 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 +143 -39
- package/styles/rich-text-editor/material.css +143 -39
- package/styles/rich-text-editor/material3-dark.css +155 -49
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +155 -49
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +194 -66
- package/styles/rich-text-editor/tailwind.css +194 -66
- package/styles/tailwind-dark.css +194 -66
- package/styles/tailwind.css +194 -66
- 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
|
@@ -4,6 +4,7 @@ import { IUpdateItemsModel } from '../base/interface';
|
|
|
4
4
|
import { ServiceLocator } from '../services/service-locator';
|
|
5
5
|
import { RendererFactory } from '../services/renderer-factory';
|
|
6
6
|
import { BaseToolbar } from './base-toolbar';
|
|
7
|
+
import { DropDownButtons } from './dropdown-buttons';
|
|
7
8
|
import { RichTextEditorModel } from '../base/rich-text-editor-model';
|
|
8
9
|
/**
|
|
9
10
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
@@ -22,7 +23,7 @@ export declare class Toolbar {
|
|
|
22
23
|
private isTransformChild;
|
|
23
24
|
private contentRenderer;
|
|
24
25
|
protected toolbarRenderer: IRenderer;
|
|
25
|
-
|
|
26
|
+
dropDownModule: DropDownButtons;
|
|
26
27
|
private toolbarActionModule;
|
|
27
28
|
protected renderFactory: RendererFactory;
|
|
28
29
|
private keyBoardModule;
|
|
@@ -42,7 +43,7 @@ export declare class Toolbar {
|
|
|
42
43
|
*
|
|
43
44
|
* @returns {void}
|
|
44
45
|
* @hidden
|
|
45
|
-
|
|
46
|
+
* @deprecated
|
|
46
47
|
*/
|
|
47
48
|
addFixedTBarClass(): void;
|
|
48
49
|
/**
|
|
@@ -50,7 +51,7 @@ export declare class Toolbar {
|
|
|
50
51
|
*
|
|
51
52
|
* @returns {void}
|
|
52
53
|
* @hidden
|
|
53
|
-
|
|
54
|
+
* @deprecated
|
|
54
55
|
*/
|
|
55
56
|
removeFixedTBarClass(): void;
|
|
56
57
|
private showFixedTBar;
|
|
@@ -61,7 +62,7 @@ export declare class Toolbar {
|
|
|
61
62
|
* @param {IUpdateItemsModel} args - specifies the arguments.
|
|
62
63
|
* @returns {void}
|
|
63
64
|
* @hidden
|
|
64
|
-
|
|
65
|
+
* @deprecated
|
|
65
66
|
*/
|
|
66
67
|
updateItem(args: IUpdateItemsModel): void;
|
|
67
68
|
private updateToolbarStatus;
|
|
@@ -72,7 +73,7 @@ export declare class Toolbar {
|
|
|
72
73
|
*
|
|
73
74
|
* @returns {void}
|
|
74
75
|
* @hidden
|
|
75
|
-
|
|
76
|
+
* @deprecated
|
|
76
77
|
*/
|
|
77
78
|
getBaseToolbar(): BaseToolbar;
|
|
78
79
|
/**
|
|
@@ -82,7 +83,7 @@ export declare class Toolbar {
|
|
|
82
83
|
* @param {number} index - specifies the index value.
|
|
83
84
|
* @returns {void}
|
|
84
85
|
* @hidden
|
|
85
|
-
|
|
86
|
+
* @deprecated
|
|
86
87
|
*/
|
|
87
88
|
addTBarItem(args: IUpdateItemsModel, index: number): void;
|
|
88
89
|
/**
|
|
@@ -94,7 +95,7 @@ export declare class Toolbar {
|
|
|
94
95
|
* @param {boolean} muteToolbarUpdate - specifies the toolbar.
|
|
95
96
|
* @returns {void}
|
|
96
97
|
* @hidden
|
|
97
|
-
|
|
98
|
+
* @deprecated
|
|
98
99
|
*/
|
|
99
100
|
enableTBarItems(baseToolbar: BaseToolbar, items: string | string[], isEnable: boolean, muteToolbarUpdate?: boolean): void;
|
|
100
101
|
/**
|
|
@@ -103,7 +104,7 @@ export declare class Toolbar {
|
|
|
103
104
|
* @param {string} items - specifies the string value.
|
|
104
105
|
* @returns {void}
|
|
105
106
|
* @hidden
|
|
106
|
-
|
|
107
|
+
* @deprecated
|
|
107
108
|
*/
|
|
108
109
|
removeTBarItems(items: string | string[]): void;
|
|
109
110
|
/**
|
|
@@ -111,7 +112,7 @@ export declare class Toolbar {
|
|
|
111
112
|
*
|
|
112
113
|
* @returns {void}
|
|
113
114
|
* @hidden
|
|
114
|
-
|
|
115
|
+
* @deprecated
|
|
115
116
|
*/
|
|
116
117
|
getExpandTBarPopHeight(): number;
|
|
117
118
|
/**
|
|
@@ -119,7 +120,7 @@ export declare class Toolbar {
|
|
|
119
120
|
*
|
|
120
121
|
* @returns {void}
|
|
121
122
|
* @hidden
|
|
122
|
-
|
|
123
|
+
* @deprecated
|
|
123
124
|
*/
|
|
124
125
|
getToolbarHeight(): number;
|
|
125
126
|
/**
|
|
@@ -127,7 +128,7 @@ export declare class Toolbar {
|
|
|
127
128
|
*
|
|
128
129
|
* @returns {void}
|
|
129
130
|
* @hidden
|
|
130
|
-
|
|
131
|
+
* @deprecated
|
|
131
132
|
*/
|
|
132
133
|
getToolbarElement(): Element;
|
|
133
134
|
/**
|
|
@@ -135,7 +136,7 @@ export declare class Toolbar {
|
|
|
135
136
|
*
|
|
136
137
|
* @returns {void}
|
|
137
138
|
* @hidden
|
|
138
|
-
|
|
139
|
+
* @deprecated
|
|
139
140
|
*/
|
|
140
141
|
refreshToolbarOverflow(): void;
|
|
141
142
|
private isToolbarDestroyed;
|
|
@@ -146,12 +147,10 @@ export declare class Toolbar {
|
|
|
146
147
|
* @function destroy
|
|
147
148
|
* @returns {void}
|
|
148
149
|
* @hidden
|
|
149
|
-
|
|
150
|
+
* @deprecated
|
|
150
151
|
*/
|
|
151
152
|
destroy(): void;
|
|
152
153
|
private moduleDestroy;
|
|
153
|
-
private scrollHandler;
|
|
154
|
-
private getDOMVisibility;
|
|
155
154
|
private mouseDownHandler;
|
|
156
155
|
private focusChangeHandler;
|
|
157
156
|
private dropDownBeforeOpenHandler;
|
|
@@ -170,7 +169,7 @@ export declare class Toolbar {
|
|
|
170
169
|
* @param {RichTextEditorModel} e - specifies the string value
|
|
171
170
|
* @returns {void}
|
|
172
171
|
* @hidden
|
|
173
|
-
|
|
172
|
+
* @deprecated
|
|
174
173
|
*/
|
|
175
174
|
protected onPropertyChanged(e: {
|
|
176
175
|
[key: string]: RichTextEditorModel;
|
|
@@ -56,6 +56,9 @@ var Toolbar = /** @class */ (function () {
|
|
|
56
56
|
if (e.target.classList.contains('e-hor-nav')) {
|
|
57
57
|
this.adjustContentHeight(e.target, true);
|
|
58
58
|
}
|
|
59
|
+
if (!isNullOrUndefined(e.target) && (e.target.classList.contains("e-rte-fontcolor-dropdown") || e.target.classList.contains("e-rte-backgroundcolor-dropdown"))) {
|
|
60
|
+
this.parent.notify(events.showColorPicker, { toolbarClick: e.target.classList.contains("e-rte-fontcolor-dropdown") ? "fontcolor" : "backgroundcolor" });
|
|
61
|
+
}
|
|
59
62
|
}
|
|
60
63
|
};
|
|
61
64
|
Toolbar.prototype.createToolbarElement = function () {
|
|
@@ -64,7 +67,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
64
67
|
return;
|
|
65
68
|
}
|
|
66
69
|
else {
|
|
67
|
-
if (
|
|
70
|
+
if (!this.parent.inlineMode.enable) {
|
|
68
71
|
this.tbWrapper = this.parent.createElement('div', {
|
|
69
72
|
id: this.parent.getID() + '_toolbar_wrapper',
|
|
70
73
|
innerHTML: this.tbElement.outerHTML,
|
|
@@ -147,72 +150,14 @@ var Toolbar = /** @class */ (function () {
|
|
|
147
150
|
}
|
|
148
151
|
};
|
|
149
152
|
Toolbar.prototype.toggleFloatClass = function (e) {
|
|
150
|
-
var topValue;
|
|
151
|
-
var isBody = false;
|
|
152
|
-
var isFloat = false;
|
|
153
|
-
var scrollParent;
|
|
154
153
|
var floatOffset = this.parent.floatingToolbarOffset;
|
|
155
|
-
if (
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
else if (e && e.target !== document) {
|
|
159
|
-
scrollParent = e.target;
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
isBody = true;
|
|
163
|
-
scrollParent = document.body;
|
|
164
|
-
}
|
|
165
|
-
var tbHeight = this.getToolbarHeight() + this.getExpandTBarPopHeight();
|
|
166
|
-
if (this.isTransformChild) {
|
|
167
|
-
topValue = 0;
|
|
168
|
-
var scrollParentRelativeTop = 0;
|
|
169
|
-
var trgHeight = this.parent.element.offsetHeight;
|
|
170
|
-
if (isBody) {
|
|
171
|
-
var bodyStyle = window.getComputedStyle(scrollParent);
|
|
172
|
-
scrollParentRelativeTop = parseFloat(bodyStyle.marginTop.split('px')[0]) + parseFloat(bodyStyle.paddingTop.split('px')[0]);
|
|
173
|
-
}
|
|
174
|
-
var targetTop = this.parent.element.getBoundingClientRect().top;
|
|
175
|
-
var scrollParentYOffset = (Browser.isMSPointer && isBody) ? window.pageYOffset : scrollParent.parentElement.scrollTop;
|
|
176
|
-
var scrollParentRect = scrollParent.getBoundingClientRect();
|
|
177
|
-
var scrollParentTop = (!isBody) ? scrollParentRect.top : (scrollParentRect.top + scrollParentYOffset);
|
|
178
|
-
var outOfRange = ((targetTop - ((!isBody) ? scrollParentTop : 0))
|
|
179
|
-
+ trgHeight > tbHeight + floatOffset) ? false : true;
|
|
180
|
-
if (targetTop > (scrollParentTop + floatOffset) || targetTop < -trgHeight || ((targetTop < 0) ? outOfRange : false)) {
|
|
181
|
-
isFloat = false;
|
|
182
|
-
removeClass([this.tbElement], [classes.CLS_TB_ABS_FLOAT]);
|
|
183
|
-
}
|
|
184
|
-
else if (targetTop < (scrollParentTop + floatOffset)) {
|
|
185
|
-
if (targetTop < 0) {
|
|
186
|
-
topValue = (-targetTop) + scrollParentTop;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
topValue = scrollParentTop - targetTop;
|
|
190
|
-
}
|
|
191
|
-
topValue = (isBody) ? topValue - scrollParentRelativeTop : topValue;
|
|
192
|
-
addClass([this.tbElement], [classes.CLS_TB_ABS_FLOAT]);
|
|
193
|
-
isFloat = true;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
var parent_1 = this.parent.element.getBoundingClientRect();
|
|
198
|
-
if (window.innerHeight < parent_1.top) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
topValue = (e && e.target !== document) ? scrollParent.getBoundingClientRect().top : 0;
|
|
202
|
-
if ((parent_1.bottom < (floatOffset + tbHeight + topValue)) || parent_1.bottom < 0 || parent_1.top > floatOffset + topValue) {
|
|
203
|
-
isFloat = false;
|
|
204
|
-
}
|
|
205
|
-
else if (parent_1.top < floatOffset || parent_1.top < floatOffset + topValue) {
|
|
206
|
-
isFloat = true;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if (!isFloat) {
|
|
210
|
-
removeClass([this.tbElement], [classes.CLS_TB_FLOAT]);
|
|
211
|
-
setStyleAttribute(this.tbElement, { top: 0 + 'px', width: '100%' });
|
|
154
|
+
if (this.parent.toolbarSettings.enableFloating) {
|
|
155
|
+
addClass([this.tbElement.parentElement], [classes.CLS_TB_FLOAT]);
|
|
156
|
+
setStyleAttribute(this.tbElement.parentElement, { top: (floatOffset) + 'px' });
|
|
212
157
|
}
|
|
213
158
|
else {
|
|
214
|
-
|
|
215
|
-
setStyleAttribute(this.tbElement, {
|
|
159
|
+
removeClass([this.tbElement.parentElement], [classes.CLS_TB_FLOAT]);
|
|
160
|
+
setStyleAttribute(this.tbElement.parentElement, { top: '' });
|
|
216
161
|
}
|
|
217
162
|
};
|
|
218
163
|
Toolbar.prototype.renderToolbar = function () {
|
|
@@ -276,7 +221,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
276
221
|
*
|
|
277
222
|
* @returns {void}
|
|
278
223
|
* @hidden
|
|
279
|
-
|
|
224
|
+
* @deprecated
|
|
280
225
|
*/
|
|
281
226
|
Toolbar.prototype.addFixedTBarClass = function () {
|
|
282
227
|
addClass([this.tbElement], [classes.CLS_TB_FIXED]);
|
|
@@ -286,7 +231,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
286
231
|
*
|
|
287
232
|
* @returns {void}
|
|
288
233
|
* @hidden
|
|
289
|
-
|
|
234
|
+
* @deprecated
|
|
290
235
|
*/
|
|
291
236
|
Toolbar.prototype.removeFixedTBarClass = function () {
|
|
292
237
|
removeClass([this.tbElement], [classes.CLS_TB_FIXED]);
|
|
@@ -307,7 +252,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
307
252
|
* @param {IUpdateItemsModel} args - specifies the arguments.
|
|
308
253
|
* @returns {void}
|
|
309
254
|
* @hidden
|
|
310
|
-
|
|
255
|
+
* @deprecated
|
|
311
256
|
*/
|
|
312
257
|
Toolbar.prototype.updateItem = function (args) {
|
|
313
258
|
var item = this.tools[args.updateItem.toLocaleLowerCase()];
|
|
@@ -353,7 +298,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
353
298
|
*
|
|
354
299
|
* @returns {void}
|
|
355
300
|
* @hidden
|
|
356
|
-
|
|
301
|
+
* @deprecated
|
|
357
302
|
*/
|
|
358
303
|
Toolbar.prototype.getBaseToolbar = function () {
|
|
359
304
|
return this.baseToolbar;
|
|
@@ -365,7 +310,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
365
310
|
* @param {number} index - specifies the index value.
|
|
366
311
|
* @returns {void}
|
|
367
312
|
* @hidden
|
|
368
|
-
|
|
313
|
+
* @deprecated
|
|
369
314
|
*/
|
|
370
315
|
Toolbar.prototype.addTBarItem = function (args, index) {
|
|
371
316
|
args.baseToolbar.toolbarObj.addItems([args.baseToolbar.getObject(args.updateItem, 'toolbar')], index);
|
|
@@ -379,7 +324,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
379
324
|
* @param {boolean} muteToolbarUpdate - specifies the toolbar.
|
|
380
325
|
* @returns {void}
|
|
381
326
|
* @hidden
|
|
382
|
-
|
|
327
|
+
* @deprecated
|
|
383
328
|
*/
|
|
384
329
|
Toolbar.prototype.enableTBarItems = function (baseToolbar, items, isEnable, muteToolbarUpdate) {
|
|
385
330
|
var trgItems = getTBarItemsIndex(getCollection(items), baseToolbar.toolbarObj.items);
|
|
@@ -400,7 +345,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
400
345
|
* @param {string} items - specifies the string value.
|
|
401
346
|
* @returns {void}
|
|
402
347
|
* @hidden
|
|
403
|
-
|
|
348
|
+
* @deprecated
|
|
404
349
|
*/
|
|
405
350
|
Toolbar.prototype.removeTBarItems = function (items) {
|
|
406
351
|
if (isNullOrUndefined(this.baseToolbar.toolbarObj)) {
|
|
@@ -418,7 +363,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
418
363
|
*
|
|
419
364
|
* @returns {void}
|
|
420
365
|
* @hidden
|
|
421
|
-
|
|
366
|
+
* @deprecated
|
|
422
367
|
*/
|
|
423
368
|
Toolbar.prototype.getExpandTBarPopHeight = function () {
|
|
424
369
|
var popHeight = 0;
|
|
@@ -441,7 +386,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
441
386
|
*
|
|
442
387
|
* @returns {void}
|
|
443
388
|
* @hidden
|
|
444
|
-
|
|
389
|
+
* @deprecated
|
|
445
390
|
*/
|
|
446
391
|
Toolbar.prototype.getToolbarHeight = function () {
|
|
447
392
|
return this.tbElement.offsetHeight;
|
|
@@ -451,7 +396,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
451
396
|
*
|
|
452
397
|
* @returns {void}
|
|
453
398
|
* @hidden
|
|
454
|
-
|
|
399
|
+
* @deprecated
|
|
455
400
|
*/
|
|
456
401
|
Toolbar.prototype.getToolbarElement = function () {
|
|
457
402
|
return select('.' + classes.CLS_TOOLBAR, this.parent.element);
|
|
@@ -461,7 +406,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
461
406
|
*
|
|
462
407
|
* @returns {void}
|
|
463
408
|
* @hidden
|
|
464
|
-
|
|
409
|
+
* @deprecated
|
|
465
410
|
*/
|
|
466
411
|
Toolbar.prototype.refreshToolbarOverflow = function () {
|
|
467
412
|
this.parent.element.classList.remove(classes.CLS_RTL);
|
|
@@ -499,7 +444,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
499
444
|
* @function destroy
|
|
500
445
|
* @returns {void}
|
|
501
446
|
* @hidden
|
|
502
|
-
|
|
447
|
+
* @deprecated
|
|
503
448
|
*/
|
|
504
449
|
Toolbar.prototype.destroy = function () {
|
|
505
450
|
if (isNOU(this.parent)) {
|
|
@@ -518,19 +463,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
518
463
|
this.toolbarActionModule.parent = null;
|
|
519
464
|
this.dropDownModule.parent = null;
|
|
520
465
|
};
|
|
521
|
-
Toolbar.prototype.scrollHandler = function (e) {
|
|
522
|
-
if (!this.parent.inlineMode.enable) {
|
|
523
|
-
if (this.parent.toolbarSettings.enableFloating && this.getDOMVisibility(this.tbElement)) {
|
|
524
|
-
this.toggleFloatClass(e.args);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
};
|
|
528
|
-
Toolbar.prototype.getDOMVisibility = function (el) {
|
|
529
|
-
if (!el.offsetParent && el.offsetWidth === 0 && el.offsetHeight === 0) {
|
|
530
|
-
return false;
|
|
531
|
-
}
|
|
532
|
-
return true;
|
|
533
|
-
};
|
|
534
466
|
Toolbar.prototype.mouseDownHandler = function () {
|
|
535
467
|
if (Browser.isDevice && this.parent.inlineMode.enable && !isIDevice()) {
|
|
536
468
|
this.showFixedTBar();
|
|
@@ -567,11 +499,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
567
499
|
};
|
|
568
500
|
Toolbar.prototype.adjustContentHeight = function (trg, isKeyboard) {
|
|
569
501
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNOU(trg)) {
|
|
570
|
-
var extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
|
|
571
|
-
if (!isNOU(extendedTbar)) {
|
|
572
|
-
setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
|
|
573
|
-
setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
|
|
574
|
-
}
|
|
575
502
|
var hasActiveClass = trg.classList.contains('e-nav-active');
|
|
576
503
|
var isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
577
504
|
if (isExpand) {
|
|
@@ -580,12 +507,12 @@ var Toolbar = /** @class */ (function () {
|
|
|
580
507
|
else {
|
|
581
508
|
removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
|
|
582
509
|
}
|
|
583
|
-
this.parent.setContentHeight('
|
|
510
|
+
this.parent.setContentHeight('Toolbar', isExpand);
|
|
584
511
|
}
|
|
585
512
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
586
513
|
this.isToolbar = true;
|
|
587
514
|
}
|
|
588
|
-
if (isNOU(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
515
|
+
if (isNOU(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand && this.parent.toolbarModule.getExpandTBarPopHeight() === 0) {
|
|
589
516
|
removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
|
|
590
517
|
}
|
|
591
518
|
};
|
|
@@ -605,7 +532,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
605
532
|
this.dropDownModule = new DropDownButtons(this.parent, this.locator);
|
|
606
533
|
this.toolbarActionModule = new ToolbarAction(this.parent);
|
|
607
534
|
this.parent.on(events.initialEnd, this.renderToolbar, this);
|
|
608
|
-
this.parent.on(events.scroll, this.scrollHandler, this);
|
|
609
535
|
this.parent.on(events.bindOnEnd, this.toolbarBindEvent, this);
|
|
610
536
|
this.parent.on(events.toolbarUpdated, this.updateToolbarStatus, this);
|
|
611
537
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
@@ -630,7 +556,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
630
556
|
return;
|
|
631
557
|
}
|
|
632
558
|
this.parent.off(events.initialEnd, this.renderToolbar);
|
|
633
|
-
this.parent.off(events.scroll, this.scrollHandler);
|
|
634
559
|
this.parent.off(events.bindOnEnd, this.toolbarBindEvent);
|
|
635
560
|
this.parent.off(events.toolbarUpdated, this.updateToolbarStatus);
|
|
636
561
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
@@ -665,7 +590,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
665
590
|
if (!this.parent.inlineMode.enable) {
|
|
666
591
|
this.refreshToolbarOverflow();
|
|
667
592
|
}
|
|
668
|
-
this.parent.
|
|
593
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
594
|
+
this.parent.setContentHeight('Refresh', isExpand);
|
|
669
595
|
};
|
|
670
596
|
/**
|
|
671
597
|
* Called internally if any of the property value changed.
|
|
@@ -673,7 +599,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
673
599
|
* @param {RichTextEditorModel} e - specifies the string value
|
|
674
600
|
* @returns {void}
|
|
675
601
|
* @hidden
|
|
676
|
-
|
|
602
|
+
* @deprecated
|
|
677
603
|
*/
|
|
678
604
|
Toolbar.prototype.onPropertyChanged = function (e) {
|
|
679
605
|
if (!isNullOrUndefined(e.newProp.inlineMode)) {
|
|
@@ -686,6 +612,11 @@ var Toolbar = /** @class */ (function () {
|
|
|
686
612
|
}
|
|
687
613
|
}
|
|
688
614
|
}
|
|
615
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings)) {
|
|
616
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings.enableFloating)) {
|
|
617
|
+
this.toggleFloatClass();
|
|
618
|
+
}
|
|
619
|
+
}
|
|
689
620
|
if (e.module !== this.getModuleName()) {
|
|
690
621
|
return;
|
|
691
622
|
}
|
|
@@ -13,7 +13,7 @@ export declare class XhtmlValidation {
|
|
|
13
13
|
* @param {string} currentValue - specifies the string value.
|
|
14
14
|
* @param {number} valueLength - specifies the length of the current value.
|
|
15
15
|
* @returns {void}
|
|
16
|
-
|
|
16
|
+
* @deprecated
|
|
17
17
|
*/
|
|
18
18
|
selfEncloseValidation(currentValue: string, valueLength?: number): string;
|
|
19
19
|
private clean;
|
|
@@ -37,7 +37,7 @@ var XhtmlValidation = /** @class */ (function () {
|
|
|
37
37
|
* @param {string} currentValue - specifies the string value.
|
|
38
38
|
* @param {number} valueLength - specifies the length of the current value.
|
|
39
39
|
* @returns {void}
|
|
40
|
-
|
|
40
|
+
* @deprecated
|
|
41
41
|
*/
|
|
42
42
|
XhtmlValidation.prototype.selfEncloseValidation = function (currentValue, valueLength) {
|
|
43
43
|
if (valueLength === 0 && currentValue.indexOf('table') < 0 && currentValue.indexOf('img') < 0 &&
|