@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41-569421
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 +260 -0
- package/CHANGELOG.md +203 -1
- package/dist/ej2-richtexteditor.umd.min.js +1 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +9873 -7941
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +9967 -8034
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/package.json +13 -13
- 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 +12 -0
- 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/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/base/editor-manager.d.ts +5 -0
- package/src/editor-manager/base/editor-manager.js +59 -0
- package/src/editor-manager/base/interface.d.ts +8 -0
- package/src/editor-manager/plugin/audio.js +13 -3
- package/src/editor-manager/plugin/dom-node.d.ts +5 -1
- package/src/editor-manager/plugin/dom-node.js +169 -28
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -0
- package/src/editor-manager/plugin/format-painter-actions.js +19 -1
- package/src/editor-manager/plugin/formats.d.ts +1 -0
- package/src/editor-manager/plugin/formats.js +38 -3
- package/src/editor-manager/plugin/image.js +38 -15
- package/src/editor-manager/plugin/indents.js +1 -1
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +83 -20
- package/src/editor-manager/plugin/link.js +8 -3
- package/src/editor-manager/plugin/lists.js +159 -70
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +3 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +215 -85
- package/src/editor-manager/plugin/nodecutter.js +5 -2
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -0
- package/src/editor-manager/plugin/selection-commands.js +248 -4
- package/src/editor-manager/plugin/table.d.ts +4 -1
- package/src/editor-manager/plugin/table.js +95 -49
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +20 -10
- package/src/editor-manager/plugin/undo.d.ts +1 -0
- package/src/editor-manager/plugin/undo.js +21 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +4 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +61 -14
- package/src/rich-text-editor/actions/base-toolbar.js +33 -34
- package/src/rich-text-editor/actions/color-picker.d.ts +1 -0
- package/src/rich-text-editor/actions/color-picker.js +13 -3
- package/src/rich-text-editor/actions/count.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +1 -0
- package/src/rich-text-editor/actions/dropdown-buttons.js +11 -5
- package/src/rich-text-editor/actions/emoji-picker.js +16 -7
- package/src/rich-text-editor/actions/enter-key.js +10 -5
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +5 -2
- package/src/rich-text-editor/actions/full-screen.js +5 -4
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +124 -17
- package/src/rich-text-editor/actions/keyboard.js +3 -1
- package/src/rich-text-editor/actions/markdown-editor.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +5 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +156 -28
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +8 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +59 -12
- 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 +3 -3
- package/src/rich-text-editor/actions/toolbar.js +35 -96
- package/src/rich-text-editor/base/classes.d.ts +5 -5
- package/src/rich-text-editor/base/classes.js +5 -5
- package/src/rich-text-editor/base/constant.d.ts +46 -1
- package/src/rich-text-editor/base/constant.js +215 -1
- package/src/rich-text-editor/base/interface.d.ts +47 -3
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +3 -3
- package/src/rich-text-editor/base/rich-text-editor.d.ts +16 -4
- package/src/rich-text-editor/base/rich-text-editor.js +184 -97
- package/src/rich-text-editor/base/util.js +22 -4
- package/src/rich-text-editor/formatter/formatter.js +16 -4
- package/src/rich-text-editor/models/default-locale.js +31 -25
- package/src/rich-text-editor/models/items.js +3 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +1 -1
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -0
- package/src/rich-text-editor/renderer/audio-module.js +22 -4
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/dialog-renderer.js +22 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +2 -1
- package/src/rich-text-editor/renderer/image-module.d.ts +9 -1
- package/src/rich-text-editor/renderer/image-module.js +248 -213
- package/src/rich-text-editor/renderer/link-module.js +53 -24
- package/src/rich-text-editor/renderer/table-module.d.ts +10 -1
- package/src/rich-text-editor/renderer/table-module.js +343 -168
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +3 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.js +106 -101
- package/src/rich-text-editor/renderer/video-module.d.ts +3 -0
- package/src/rich-text-editor/renderer/video-module.js +82 -41
- package/src/rich-text-editor/renderer/view-source.d.ts +1 -0
- package/src/rich-text-editor/renderer/view-source.js +15 -5
- package/src/selection/selection.js +3 -0
- package/styles/bootstrap-dark.css +353 -103
- package/styles/bootstrap.css +357 -112
- package/styles/bootstrap4.css +338 -96
- package/styles/bootstrap5-dark.css +344 -97
- package/styles/bootstrap5.css +344 -97
- package/styles/fabric-dark.css +332 -90
- package/styles/fabric.css +333 -91
- package/styles/fluent-dark.css +360 -98
- package/styles/fluent.css +360 -98
- package/styles/highcontrast-light.css +332 -90
- package/styles/highcontrast.css +336 -91
- package/styles/material-dark.css +339 -92
- package/styles/material.css +339 -92
- package/styles/material3-dark.css +348 -100
- package/styles/material3.css +348 -100
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +17 -13
- package/styles/rich-text-editor/_bootstrap-definition.scss +22 -19
- package/styles/rich-text-editor/_bootstrap4-definition.scss +11 -7
- package/styles/rich-text-editor/_bootstrap5-definition.scss +8 -4
- package/styles/rich-text-editor/_fabric-dark-definition.scss +6 -2
- package/styles/rich-text-editor/_fabric-definition.scss +7 -3
- package/styles/rich-text-editor/_fluent-definition.scss +14 -10
- package/styles/rich-text-editor/_fusionnew-definition.scss +7 -3
- package/styles/rich-text-editor/_highcontrast-definition.scss +7 -3
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +6 -2
- package/styles/rich-text-editor/_layout.scss +211 -34
- package/styles/rich-text-editor/_material-dark-definition.scss +6 -2
- package/styles/rich-text-editor/_material-definition.scss +6 -2
- package/styles/rich-text-editor/_material3-definition.scss +16 -12
- package/styles/rich-text-editor/_tailwind-definition.scss +23 -19
- package/styles/rich-text-editor/_theme.scss +113 -24
- package/styles/rich-text-editor/bootstrap-dark.css +353 -103
- package/styles/rich-text-editor/bootstrap.css +357 -112
- package/styles/rich-text-editor/bootstrap4.css +338 -96
- package/styles/rich-text-editor/bootstrap5-dark.css +344 -97
- package/styles/rich-text-editor/bootstrap5.css +344 -97
- package/styles/rich-text-editor/fabric-dark.css +332 -90
- package/styles/rich-text-editor/fabric.css +333 -91
- package/styles/rich-text-editor/fluent-dark.css +360 -98
- package/styles/rich-text-editor/fluent.css +360 -98
- package/styles/rich-text-editor/highcontrast-light.css +332 -90
- package/styles/rich-text-editor/highcontrast.css +336 -91
- package/styles/rich-text-editor/icons/_bds.scss +348 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +4 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_fabric.scss +4 -4
- package/styles/rich-text-editor/icons/_fluent.scss +4 -4
- package/styles/rich-text-editor/icons/_fusionnew.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +4 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +4 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_material.scss +4 -4
- package/styles/rich-text-editor/icons/_material3.scss +4 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +4 -4
- package/styles/rich-text-editor/material-dark.css +339 -92
- package/styles/rich-text-editor/material.css +339 -92
- package/styles/rich-text-editor/material3-dark.css +348 -100
- package/styles/rich-text-editor/material3.css +348 -100
- package/styles/rich-text-editor/tailwind-dark.css +383 -113
- package/styles/rich-text-editor/tailwind.css +383 -113
- package/styles/tailwind-dark.css +383 -113
- package/styles/tailwind.css +383 -113
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
|
@@ -2,6 +2,7 @@ import { IsFormatted } from './isformatted';
|
|
|
2
2
|
import * as CONSTANT from './../base/constant';
|
|
3
3
|
import { NodeSelection } from './../../selection/index';
|
|
4
4
|
import { getDefaultHtmlTbStatus } from './../../common/util';
|
|
5
|
+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
5
6
|
/**
|
|
6
7
|
* Update Toolbar Status
|
|
7
8
|
*
|
|
@@ -16,7 +17,7 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
16
17
|
* get method
|
|
17
18
|
*
|
|
18
19
|
* @param {Document} docElement - specifies the document element
|
|
19
|
-
* @param {Node}
|
|
20
|
+
* @param {Node} rootNode - specifies the content editable element
|
|
20
21
|
* @param {string[]} formatNode - specifies the format node
|
|
21
22
|
* @param {string[]} fontSize - specifies the font size
|
|
22
23
|
* @param {string[]} fontName - specifies the font name.
|
|
@@ -25,7 +26,7 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
25
26
|
* @hidden
|
|
26
27
|
* @deprecated
|
|
27
28
|
*/
|
|
28
|
-
ToolbarStatus.get = function (docElement,
|
|
29
|
+
ToolbarStatus.get = function (docElement, rootNode, formatNode, fontSize, fontName, documentNode) {
|
|
29
30
|
var formatCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
30
31
|
var nodeCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
31
32
|
var nodeSelection = new NodeSelection();
|
|
@@ -55,7 +56,7 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
55
56
|
}
|
|
56
57
|
for (var index = 0; index < nodes.length; index++) {
|
|
57
58
|
// eslint-disable-next-line max-len
|
|
58
|
-
formatCollection = this.getFormatParent(docElement, formatCollection, nodes[index],
|
|
59
|
+
formatCollection = this.getFormatParent(docElement, formatCollection, nodes[index], rootNode, formatNode, fontSize, fontName);
|
|
59
60
|
if ((index === 0 && formatCollection.bold) || !formatCollection.bold) {
|
|
60
61
|
nodeCollection.bold = formatCollection.bold;
|
|
61
62
|
}
|
|
@@ -130,16 +131,24 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
130
131
|
return node;
|
|
131
132
|
};
|
|
132
133
|
ToolbarStatus.getFormatParent = function (docElement, formatCollection, node, targetNode, formatNode, fontSize, fontName) {
|
|
134
|
+
var isListUpdated = false;
|
|
135
|
+
var isComplexListUpdated = false;
|
|
133
136
|
if (targetNode.contains(node) ||
|
|
134
137
|
(node.nodeType === 3 && targetNode.nodeType !== 3 && targetNode.contains(node.parentNode))) {
|
|
135
138
|
do {
|
|
136
|
-
formatCollection = this.isFormattedNode(docElement, formatCollection, node, formatNode, fontSize, fontName);
|
|
139
|
+
formatCollection = this.isFormattedNode(docElement, formatCollection, node, isListUpdated, isComplexListUpdated, formatNode, fontSize, fontName);
|
|
140
|
+
if (formatCollection.orderedlist || formatCollection.unorderedlist) {
|
|
141
|
+
isListUpdated = true;
|
|
142
|
+
}
|
|
143
|
+
if (formatCollection.bulletFormatList || formatCollection.numberFormatList) {
|
|
144
|
+
isComplexListUpdated = true;
|
|
145
|
+
}
|
|
137
146
|
node = node.parentNode;
|
|
138
147
|
} while (node && (node !== targetNode));
|
|
139
148
|
}
|
|
140
149
|
return formatCollection;
|
|
141
150
|
};
|
|
142
|
-
ToolbarStatus.isFormattedNode = function (docElement, formatCollection, node, formatNode, fontSize, fontName) {
|
|
151
|
+
ToolbarStatus.isFormattedNode = function (docElement, formatCollection, node, isListUpdated, isComplexListUpdated, formatNode, fontSize, fontName) {
|
|
143
152
|
if (!formatCollection.bold) {
|
|
144
153
|
formatCollection.bold = IsFormatted.isBold(node);
|
|
145
154
|
}
|
|
@@ -170,10 +179,10 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
170
179
|
if (!formatCollection.backgroundcolor) {
|
|
171
180
|
formatCollection.backgroundcolor = this.isBackgroundColor(node);
|
|
172
181
|
}
|
|
173
|
-
if (!formatCollection.orderedlist) {
|
|
182
|
+
if (!formatCollection.orderedlist && !isListUpdated) {
|
|
174
183
|
formatCollection.orderedlist = this.isOrderedList(node);
|
|
175
184
|
}
|
|
176
|
-
if (!formatCollection.unorderedlist) {
|
|
185
|
+
if (!formatCollection.unorderedlist && !isListUpdated) {
|
|
177
186
|
formatCollection.unorderedlist = this.isUnorderedList(node);
|
|
178
187
|
}
|
|
179
188
|
if (!formatCollection.alignments) {
|
|
@@ -188,10 +197,10 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
188
197
|
if (!formatCollection.createlink) {
|
|
189
198
|
formatCollection.createlink = this.isLink(node);
|
|
190
199
|
}
|
|
191
|
-
if (!formatCollection.numberFormatList) {
|
|
200
|
+
if (!formatCollection.numberFormatList && !isComplexListUpdated) {
|
|
192
201
|
formatCollection.numberFormatList = this.isNumberFormatList(node);
|
|
193
202
|
}
|
|
194
|
-
if (!formatCollection.bulletFormatList) {
|
|
203
|
+
if (!formatCollection.bulletFormatList && !isComplexListUpdated) {
|
|
195
204
|
formatCollection.bulletFormatList = this.isBulletFormatList(node);
|
|
196
205
|
}
|
|
197
206
|
return formatCollection;
|
|
@@ -250,7 +259,8 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
250
259
|
// eslint-disable-next-line
|
|
251
260
|
var pattern = new RegExp(name, 'i');
|
|
252
261
|
if ((value.replace(/"/g, '').replace(/ /g, '').toLowerCase() === name.replace(/"/g, '').replace(/ /g, '').toLowerCase()) ||
|
|
253
|
-
(value.split(',')[0] && value.split(',')[0].
|
|
262
|
+
(value.split(',')[0] && !isNullOrUndefined(value.split(',')[0].trim().match(pattern)) &&
|
|
263
|
+
value.split(',')[0].trim() === value.split(',')[0].trim().match(pattern)[0])) {
|
|
254
264
|
index = pos;
|
|
255
265
|
}
|
|
256
266
|
}) && (index !== null)))) {
|
|
@@ -98,6 +98,25 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
98
98
|
}
|
|
99
99
|
return textContent;
|
|
100
100
|
};
|
|
101
|
+
UndoRedoManager.prototype.isElementStructureEqual = function (previousFragment, currentFragment) {
|
|
102
|
+
if (previousFragment.childNodes.length !== currentFragment.childNodes.length) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
for (var i = 0; i < previousFragment.childNodes.length; i++) {
|
|
106
|
+
var previousFragmentNode = previousFragment.childNodes[i];
|
|
107
|
+
var currentFragmentNode = currentFragment.childNodes[i];
|
|
108
|
+
if (!previousFragmentNode || !currentFragmentNode) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
if (previousFragmentNode.nodeType !== currentFragmentNode.nodeType) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (previousFragmentNode.outerHTML !== currentFragmentNode.outerHTML) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
};
|
|
101
120
|
/**
|
|
102
121
|
* RTE collection stored html format.
|
|
103
122
|
*
|
|
@@ -134,7 +153,8 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
134
153
|
(this.undoRedoStack[this.undoRedoStack.length - 1].range.endOffset === save.range.endOffset) &&
|
|
135
154
|
(this.undoRedoStack[this.undoRedoStack.length - 1].range.range.startContainer === save.range.startContainer) &&
|
|
136
155
|
(this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length - 1].text).trim() ===
|
|
137
|
-
this.getTextContentFromFragment(changEle.text).trim())
|
|
156
|
+
this.getTextContentFromFragment(changEle.text).trim()) &&
|
|
157
|
+
this.isElementStructureEqual(this.undoRedoStack[this.undoRedoStack.length - 1].text, changEle.text)) {
|
|
138
158
|
return;
|
|
139
159
|
}
|
|
140
160
|
this.undoRedoStack.push(changEle);
|
|
@@ -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;
|
|
@@ -48,6 +48,7 @@ export declare class BaseQuickToolbar {
|
|
|
48
48
|
* @deprecated
|
|
49
49
|
*/
|
|
50
50
|
showPopup(x: number, y: number, target: Element, type?: string): void;
|
|
51
|
+
private tooltipBeforeRender;
|
|
51
52
|
/**
|
|
52
53
|
* hidePopup method
|
|
53
54
|
*
|
|
@@ -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
|
/**
|
|
@@ -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,23 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
88
102
|
y = e.y;
|
|
89
103
|
}
|
|
90
104
|
target = isAligned ? e.target : target;
|
|
105
|
+
var targetOffsetLeft;
|
|
106
|
+
if (!isNOU(closest(target, 'table'))) {
|
|
107
|
+
targetOffsetLeft = target.offsetLeft;
|
|
108
|
+
var parentTable = closest(target.parentElement, 'td');
|
|
109
|
+
while (!isNOU(parentTable)) {
|
|
110
|
+
targetOffsetLeft += parentTable.offsetLeft;
|
|
111
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
targetOffsetLeft = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetLeft : target.offsetLeft;
|
|
116
|
+
}
|
|
91
117
|
if (target.offsetWidth > e.popWidth) {
|
|
92
|
-
x = (target.offsetWidth / 2) - (e.popWidth / 2) + e.parentData.left +
|
|
118
|
+
x = (target.offsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + targetOffsetLeft;
|
|
93
119
|
}
|
|
94
120
|
else {
|
|
95
|
-
x = e.parentData.left +
|
|
121
|
+
x = e.parentData.left + targetOffsetLeft;
|
|
96
122
|
}
|
|
97
123
|
this.popupObj.position.X = ((x + e.popWidth) > e.parentData.right) ? e.parentData.right - e.popWidth : x;
|
|
98
124
|
this.popupObj.position.Y = (y >= 0) ? y : e.y + 5;
|
|
@@ -216,18 +242,23 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
216
242
|
editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
|
|
217
243
|
editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
|
|
218
244
|
}
|
|
219
|
-
if (!_this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text') {
|
|
245
|
+
if ((!_this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text' && type !== 'link') || target.tagName === 'IMG') {
|
|
220
246
|
_this.parent.disableToolbarItem(_this.parent.toolbarSettings.items);
|
|
221
247
|
_this.parent.enableToolbarItem(['Undo', 'Redo']);
|
|
222
248
|
}
|
|
249
|
+
else {
|
|
250
|
+
_this.parent.enableToolbarItem(_this.parent.toolbarSettings.items);
|
|
251
|
+
}
|
|
223
252
|
append([_this.element], document.body);
|
|
224
253
|
if (_this.parent.showTooltip) {
|
|
225
254
|
_this.tooltip = new Tooltip({
|
|
226
255
|
target: '#' + _this.element.id + ' [title]',
|
|
227
256
|
openDelay: 400,
|
|
228
257
|
showTipPointer: true,
|
|
258
|
+
beforeRender: _this.tooltipBeforeRender.bind(_this),
|
|
229
259
|
windowCollision: true,
|
|
230
|
-
position: 'BottomCenter'
|
|
260
|
+
position: 'BottomCenter',
|
|
261
|
+
cssClass: _this.parent.getCssClass()
|
|
231
262
|
});
|
|
232
263
|
_this.tooltip.appendTo(_this.element);
|
|
233
264
|
}
|
|
@@ -261,9 +292,9 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
261
292
|
parentData: parent_1.getBoundingClientRect(),
|
|
262
293
|
tBarElementHeight: tBarHeight
|
|
263
294
|
};
|
|
264
|
-
if (target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
295
|
+
if ((closest(target, 'TABLE') || target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
265
296
|
(target.classList.contains(classes.CLS_AUDIOWRAP) || target.classList.contains(classes.CLS_CLICKELEM) ||
|
|
266
|
-
target.classList.contains(classes.CLS_VID_CLICK_ELEM)))) {
|
|
297
|
+
target.classList.contains(classes.CLS_VID_CLICK_ELEM)))) && (x == beforeQuickToolbarArgs.positionX || y == beforeQuickToolbarArgs.positionY)) {
|
|
267
298
|
_this.setPosition(showPopupData);
|
|
268
299
|
}
|
|
269
300
|
if (!_this.parent.inlineMode.enable) {
|
|
@@ -281,10 +312,15 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
281
312
|
maxWidth: window.outerWidth + 'px'
|
|
282
313
|
});
|
|
283
314
|
addClass([_this.element], [classes.CLS_POP]);
|
|
284
|
-
_this.
|
|
315
|
+
_this.isRendered = true;
|
|
285
316
|
}
|
|
286
317
|
});
|
|
287
318
|
};
|
|
319
|
+
BaseQuickToolbar.prototype.tooltipBeforeRender = function (args) {
|
|
320
|
+
if (args.target.querySelector('.e-active')) {
|
|
321
|
+
args.cancel = true;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
288
324
|
/**
|
|
289
325
|
* hidePopup method
|
|
290
326
|
*
|
|
@@ -318,7 +354,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
318
354
|
}
|
|
319
355
|
}
|
|
320
356
|
this.removeEleFromDOM();
|
|
321
|
-
this.
|
|
357
|
+
this.isRendered = false;
|
|
322
358
|
};
|
|
323
359
|
/**
|
|
324
360
|
* @param {string} item - specifies the string value
|
|
@@ -341,7 +377,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
341
377
|
};
|
|
342
378
|
BaseQuickToolbar.prototype.removeEleFromDOM = function () {
|
|
343
379
|
var element = this.popupObj.element;
|
|
344
|
-
if (this.
|
|
380
|
+
if (this.isRendered) {
|
|
345
381
|
this.dropDownButtons.destroyDropDowns();
|
|
346
382
|
this.colorPickerObj.destroyColorPicker();
|
|
347
383
|
removeClass([this.element], [classes.CLS_POP]);
|
|
@@ -359,7 +395,18 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
359
395
|
tbItems: this.quickTBarObj.toolbarObj.items
|
|
360
396
|
};
|
|
361
397
|
setToolbarStatus(options, true, this.parent);
|
|
362
|
-
if (
|
|
398
|
+
if (this.parent.quickToolbarSettings.text && this.parent.quickToolbarModule.textQTBar) {
|
|
399
|
+
var options_1 = {
|
|
400
|
+
args: args,
|
|
401
|
+
dropDownModule: this.parent.quickToolbarModule.textQTBar.dropDownButtons,
|
|
402
|
+
parent: this.parent,
|
|
403
|
+
tbElements: selectAll('.' + classes.CLS_TB_ITEM, this.parent.quickToolbarModule.textQTBar.element),
|
|
404
|
+
tbItems: this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items
|
|
405
|
+
};
|
|
406
|
+
setToolbarStatus(options_1, true, this.parent);
|
|
407
|
+
updateUndoRedoStatus(this.parent.quickToolbarModule.textQTBar.quickTBarObj, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
408
|
+
}
|
|
409
|
+
if (!select('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
363
410
|
updateUndoRedoStatus(this.parent.getBaseToolbarObject(), this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
364
411
|
}
|
|
365
412
|
};
|
|
@@ -391,7 +438,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
391
438
|
}
|
|
392
439
|
this.parent.on(events.destroy, this.destroy, this);
|
|
393
440
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
394
|
-
if (this.parent.inlineMode.enable) {
|
|
441
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
395
442
|
this.parent.on(events.toolbarUpdated, this.updateStatus, this);
|
|
396
443
|
}
|
|
397
444
|
};
|
|
@@ -433,7 +480,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
433
480
|
}
|
|
434
481
|
this.parent.off(events.destroy, this.destroy);
|
|
435
482
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
436
|
-
if (this.parent.inlineMode.enable) {
|
|
483
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
437
484
|
this.parent.off(events.toolbarUpdated, this.updateStatus);
|
|
438
485
|
}
|
|
439
486
|
};
|
|
@@ -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
|
*/
|
|
@@ -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
|
};
|
|
@@ -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,22 @@ 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
|
+
var isMacDev = window.navigator.platform.toLocaleLowerCase().includes('mac');
|
|
174
|
+
if (windowKeys["" + tooltipText]) {
|
|
175
|
+
shortCutKey = isMacDev ? windowKeys["" + tooltipText].replace('Ctrl+', '⌘').replace('Shift+', '⇧').replace('Alt+', '⌥') : windowKeys["" + tooltipText];
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
shortCutKey = tooltipText;
|
|
179
|
+
}
|
|
180
|
+
if (shortCutKey) {
|
|
181
|
+
if (!(items[num].command === "Images" && items[num].subCommand === "InsertLink")) {
|
|
182
|
+
items[num].tooltipText = (tooltipText !== shortCutKey) ? (isMacDev) ? shortCutKey : tooltipText + ' (' + shortCutKey + ')' : tooltipText;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
186
185
|
}
|
|
187
186
|
}
|
|
188
187
|
return items;
|
|
@@ -58,7 +58,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
58
58
|
document.body.appendChild(fontNode);
|
|
59
59
|
options = {
|
|
60
60
|
cssClass: _this.tools[item.toLocaleLowerCase()].icon
|
|
61
|
-
+ ' ' + classes.CLS_RTE_ELEMENTS + ' ' + classes.CLS_ICONS +
|
|
61
|
+
+ ' ' + classes.CLS_RTE_ELEMENTS + ' ' + classes.CLS_ICONS + _this.parent.getCssClass(true),
|
|
62
62
|
value: _this.tools[item.toLocaleLowerCase()].value,
|
|
63
63
|
command: _this.tools[item.toLocaleLowerCase()].command,
|
|
64
64
|
subCommand: _this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -85,7 +85,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
85
85
|
document.body.appendChild(backNode);
|
|
86
86
|
options = {
|
|
87
87
|
cssClass: _this.tools[item.toLocaleLowerCase()].icon
|
|
88
|
-
+ ' ' + classes.CLS_RTE_ELEMENTS + ' ' + classes.CLS_ICONS +
|
|
88
|
+
+ ' ' + classes.CLS_RTE_ELEMENTS + ' ' + classes.CLS_ICONS + _this.parent.getCssClass(true),
|
|
89
89
|
value: _this.tools[item.toLocaleLowerCase()].value,
|
|
90
90
|
command: _this.tools[item.toLocaleLowerCase()].command,
|
|
91
91
|
subCommand: _this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -100,7 +100,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
if (this.parent.inlineMode.enable) {
|
|
103
|
-
this.setCssClass({ cssClass: this.parent.
|
|
103
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
ColorPickerInput.prototype.destroy = function () {
|
|
@@ -170,6 +170,15 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
170
170
|
this.parent.on(events.destroyColorPicker, this.destroyColorPicker, this);
|
|
171
171
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
172
172
|
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
173
|
+
this.parent.on(events.showColorPicker, this.showColorPicker, this);
|
|
174
|
+
};
|
|
175
|
+
ColorPickerInput.prototype.showColorPicker = function (e) {
|
|
176
|
+
if (!isNullOrUndefined(this.fontColorPicker) && (e.toolbarClick === "fontcolor")) {
|
|
177
|
+
this.fontColorDropDown.toggle();
|
|
178
|
+
}
|
|
179
|
+
else if (!isNullOrUndefined(this.backgroundColorPicker) && (e.toolbarClick === "backgroundcolor")) {
|
|
180
|
+
this.backgroundColorDropDown.toggle();
|
|
181
|
+
}
|
|
173
182
|
};
|
|
174
183
|
ColorPickerInput.prototype.onPropertyChanged = function (model) {
|
|
175
184
|
var newProp = model.newProp;
|
|
@@ -243,6 +252,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
243
252
|
this.parent.off(events.destroyColorPicker, this.destroyColorPicker);
|
|
244
253
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
245
254
|
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
255
|
+
this.parent.off(events.showColorPicker, this.showColorPicker);
|
|
246
256
|
};
|
|
247
257
|
return ColorPickerInput;
|
|
248
258
|
}());
|
|
@@ -35,7 +35,7 @@ var Count = /** @class */ (function () {
|
|
|
35
35
|
};
|
|
36
36
|
Count.prototype.appendCount = function () {
|
|
37
37
|
var htmlText = this.parent.editorMode === 'Markdown' ? this.editPanel.value :
|
|
38
|
-
this.
|
|
38
|
+
(this.parent.getText().replace(/(\r\n|\n|\r|\t)/gm, ''));
|
|
39
39
|
if (this.parent.editorMode !== 'Markdown' && htmlText.indexOf('\u200B') !== -1) {
|
|
40
40
|
this.htmlLength = htmlText.replace(/\u200B/g, '').length;
|
|
41
41
|
}
|
|
@@ -134,7 +134,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
134
134
|
if (isNullOrUndefined(targetElement) || targetElement.classList.contains(classes.CLS_DROPDOWN_BTN)) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
var fontsize = _this.parent.fontSize.items.slice();
|
|
137
|
+
var fontsize = !isNullOrUndefined(_this.fontSizeDropDown) && !isNullOrUndefined(_this.fontSizeDropDown.items) && _this.fontSizeDropDown.items.length > 0 ? _this.fontSizeDropDown.items : JSON.parse(JSON.stringify(_this.parent.fontSize.items.slice()));
|
|
138
138
|
fontsize.forEach(function (item) {
|
|
139
139
|
Object.defineProperties(item, {
|
|
140
140
|
command: { value: 'Font', enumerable: true }, subCommand: { value: 'FontSize', enumerable: true }
|
|
@@ -191,7 +191,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
if (this.parent.inlineMode.enable) {
|
|
194
|
-
this.setCssClass({ cssClass: this.parent.
|
|
194
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
DropDownButtons.prototype.getUpdateItems = function (items, value) {
|
|
@@ -333,7 +333,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
333
333
|
if (targetElement.classList.contains(classes.CLS_DROPDOWN_BTN)) {
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
|
-
this.
|
|
336
|
+
this.tableCellDropDown = this.toolbarRenderer.renderDropDownButton({
|
|
337
337
|
iconCss: 'e-table-cell e-icons',
|
|
338
338
|
cssClass: classes.CLS_DROPDOWN_POPUP + ' ' + classes.CLS_DROPDOWN_ITEMS + ' ' + classes.CLS_QUICK_DROPDOWN,
|
|
339
339
|
itemName: 'TableCell',
|
|
@@ -441,6 +441,10 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
441
441
|
this.removeDropDownClasses(this.tableColumnsDropDown.element);
|
|
442
442
|
this.tableColumnsDropDown.destroy();
|
|
443
443
|
}
|
|
444
|
+
if (this.tableCellDropDown) {
|
|
445
|
+
this.removeDropDownClasses(this.tableCellDropDown.element);
|
|
446
|
+
this.tableCellDropDown.destroy();
|
|
447
|
+
}
|
|
444
448
|
if (this.tableCellVerticalAlignDropDown) {
|
|
445
449
|
this.removeDropDownClasses(this.tableCellVerticalAlignDropDown.element);
|
|
446
450
|
this.tableCellVerticalAlignDropDown.destroy();
|
|
@@ -494,7 +498,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
494
498
|
var dropDownObj = [
|
|
495
499
|
this.formatDropDown, this.fontNameDropDown, this.fontSizeDropDown, this.alignDropDown, this.imageAlignDropDown,
|
|
496
500
|
this.displayDropDown, this.numberFormatListDropDown, this.bulletFormatListDropDown, this.tableRowsDropDown,
|
|
497
|
-
this.tableColumnsDropDown, this.tableCellVerticalAlignDropDown
|
|
501
|
+
this.tableColumnsDropDown, this.tableCellDropDown, this.tableCellVerticalAlignDropDown
|
|
498
502
|
];
|
|
499
503
|
for (var i = 0; i < dropDownObj.length; i++) {
|
|
500
504
|
this.updateCss(dropDownObj[i], e);
|
|
@@ -512,7 +516,9 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
512
516
|
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
513
517
|
};
|
|
514
518
|
DropDownButtons.prototype.onIframeMouseDown = function () {
|
|
515
|
-
|
|
519
|
+
if (!isNullOrUndefined(this.parent.getToolbarElement()) && (this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length > 0 || this.parent.getToolbarElement().querySelectorAll('.e-dropdown-btn.e-rte-inline-dropdown[aria-expanded="true"]').length > 0)) {
|
|
520
|
+
dispatchEvent(document, 'mousedown');
|
|
521
|
+
}
|
|
516
522
|
};
|
|
517
523
|
DropDownButtons.prototype.removeEventListener = function () {
|
|
518
524
|
if (this.parent.isDestroyed) {
|