@syncfusion/ej2-richtexteditor 20.1.55 → 20.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +481 -93
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +473 -93
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/editor-manager/plugin/dom-node.js +7 -1
- package/src/editor-manager/plugin/lists.d.ts +1 -0
- package/src/editor-manager/plugin/lists.js +38 -1
- package/src/editor-manager/plugin/selection-commands.js +10 -2
- package/src/rich-text-editor/actions/base-quick-toolbar.js +8 -3
- package/src/rich-text-editor/actions/base-toolbar.d.ts +1 -0
- package/src/rich-text-editor/actions/base-toolbar.js +14 -1
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -0
- package/src/rich-text-editor/actions/color-picker.js +22 -1
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -0
- package/src/rich-text-editor/actions/dropdown-buttons.js +25 -0
- package/src/rich-text-editor/actions/file-manager.d.ts +1 -0
- package/src/rich-text-editor/actions/file-manager.js +14 -1
- package/src/rich-text-editor/actions/html-editor.js +11 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +6 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +79 -47
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +2 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +23 -2
- package/src/rich-text-editor/actions/toolbar.d.ts +1 -0
- package/src/rich-text-editor/actions/toolbar.js +15 -1
- package/src/rich-text-editor/base/constant.d.ts +10 -0
- package/src/rich-text-editor/base/constant.js +10 -0
- package/src/rich-text-editor/base/interface.d.ts +14 -0
- package/src/rich-text-editor/base/rich-text-editor.js +43 -1
- package/src/rich-text-editor/base/util.js +5 -0
- package/src/rich-text-editor/formatter/formatter.js +15 -0
- package/src/rich-text-editor/renderer/content-renderer.js +2 -1
- package/src/rich-text-editor/renderer/image-module.d.ts +5 -0
- package/src/rich-text-editor/renderer/image-module.js +57 -13
- package/src/rich-text-editor/renderer/link-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/link-module.js +19 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +6 -0
- package/src/rich-text-editor/renderer/table-module.js +58 -17
- package/src/rich-text-editor/renderer/toolbar-renderer.js +2 -1
- package/styles/bootstrap-dark.css +135 -519
- package/styles/bootstrap.css +136 -525
- package/styles/bootstrap4.css +145 -572
- package/styles/bootstrap5-dark.css +135 -539
- package/styles/bootstrap5.css +135 -539
- package/styles/fabric-dark.css +134 -518
- package/styles/fabric.css +135 -519
- package/styles/fluent-dark.css +134 -521
- package/styles/fluent.css +134 -521
- package/styles/highcontrast-light.css +135 -519
- package/styles/highcontrast.css +135 -517
- package/styles/material-dark.css +134 -518
- package/styles/material.css +135 -519
- package/styles/rich-text-editor/bootstrap-dark.css +135 -519
- package/styles/rich-text-editor/bootstrap.css +136 -525
- package/styles/rich-text-editor/bootstrap4.css +145 -572
- package/styles/rich-text-editor/bootstrap5-dark.css +135 -539
- package/styles/rich-text-editor/bootstrap5.css +135 -539
- package/styles/rich-text-editor/fabric-dark.css +134 -518
- package/styles/rich-text-editor/fabric.css +135 -519
- package/styles/rich-text-editor/fluent-dark.css +134 -521
- package/styles/rich-text-editor/fluent.css +134 -521
- package/styles/rich-text-editor/highcontrast-light.css +135 -519
- package/styles/rich-text-editor/highcontrast.css +135 -517
- package/styles/rich-text-editor/material-dark.css +134 -518
- package/styles/rich-text-editor/material.css +135 -519
- package/styles/rich-text-editor/tailwind-dark.css +135 -524
- package/styles/rich-text-editor/tailwind.css +135 -524
- package/styles/tailwind-dark.css +135 -524
- package/styles/tailwind.css +135 -524
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.1.
|
|
3
|
+
* version : 20.1.58
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@20.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@20.1.57",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-LjSfZ0mNXFBjRl/Q2pYJ1j8DWpzc8y64MLCMA6oSTIFRwmngZRRXOHXBLyifrkOX2371CSCsVPSxBuUV3pU60w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.1.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.1.57.tgz",
|
|
30
|
+
"_shasum": "cebf8bcc4da40e76f00f258bbcb1e50ab2dc0d03",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~20.1.
|
|
41
|
+
"@syncfusion/ej2-base": "~20.1.57",
|
|
42
42
|
"@syncfusion/ej2-buttons": "~20.1.55",
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~20.1.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.1.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~20.1.
|
|
46
|
-
"@syncfusion/ej2-popups": "~20.1.
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~20.1.
|
|
43
|
+
"@syncfusion/ej2-filemanager": "~20.1.58",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.1.58",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.1.58",
|
|
46
|
+
"@syncfusion/ej2-popups": "~20.1.58",
|
|
47
|
+
"@syncfusion/ej2-splitbuttons": "~20.1.57"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "Essential JS 2 RichTextEditor component",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "20.1.
|
|
73
|
+
"version": "20.1.58",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -541,7 +541,13 @@ var DOMNode = /** @class */ (function () {
|
|
|
541
541
|
markerStart.appendChild(start);
|
|
542
542
|
}
|
|
543
543
|
else {
|
|
544
|
-
|
|
544
|
+
if (start.nodeType != 3 && start.nodeName != '#text') {
|
|
545
|
+
var marker = this.marker(markerClassName.startSelection, '');
|
|
546
|
+
append([this.parseHTMLFragment(marker)], start);
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
this.replaceWith(start, this.marker(markerClassName.startSelection, this.encode(start.textContent)));
|
|
550
|
+
}
|
|
545
551
|
}
|
|
546
552
|
if (end.nodeType !== Node.TEXT_NODE && end.tagName === 'BR' &&
|
|
547
553
|
CONSTANT.IGNORE_BLOCK_TAGS.indexOf(end.parentNode.tagName.toLocaleLowerCase()) >= 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as CONSTANT from './../base/constant';
|
|
2
|
-
import { createElement, detach, prepend, append, attributes } from '@syncfusion/ej2-base';
|
|
2
|
+
import { createElement, detach, prepend, append, attributes, Browser } from '@syncfusion/ej2-base';
|
|
3
3
|
import { markerClassName } from './dom-node';
|
|
4
4
|
import * as EVENTS from './../../common/constant';
|
|
5
5
|
import { setStyleAttribute } from '@syncfusion/ej2-base';
|
|
@@ -178,6 +178,29 @@ var Lists = /** @class */ (function () {
|
|
|
178
178
|
parentList.parentElement.insertBefore(startNode.children[1], parentList);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
+
this.removeList(range, e);
|
|
182
|
+
};
|
|
183
|
+
Lists.prototype.removeList = function (range, e) {
|
|
184
|
+
var startNode = this.parent.domNode.getSelectedNode(range.startContainer, range.startOffset);
|
|
185
|
+
var endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
|
|
186
|
+
startNode = startNode.nodeName === 'BR' ? startNode.parentElement : startNode;
|
|
187
|
+
endNode = endNode.nodeName === 'BR' ? endNode.parentElement : endNode;
|
|
188
|
+
if (((range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'LI') &&
|
|
189
|
+
isNOU(endNode.nextElementSibling) && endNode.textContent.length === range.endOffset &&
|
|
190
|
+
isNOU(startNode.previousElementSibling) && range.startOffset === 0) ||
|
|
191
|
+
(Browser.userAgent.indexOf('Firefox') != -1 && range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
192
|
+
range.startOffset === 0 && range.endOffset === 1)) {
|
|
193
|
+
if (Browser.userAgent.indexOf('Firefox') != -1) {
|
|
194
|
+
detach(range.commonAncestorContainer.childNodes[0]);
|
|
195
|
+
}
|
|
196
|
+
else if (range.commonAncestorContainer.nodeName === 'LI') {
|
|
197
|
+
detach(range.commonAncestorContainer.parentElement);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
detach(range.commonAncestorContainer);
|
|
201
|
+
}
|
|
202
|
+
e.event.preventDefault();
|
|
203
|
+
}
|
|
181
204
|
};
|
|
182
205
|
Lists.prototype.keyDownHandler = function (e) {
|
|
183
206
|
if (e.event.which === 13) {
|
|
@@ -202,6 +225,7 @@ var Lists = /** @class */ (function () {
|
|
|
202
225
|
&& (commonAncestor.lastElementChild === closest(endNode, 'li')) && !range.collapsed) {
|
|
203
226
|
detach(commonAncestor);
|
|
204
227
|
}
|
|
228
|
+
this.removeList(range, e);
|
|
205
229
|
}
|
|
206
230
|
if (e.event.which === 9) {
|
|
207
231
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
@@ -417,6 +441,19 @@ var Lists = /** @class */ (function () {
|
|
|
417
441
|
};
|
|
418
442
|
Lists.prototype.applyListsHandler = function (e) {
|
|
419
443
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
444
|
+
if (Browser.userAgent.indexOf('Firefox') != -1 && range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement) {
|
|
445
|
+
var startChildNodes = range.startContainer.childNodes;
|
|
446
|
+
var startNode = ((startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) : range.startOffset]) || range.startContainer);
|
|
447
|
+
var endNode = (range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) : range.endOffset] || range.endContainer);
|
|
448
|
+
var lastSelectionNode = endNode.lastChild.nodeName === 'BR' ? (isNOU(endNode.lastChild.previousSibling) ? endNode
|
|
449
|
+
: endNode.lastChild.previousSibling) : endNode.lastChild;
|
|
450
|
+
while (!isNOU(lastSelectionNode) && lastSelectionNode.nodeName !== '#text' && lastSelectionNode.nodeName !== 'IMG' &&
|
|
451
|
+
lastSelectionNode.nodeName !== 'BR' && lastSelectionNode.nodeName !== 'HR') {
|
|
452
|
+
lastSelectionNode = lastSelectionNode.lastChild;
|
|
453
|
+
}
|
|
454
|
+
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, startNode, lastSelectionNode, 0, lastSelectionNode.textContent.length);
|
|
455
|
+
range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
456
|
+
}
|
|
420
457
|
if (range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
421
458
|
range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
422
459
|
this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName != 'TABLE' &&
|
|
@@ -270,8 +270,16 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
270
270
|
for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
|
|
271
271
|
// eslint-disable-next-line
|
|
272
272
|
nodeTraverse = nodeTraverse) {
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
var nodeTraverseCondition = void 0;
|
|
274
|
+
if (formatNode.nodeName === 'SPAN') {
|
|
275
|
+
nodeTraverseCondition = nodeTraverse.parentElement.tagName.toLocaleLowerCase()
|
|
276
|
+
=== formatNode.tagName.toLocaleLowerCase() && nodeTraverse.parentElement.getAttribute('style') === formatNodeStyles;
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
nodeTraverseCondition = nodeTraverse.parentElement.tagName.toLocaleLowerCase()
|
|
280
|
+
=== formatNode.tagName.toLocaleLowerCase();
|
|
281
|
+
}
|
|
282
|
+
if (nodeTraverse.parentElement && nodeTraverseCondition &&
|
|
275
283
|
(nodeTraverse.parentElement.childElementCount > 1 || range.startOffset > 1)) {
|
|
276
284
|
if (textNode.parentElement && textNode.parentElement.tagName.toLocaleLowerCase()
|
|
277
285
|
=== formatNode.tagName.toLocaleLowerCase()) {
|
|
@@ -50,17 +50,18 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
50
50
|
this.element = this.parent.createElement('div', { id: popupId, className: className + ' ' + classes.CLS_RTE_ELEMENTS });
|
|
51
51
|
this.element.setAttribute('aria-owns', this.parent.getID());
|
|
52
52
|
this.appendPopupContent();
|
|
53
|
-
this.createToolbar(args.toolbarItems, args.mode);
|
|
53
|
+
this.createToolbar(args.toolbarItems, args.mode, args.cssClass);
|
|
54
54
|
this.popupRenderer.renderPopup(this);
|
|
55
55
|
this.addEventListener();
|
|
56
56
|
};
|
|
57
|
-
BaseQuickToolbar.prototype.createToolbar = function (items, mode) {
|
|
57
|
+
BaseQuickToolbar.prototype.createToolbar = function (items, mode, cssClass) {
|
|
58
58
|
this.quickTBarObj = new BaseToolbar(this.parent, this.locator);
|
|
59
59
|
this.quickTBarObj.render({
|
|
60
60
|
container: 'quick',
|
|
61
61
|
target: this.toolbarElement,
|
|
62
62
|
items: items,
|
|
63
|
-
mode: mode
|
|
63
|
+
mode: mode,
|
|
64
|
+
cssClass: cssClass
|
|
64
65
|
});
|
|
65
66
|
this.quickTBarObj.toolbarObj.refresh();
|
|
66
67
|
};
|
|
@@ -252,6 +253,10 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
252
253
|
_this.popupObj.element.classList.remove('e-popup-open');
|
|
253
254
|
removeClass([_this.element], [classes.CLS_HIDE]);
|
|
254
255
|
_this.popupObj.show({ name: 'ZoomIn', duration: (Browser.isIE ? 250 : 400) });
|
|
256
|
+
if (_this.popupObj && _this.parent.cssClass) {
|
|
257
|
+
removeClass([_this.popupObj.element], _this.parent.cssClass);
|
|
258
|
+
addClass([_this.popupObj.element], _this.parent.cssClass);
|
|
259
|
+
}
|
|
255
260
|
setStyleAttribute(_this.element, {
|
|
256
261
|
maxWidth: window.outerWidth + 'px'
|
|
257
262
|
});
|
|
@@ -16,6 +16,7 @@ export declare class BaseToolbar {
|
|
|
16
16
|
constructor(parent?: IRichTextEditor, serviceLocator?: ServiceLocator);
|
|
17
17
|
private addEventListener;
|
|
18
18
|
private removeEventListener;
|
|
19
|
+
private setCssClass;
|
|
19
20
|
private setRtl;
|
|
20
21
|
private getClass;
|
|
21
22
|
private getTemplateObject;
|
|
@@ -23,12 +23,24 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
23
23
|
}
|
|
24
24
|
BaseToolbar.prototype.addEventListener = function () {
|
|
25
25
|
this.parent.on(events.rtlMode, this.setRtl, this);
|
|
26
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
26
27
|
this.parent.on(events.destroy, this.removeEventListener, this);
|
|
27
28
|
};
|
|
28
29
|
BaseToolbar.prototype.removeEventListener = function () {
|
|
29
30
|
this.parent.off(events.rtlMode, this.setRtl);
|
|
31
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
30
32
|
this.parent.off(events.destroy, this.removeEventListener);
|
|
31
33
|
};
|
|
34
|
+
BaseToolbar.prototype.setCssClass = function (e) {
|
|
35
|
+
if (!isNullOrUndefined(this.toolbarObj)) {
|
|
36
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
37
|
+
this.toolbarObj.setProperties({ cssClass: (this.toolbarObj.cssClass + ' ' + e.cssClass).trim() });
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.toolbarObj.setProperties({ cssClass: (this.toolbarObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
32
44
|
BaseToolbar.prototype.setRtl = function (args) {
|
|
33
45
|
if (!isNullOrUndefined(this.toolbarObj)) {
|
|
34
46
|
this.toolbarObj.setProperties({ enableRtl: args.enableRtl });
|
|
@@ -158,7 +170,8 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
158
170
|
items: this.getItems(args.items, args.container),
|
|
159
171
|
overflowMode: args.mode,
|
|
160
172
|
enablePersistence: this.parent.enablePersistence,
|
|
161
|
-
enableRtl: this.parent.enableRtl
|
|
173
|
+
enableRtl: this.parent.enableRtl,
|
|
174
|
+
cssClass: args.cssClass,
|
|
162
175
|
};
|
|
163
176
|
};
|
|
164
177
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { select, detach, extend } from '@syncfusion/ej2-base';
|
|
1
|
+
import { select, detach, extend, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
2
|
import { RenderType } from '../base/enum';
|
|
3
3
|
import * as events from '../base/constant';
|
|
4
4
|
import * as classes from '../base/classes';
|
|
@@ -83,6 +83,9 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
+
if (this.parent.inlineMode.enable) {
|
|
87
|
+
this.setCssClass({ cssClass: this.parent.cssClass });
|
|
88
|
+
}
|
|
86
89
|
};
|
|
87
90
|
ColorPickerInput.prototype.destroy = function () {
|
|
88
91
|
this.removeEventListener();
|
|
@@ -128,12 +131,29 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
128
131
|
this.backgroundColorDropDown.setProperties({ enableRtl: args.enableRtl });
|
|
129
132
|
}
|
|
130
133
|
};
|
|
134
|
+
ColorPickerInput.prototype.setCssClass = function (e) {
|
|
135
|
+
this.updateCss(this.fontColorPicker, this.fontColorDropDown, e);
|
|
136
|
+
this.updateCss(this.backgroundColorPicker, this.backgroundColorDropDown, e);
|
|
137
|
+
};
|
|
138
|
+
ColorPickerInput.prototype.updateCss = function (colorPickerObj, dropDownObj, e) {
|
|
139
|
+
if (colorPickerObj && e.cssClass) {
|
|
140
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
141
|
+
colorPickerObj.setProperties({ cssClass: (colorPickerObj.cssClass + ' ' + e.cssClass).trim() });
|
|
142
|
+
dropDownObj.setProperties({ cssClass: (dropDownObj.cssClass + ' ' + e.cssClass).trim() });
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
colorPickerObj.setProperties({ cssClass: (colorPickerObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
146
|
+
dropDownObj.setProperties({ cssClass: (dropDownObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
131
150
|
ColorPickerInput.prototype.addEventListener = function () {
|
|
132
151
|
this.parent.on(events.toolbarRenderComplete, this.renderColorPickerInput, this);
|
|
133
152
|
this.parent.on(events.rtlMode, this.setRtl, this);
|
|
134
153
|
this.parent.on(events.destroy, this.destroy, this);
|
|
135
154
|
this.parent.on(events.destroyColorPicker, this.destroyColorPicker, this);
|
|
136
155
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
156
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
137
157
|
};
|
|
138
158
|
ColorPickerInput.prototype.onPropertyChanged = function (model) {
|
|
139
159
|
var newProp = model.newProp;
|
|
@@ -206,6 +226,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
206
226
|
this.parent.off(events.rtlMode, this.setRtl);
|
|
207
227
|
this.parent.off(events.destroyColorPicker, this.destroyColorPicker);
|
|
208
228
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
229
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
209
230
|
};
|
|
210
231
|
return ColorPickerInput;
|
|
211
232
|
}());
|
|
@@ -187,6 +187,9 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
|
+
if (this.parent.inlineMode.enable) {
|
|
191
|
+
this.setCssClass({ cssClass: this.parent.cssClass });
|
|
192
|
+
}
|
|
190
193
|
};
|
|
191
194
|
DropDownButtons.prototype.getUpdateItems = function (items, value) {
|
|
192
195
|
var dropDownItems = items.slice();
|
|
@@ -474,6 +477,26 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
474
477
|
this.bulletFormatListDropDown.setProperties({ enableRtl: args.enableRtl });
|
|
475
478
|
}
|
|
476
479
|
};
|
|
480
|
+
DropDownButtons.prototype.updateCss = function (dropDownObj, e) {
|
|
481
|
+
if (dropDownObj && e.cssClass) {
|
|
482
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
483
|
+
dropDownObj.setProperties({ cssClass: (dropDownObj.cssClass + ' ' + e.cssClass).trim() });
|
|
484
|
+
}
|
|
485
|
+
else {
|
|
486
|
+
dropDownObj.setProperties({ cssClass: (dropDownObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
DropDownButtons.prototype.setCssClass = function (e) {
|
|
491
|
+
var dropDownObj = [
|
|
492
|
+
this.formatDropDown, this.fontNameDropDown, this.fontSizeDropDown, this.alignDropDown, this.imageAlignDropDown,
|
|
493
|
+
this.displayDropDown, this.numberFormatListDropDown, this.bulletFormatListDropDown, this.tableRowsDropDown,
|
|
494
|
+
this.tableColumnsDropDown, this.tableCellVerticalAlignDropDown
|
|
495
|
+
];
|
|
496
|
+
for (var i = 0; i < dropDownObj.length; i++) {
|
|
497
|
+
this.updateCss(dropDownObj[i], e);
|
|
498
|
+
}
|
|
499
|
+
};
|
|
477
500
|
DropDownButtons.prototype.addEventListener = function () {
|
|
478
501
|
if (this.parent.isDestroyed) {
|
|
479
502
|
return;
|
|
@@ -483,6 +506,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
483
506
|
this.parent.on(events.rtlMode, this.setRtl, this);
|
|
484
507
|
this.parent.on(events.destroy, this.removeEventListener, this);
|
|
485
508
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
509
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
486
510
|
};
|
|
487
511
|
DropDownButtons.prototype.onIframeMouseDown = function () {
|
|
488
512
|
dispatchEvent(document, 'mousedown');
|
|
@@ -496,6 +520,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
496
520
|
this.parent.off(events.beforeDropDownItemRender, this.beforeRender);
|
|
497
521
|
this.parent.off(events.destroy, this.removeEventListener);
|
|
498
522
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
523
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
499
524
|
};
|
|
500
525
|
return DropDownButtons;
|
|
501
526
|
}());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Browser, detach, closest, isNullOrUndefined as isNOU, EventHandler } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Browser, detach, closest, isNullOrUndefined as isNOU, EventHandler, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
2
|
import { ContextMenu, DetailsView, FileManager as EJ2FileManager } from '@syncfusion/ej2-filemanager';
|
|
3
3
|
import { NavigationPane, Toolbar } from '@syncfusion/ej2-filemanager';
|
|
4
4
|
import { RenderType } from '../base/enum';
|
|
@@ -78,6 +78,17 @@ 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.cssClass });
|
|
82
|
+
};
|
|
83
|
+
FileManager.prototype.setCssClass = function (e) {
|
|
84
|
+
if (this.dialogObj && e.cssClass) {
|
|
85
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
86
|
+
this.dialogObj.setProperties({ cssClass: (this.dialogObj.cssClass + ' ' + e.cssClass).trim() });
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.dialogObj.setProperties({ cssClass: (this.dialogObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
81
92
|
};
|
|
82
93
|
FileManager.prototype.renderFileManager = function () {
|
|
83
94
|
var _this = this;
|
|
@@ -202,12 +213,14 @@ var FileManager = /** @class */ (function () {
|
|
|
202
213
|
FileManager.prototype.addEventListener = function () {
|
|
203
214
|
this.parent.on(events.initialEnd, this.initialize, this);
|
|
204
215
|
this.parent.on(events.renderFileManager, this.render, this);
|
|
216
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
205
217
|
this.parent.on(events.destroy, this.destroy, this);
|
|
206
218
|
};
|
|
207
219
|
FileManager.prototype.removeEventListener = function () {
|
|
208
220
|
EventHandler.remove(this.parent.element.ownerDocument, 'mousedown', this.onDocumentClick);
|
|
209
221
|
this.parent.off(events.initialEnd, this.initialize);
|
|
210
222
|
this.parent.off(events.renderFileManager, this.render);
|
|
223
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
211
224
|
this.parent.off(events.destroy, this.destroy);
|
|
212
225
|
};
|
|
213
226
|
FileManager.prototype.destroyComponents = function () {
|
|
@@ -153,7 +153,17 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
153
153
|
e.args.keyCode === 13) {
|
|
154
154
|
this.spaceLink(e.args);
|
|
155
155
|
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
156
|
-
this.parent.
|
|
156
|
+
var currentLength = this.parent.getText().trim().length;
|
|
157
|
+
var selectionLength = this.parent.getSelection().length;
|
|
158
|
+
var totalLength = (currentLength - selectionLength) + 1;
|
|
159
|
+
if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
|
|
160
|
+
e.args.keyCode === 13) {
|
|
161
|
+
e.args.preventDefault();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
this.parent.notify(events.enterHandler, { args: e.args });
|
|
166
|
+
}
|
|
157
167
|
}
|
|
158
168
|
}
|
|
159
169
|
if (e.args.action === 'space') {
|
|
@@ -14,6 +14,10 @@ export declare class PasteCleanup {
|
|
|
14
14
|
private dialogRenderObj;
|
|
15
15
|
private popupObj;
|
|
16
16
|
private uploadObj;
|
|
17
|
+
private dialogObj;
|
|
18
|
+
private keepRadioButton;
|
|
19
|
+
private cleanRadioButton;
|
|
20
|
+
private plainTextRadioButton;
|
|
17
21
|
private inlineNode;
|
|
18
22
|
private blockNode;
|
|
19
23
|
private isNotFromHtml;
|
|
@@ -46,6 +50,8 @@ export declare class PasteCleanup {
|
|
|
46
50
|
private radioRender;
|
|
47
51
|
private selectFormatting;
|
|
48
52
|
private pasteDialog;
|
|
53
|
+
private updateCss;
|
|
54
|
+
private setCssClass;
|
|
49
55
|
private destroyDialog;
|
|
50
56
|
private cleanAppleClass;
|
|
51
57
|
private formatting;
|