@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41-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 +260 -0
- package/CHANGELOG.md +177 -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 +2919 -1147
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +2906 -1133
- 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/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +67 -7
- package/src/editor-manager/plugin/link.js +4 -1
- package/src/editor-manager/plugin/lists.js +121 -65
- 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 +2 -2
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -0
- package/src/editor-manager/plugin/selection-commands.js +165 -3
- package/src/editor-manager/plugin/table.d.ts +0 -1
- package/src/editor-manager/plugin/table.js +33 -30
- 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 +3 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +66 -15
- package/src/rich-text-editor/actions/base-toolbar.js +32 -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.js +25 -4
- package/src/rich-text-editor/actions/emoji-picker.js +15 -6
- 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.js +5 -4
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +127 -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 +7 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +45 -11
- 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 +196 -100
- package/src/rich-text-editor/base/util.d.ts +4 -0
- package/src/rich-text-editor/base/util.js +57 -5
- package/src/rich-text-editor/formatter/formatter.js +15 -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 +13 -0
- 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 +244 -212
- 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 +330 -165
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +4 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.js +105 -106
- package/src/rich-text-editor/renderer/video-module.d.ts +3 -0
- package/src/rich-text-editor/renderer/video-module.js +61 -34
- 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 +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.css +347 -99
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +14 -10
- package/styles/rich-text-editor/_bootstrap-definition.scss +20 -17
- 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 +9 -5
- 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 +208 -31
- 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 +25 -21
- package/styles/rich-text-editor/_theme.scss +93 -24
- 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 +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 +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.css +347 -99
- 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/src/global.d.ts +0 -1
|
@@ -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,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;
|
|
@@ -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
|
};
|
|
@@ -317,8 +354,11 @@ 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
|
|
@@ -341,7 +381,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -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,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;
|
|
@@ -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
|
}
|
|
@@ -3,7 +3,8 @@ import { RenderType } from '../base/enum';
|
|
|
3
3
|
import { getIndex } from '../base/util';
|
|
4
4
|
import * as events from '../base/constant';
|
|
5
5
|
import * as classes from '../base/classes';
|
|
6
|
-
import { getDropDownValue, getFormattedFontSize, getTooltipText } from '../base/util';
|
|
6
|
+
import { getDropDownValue, getFormattedFontSize, getTooltipText, getTooltipTextDropdownItems, getQuickToolbarTooltipText } from '../base/util';
|
|
7
|
+
import { fontNameLocale, formatsLocale, numberFormatListLocale, bulletFormatListLocale } from '../models/default-locale';
|
|
7
8
|
import * as model from '../models/items';
|
|
8
9
|
import { dispatchEvent } from '../base/util';
|
|
9
10
|
/**
|
|
@@ -24,10 +25,28 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
24
25
|
if (item.cssClass) {
|
|
25
26
|
addClass([args.element], item.cssClass);
|
|
26
27
|
}
|
|
28
|
+
if (item.command === 'Images' || item.command === 'Videos' || item.command === 'Audios' || item.command === 'Table') {
|
|
29
|
+
args.element.setAttribute('title', getQuickToolbarTooltipText(item.text) !== '' ? getQuickToolbarTooltipText(item.text) : item.text);
|
|
30
|
+
}
|
|
27
31
|
if (item.command === 'Alignments' || item.subCommand === 'JustifyLeft'
|
|
28
32
|
|| item.subCommand === 'JustifyRight' || item.subCommand === 'JustifyCenter') {
|
|
29
33
|
args.element.setAttribute('title', getTooltipText(item.subCommand.toLocaleLowerCase(), this.locator));
|
|
30
34
|
}
|
|
35
|
+
if (item.command === 'Formats') {
|
|
36
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.subCommand.toLocaleLowerCase(), this.locator, formatsLocale));
|
|
37
|
+
}
|
|
38
|
+
if (item.command === 'Font') {
|
|
39
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, fontNameLocale) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, fontNameLocale) : item.text);
|
|
40
|
+
}
|
|
41
|
+
if (item.subCommand === 'BulletFormatList') {
|
|
42
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, bulletFormatListLocale) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, bulletFormatListLocale) : item.text);
|
|
43
|
+
}
|
|
44
|
+
if (item.subCommand === 'NumberFormatList') {
|
|
45
|
+
args.element.setAttribute('title', (getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, numberFormatListLocale)) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, numberFormatListLocale) : item.text);
|
|
46
|
+
}
|
|
47
|
+
if (item.subCommand === 'FontSize') {
|
|
48
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.value.toLocaleLowerCase(), null, null, this.parent));
|
|
49
|
+
}
|
|
31
50
|
};
|
|
32
51
|
DropDownButtons.prototype.dropdownContent = function (width, type, content) {
|
|
33
52
|
return ('<span style="display: inline-flex;' + 'width:' + ((type === 'quick') ? 'auto' : width) + '" >' +
|
|
@@ -134,7 +153,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
134
153
|
if (isNullOrUndefined(targetElement) || targetElement.classList.contains(classes.CLS_DROPDOWN_BTN)) {
|
|
135
154
|
return;
|
|
136
155
|
}
|
|
137
|
-
var fontsize = _this.parent.fontSize.items.slice();
|
|
156
|
+
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
157
|
fontsize.forEach(function (item) {
|
|
139
158
|
Object.defineProperties(item, {
|
|
140
159
|
command: { value: 'Font', enumerable: true }, subCommand: { value: 'FontSize', enumerable: true }
|
|
@@ -191,7 +210,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
191
210
|
}
|
|
192
211
|
});
|
|
193
212
|
if (this.parent.inlineMode.enable) {
|
|
194
|
-
this.setCssClass({ cssClass: this.parent.
|
|
213
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
195
214
|
}
|
|
196
215
|
};
|
|
197
216
|
DropDownButtons.prototype.getUpdateItems = function (items, value) {
|
|
@@ -512,7 +531,9 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
512
531
|
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
513
532
|
};
|
|
514
533
|
DropDownButtons.prototype.onIframeMouseDown = function () {
|
|
515
|
-
|
|
534
|
+
if (this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length > 0) {
|
|
535
|
+
dispatchEvent(document, 'mousedown');
|
|
536
|
+
}
|
|
516
537
|
};
|
|
517
538
|
DropDownButtons.prototype.removeEventListener = function () {
|
|
518
539
|
if (this.parent.isDestroyed) {
|
|
@@ -44,6 +44,9 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
44
44
|
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
45
45
|
}
|
|
46
46
|
this.divElement = spanElement.closest('div');
|
|
47
|
+
if (!(this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer))) {
|
|
48
|
+
this.parent.contentModule.getEditPanel().focus();
|
|
49
|
+
}
|
|
47
50
|
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
48
51
|
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
49
52
|
this.clickEvent = args.args;
|
|
@@ -58,10 +61,10 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
58
61
|
}
|
|
59
62
|
this.popDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-popup', id: this.parent.getID() + '_emojiPicker' });
|
|
60
63
|
if (!isNOU(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
61
|
-
this.parent.getToolbar().appendChild(this.popDiv);
|
|
64
|
+
this.parent.getToolbar().parentElement.appendChild(this.popDiv);
|
|
62
65
|
}
|
|
63
66
|
else if (this.parent.inlineMode.enable) {
|
|
64
|
-
this.parent.
|
|
67
|
+
this.parent.element.appendChild(this.popDiv);
|
|
65
68
|
}
|
|
66
69
|
EventHandler.add(this.popDiv, 'keydown', this.onKeyDown, this);
|
|
67
70
|
EventHandler.add(this.popDiv, 'keyup', this.searchFilter, this);
|
|
@@ -640,7 +643,7 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
640
643
|
noEmojiObj.style.margin = '55px';
|
|
641
644
|
emojipickerAll.appendChild(noEmojiObj);
|
|
642
645
|
}
|
|
643
|
-
else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':')) {
|
|
646
|
+
else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':') || (inputValue === '' && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'))) {
|
|
644
647
|
emojipickerAll.removeChild(this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'));
|
|
645
648
|
}
|
|
646
649
|
emojipickerAll.appendChild(emojiBtnDiv);
|
|
@@ -683,7 +686,8 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
683
686
|
};
|
|
684
687
|
EmojiPicker.prototype.onkeyPress = function (e) {
|
|
685
688
|
var originalEvent = e.args;
|
|
686
|
-
var selection = this.parent.contentModule.
|
|
689
|
+
var selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
690
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
687
691
|
if (selection.rangeCount <= 0) {
|
|
688
692
|
return;
|
|
689
693
|
}
|
|
@@ -703,6 +707,10 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
703
707
|
}
|
|
704
708
|
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
705
709
|
removeClass([this.divElement], 'e-active');
|
|
710
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument : this.parent.contentModule.getDocument();
|
|
711
|
+
if (this.parent.showTooltip && !isNOU(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
712
|
+
this.parent.notify(events.destroyTooltip, { args: event });
|
|
713
|
+
}
|
|
706
714
|
this.popupObj.hide();
|
|
707
715
|
}
|
|
708
716
|
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
@@ -713,7 +721,8 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
713
721
|
};
|
|
714
722
|
EmojiPicker.prototype.onkeyUp = function (e) {
|
|
715
723
|
var originalEvent = e.args;
|
|
716
|
-
var selection = this.parent.contentModule.
|
|
724
|
+
var selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
725
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
717
726
|
if (selection.rangeCount <= 0) {
|
|
718
727
|
return;
|
|
719
728
|
}
|
|
@@ -739,7 +748,7 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
739
748
|
};
|
|
740
749
|
EmojiPicker.prototype.getCoordinates = function () {
|
|
741
750
|
var coordinates;
|
|
742
|
-
var selection = this.parent.contentModule.
|
|
751
|
+
var selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() : window.getSelection();
|
|
743
752
|
var range = selection.getRangeAt(0);
|
|
744
753
|
var firstChild;
|
|
745
754
|
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
@@ -50,7 +50,8 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
50
50
|
isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
|
|
51
51
|
}
|
|
52
52
|
if (e.args.which === 13 && !e.args.ctrlKey && (!Browser.isDevice ? e.args.code === 'Enter' : e.args.key === 'Enter')) {
|
|
53
|
-
if (isNOU(this.startNode.closest('LI, UL, OL')) && isNOU(this.endNode.closest('LI, UL, OL')) &&
|
|
53
|
+
if (isNOU(this.startNode.closest('LI, UL, OL')) && isNOU(this.endNode.closest('LI, UL, OL')) &&
|
|
54
|
+
isNOU(this.startNode.closest('.e-img-inner')) && isTableEnter &&
|
|
54
55
|
isNOU(this.startNode.closest('PRE')) && isNOU(this.endNode.closest('PRE'))) {
|
|
55
56
|
var shiftKey_1 = e.args.shiftKey;
|
|
56
57
|
var actionBeginArgs = {
|
|
@@ -236,7 +237,8 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
236
237
|
}
|
|
237
238
|
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
238
239
|
}
|
|
239
|
-
else if (nearBlockNode.textContent.length === 0 && !(!isNOU(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG'
|
|
240
|
+
else if (nearBlockNode.textContent.length === 0 && !(!isNOU(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
241
|
+
(nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
|
|
240
242
|
if (!isNOU(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
241
243
|
var newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, nearBlockNode, false).cloneNode(true);
|
|
242
244
|
_this.parent.formatter.editorManager.domNode.insertAfter(newElem, nearBlockNode);
|
|
@@ -484,10 +486,10 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
484
486
|
}
|
|
485
487
|
var previousBlockNode = this.parent.formatter.editorManager.domNode.blockNodes()[0].previousSibling;
|
|
486
488
|
var nextBlockNode = this.parent.formatter.editorManager.domNode.blockNodes()[0].nextSibling;
|
|
487
|
-
if (!isNOU(previousBlockNode) && previousBlockNode.hasAttribute('style')) {
|
|
489
|
+
if (!isNOU(previousBlockNode) && previousBlockNode.nodeName !== '#text' && previousBlockNode.hasAttribute('style') && previousBlockNode.nodeName !== 'TABLE') {
|
|
488
490
|
insertElem.setAttribute('style', previousBlockNode.getAttribute('style'));
|
|
489
491
|
}
|
|
490
|
-
if (isNOU(previousBlockNode) && !isNOU(nextBlockNode) && nextBlockNode.hasAttribute('style')) {
|
|
492
|
+
if (isNOU(previousBlockNode) && !isNOU(nextBlockNode) && nextBlockNode.nodeName !== '#text' && nextBlockNode.hasAttribute('style') && nextBlockNode.nodeName !== 'TABLE') {
|
|
491
493
|
insertElem.setAttribute('style', nextBlockNode.getAttribute('style'));
|
|
492
494
|
}
|
|
493
495
|
return insertElem;
|
|
@@ -78,7 +78,7 @@ var FileManager = /** @class */ (function () {
|
|
|
78
78
|
this.dialogObj.createElement = this.parent.createElement;
|
|
79
79
|
this.dialogObj.appendTo(dlgTarget);
|
|
80
80
|
this.dialogObj.show(Browser.isDevice ? true : false);
|
|
81
|
-
this.setCssClass({ cssClass: this.parent.
|
|
81
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
82
82
|
};
|
|
83
83
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
84
84
|
FileManager.prototype.setCssClass = function (e) {
|
|
@@ -38,7 +38,7 @@ var FormatPainter = /** @class */ (function () {
|
|
|
38
38
|
};
|
|
39
39
|
FormatPainter.prototype.onKeyDown = function (event) {
|
|
40
40
|
var originalEvent = event.args;
|
|
41
|
-
if ((originalEvent
|
|
41
|
+
if (!isNOU(originalEvent) && !isNOU(originalEvent.action) && (originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')
|
|
42
42
|
|| (originalEvent.action === 'escape' && (this.previousAction === 'format-copy' || this.previousAction === 'format-paste'))) {
|
|
43
43
|
if ((originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')) {
|
|
44
44
|
originalEvent.stopPropagation();
|
|
@@ -26,7 +26,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
26
26
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
27
27
|
}
|
|
28
28
|
if (this.parent.showTooltip && !isNOU(document.querySelector('.e-tooltip-wrap'))) {
|
|
29
|
-
this.parent.notify(events.
|
|
29
|
+
this.parent.notify(events.destroyTooltip, { args: event });
|
|
30
30
|
}
|
|
31
31
|
this.scrollableParent = getScrollableParent(this.parent.element);
|
|
32
32
|
if (!this.parent.element.classList.contains(classes.CLS_FULL_SCREEN)) {
|
|
@@ -46,7 +46,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
46
46
|
_this.parent.element.classList.add(classes.CLS_FULL_SCREEN);
|
|
47
47
|
_this.toggleParentOverflow(true);
|
|
48
48
|
var isExpand = _this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
49
|
-
_this.parent.setContentHeight(
|
|
49
|
+
_this.parent.setContentHeight('Maximize', isExpand);
|
|
50
50
|
if (_this.parent.toolbarModule) {
|
|
51
51
|
if (!_this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
52
52
|
_this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -81,7 +81,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
81
81
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
82
82
|
}
|
|
83
83
|
if (this.parent.showTooltip && !isNOU(document.querySelector('.e-tooltip-wrap'))) {
|
|
84
|
-
this.parent.notify(events.
|
|
84
|
+
this.parent.notify(events.destroyTooltip, { args: event });
|
|
85
85
|
}
|
|
86
86
|
if (this.parent.element.classList.contains(classes.CLS_FULL_SCREEN)) {
|
|
87
87
|
var evenArgs = {
|
|
@@ -98,7 +98,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
98
98
|
removeClass([elem[i]], ['e-rte-overflow']);
|
|
99
99
|
}
|
|
100
100
|
var isExpand = _this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
101
|
-
_this.parent.setContentHeight(
|
|
101
|
+
_this.parent.setContentHeight('Minimize', isExpand);
|
|
102
102
|
if (_this.parent.toolbarModule) {
|
|
103
103
|
if (!_this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
104
104
|
_this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -112,6 +112,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
112
112
|
_this.parent.toolbarModule.addFixedTBarClass();
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
+
_this.parent.refreshUI();
|
|
115
116
|
_this.parent.trigger(events.actionComplete, { requestType: 'Minimize', targetItem: 'Minimize', args: event });
|
|
116
117
|
}
|
|
117
118
|
});
|