@syncfusion/ej2-richtexteditor 20.1.55 → 20.1.56
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 +8 -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 +347 -88
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +347 -88
- 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 +8 -8
- package/src/editor-manager/plugin/dom-node.js +7 -1
- 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/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 +12 -0
- package/src/rich-text-editor/base/constant.d.ts +5 -0
- package/src/rich-text-editor/base/constant.js +5 -0
- package/src/rich-text-editor/base/interface.d.ts +11 -0
- package/src/rich-text-editor/base/rich-text-editor.js +2 -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
|
@@ -46,7 +46,8 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
46
46
|
popupType: popType,
|
|
47
47
|
toolbarItems: items,
|
|
48
48
|
mode: mode,
|
|
49
|
-
renderType: type
|
|
49
|
+
renderType: type,
|
|
50
|
+
cssClass: this.parent.cssClass
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
@@ -357,6 +358,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
357
358
|
this.parent.on(events.destroy, this.destroy, this);
|
|
358
359
|
this.parent.on(events.keyDown, this.onKeyDown, this);
|
|
359
360
|
this.parent.on(events.rtlMode, this.setRtl, this);
|
|
361
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
360
362
|
};
|
|
361
363
|
QuickToolbar.prototype.onKeyDown = function (e) {
|
|
362
364
|
var args = e.args;
|
|
@@ -370,6 +372,24 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
370
372
|
this.hideQuickToolbars();
|
|
371
373
|
this.hideInlineQTBar();
|
|
372
374
|
};
|
|
375
|
+
QuickToolbar.prototype.updateCss = function (baseQTObj, e) {
|
|
376
|
+
if (baseQTObj && e.cssClass) {
|
|
377
|
+
if (isNullOrUndefined(e.oldCssClass && baseQTObj.quickTBarObj.toolbarObj.cssClass !== e.cssClass)) {
|
|
378
|
+
baseQTObj.quickTBarObj.toolbarObj.setProperties({ cssClass: (baseQTObj.quickTBarObj.toolbarObj.cssClass + ' ' + e.cssClass).trim() });
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
baseQTObj.quickTBarObj.toolbarObj.setProperties({ cssClass: (baseQTObj.quickTBarObj.toolbarObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
QuickToolbar.prototype.setCssClass = function (e) {
|
|
386
|
+
var baseQuickToolbarObj = [
|
|
387
|
+
this.inlineQTBar, this.imageQTBar, this.linkQTBar, this.textQTBar, this.tableQTBar
|
|
388
|
+
];
|
|
389
|
+
for (var i = 0; i < baseQuickToolbarObj.length; i++) {
|
|
390
|
+
this.updateCss(baseQuickToolbarObj[i], e);
|
|
391
|
+
}
|
|
392
|
+
};
|
|
373
393
|
QuickToolbar.prototype.setRtl = function (args) {
|
|
374
394
|
if (this.inlineQTBar) {
|
|
375
395
|
this.inlineQTBar.quickTBarObj.toolbarObj.setProperties({ enableRtl: args.enableRtl });
|
|
@@ -378,7 +398,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
378
398
|
this.imageQTBar.quickTBarObj.toolbarObj.setProperties({ enableRtl: args.enableRtl });
|
|
379
399
|
}
|
|
380
400
|
if (this.linkQTBar) {
|
|
381
|
-
this.
|
|
401
|
+
this.linkQTBar.quickTBarObj.toolbarObj.setProperties({ enableRtl: args.enableRtl });
|
|
382
402
|
}
|
|
383
403
|
};
|
|
384
404
|
/**
|
|
@@ -407,6 +427,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
407
427
|
this.parent.off(events.iframeMouseDown, this.onIframeMouseDown);
|
|
408
428
|
this.parent.off(events.keyDown, this.onKeyDown);
|
|
409
429
|
this.parent.off(events.rtlMode, this.setRtl);
|
|
430
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
410
431
|
};
|
|
411
432
|
/**
|
|
412
433
|
* Called internally if any of the property value changed.
|
|
@@ -161,6 +161,7 @@ export declare class Toolbar {
|
|
|
161
161
|
protected unWireEvents(): void;
|
|
162
162
|
protected addEventListener(): void;
|
|
163
163
|
protected removeEventListener(): void;
|
|
164
|
+
private setCssClass;
|
|
164
165
|
private onRefresh;
|
|
165
166
|
/**
|
|
166
167
|
* Called internally if any of the property value changed.
|
|
@@ -593,6 +593,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
593
593
|
this.parent.on(events.focusChange, this.focusChangeHandler, this);
|
|
594
594
|
this.parent.on(events.mouseDown, this.mouseDownHandler, this);
|
|
595
595
|
this.parent.on(events.sourceCodeMouseDown, this.mouseDownHandler, this);
|
|
596
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
596
597
|
if (!this.parent.inlineMode.enable && !isIDevice()) {
|
|
597
598
|
this.parent.on(events.toolbarClick, this.toolbarClickHandler, this);
|
|
598
599
|
}
|
|
@@ -616,10 +617,21 @@ var Toolbar = /** @class */ (function () {
|
|
|
616
617
|
this.parent.off(events.focusChange, this.focusChangeHandler);
|
|
617
618
|
this.parent.off(events.mouseDown, this.mouseDownHandler);
|
|
618
619
|
this.parent.off(events.sourceCodeMouseDown, this.mouseDownHandler);
|
|
620
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
619
621
|
if (!this.parent.inlineMode.enable && !isIDevice()) {
|
|
620
622
|
this.parent.off(events.toolbarClick, this.toolbarClickHandler);
|
|
621
623
|
}
|
|
622
624
|
};
|
|
625
|
+
Toolbar.prototype.setCssClass = function (e) {
|
|
626
|
+
if (this.toolbarObj && e.cssClass) {
|
|
627
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
628
|
+
this.toolbarObj.setProperties({ cssClass: (this.toolbarObj.cssClass + ' ' + e.cssClass).trim() });
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
this.toolbarObj.setProperties({ cssClass: (this.toolbarObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
};
|
|
623
635
|
Toolbar.prototype.onRefresh = function () {
|
|
624
636
|
this.refreshToolbarOverflow();
|
|
625
637
|
this.parent.setContentHeight('', true);
|
|
@@ -80,6 +80,7 @@ export interface IRichTextEditor extends Component<HTMLElement> {
|
|
|
80
80
|
enabled?: boolean;
|
|
81
81
|
readonly?: boolean;
|
|
82
82
|
placeholder?: string;
|
|
83
|
+
cssClass?: string;
|
|
83
84
|
valueContainer?: HTMLTextAreaElement;
|
|
84
85
|
editorMode?: EditorMode;
|
|
85
86
|
enableHtmlEncode?: boolean;
|
|
@@ -205,6 +206,13 @@ export interface NotifyArgs {
|
|
|
205
206
|
touchData?: ITouchData;
|
|
206
207
|
allowedStylePropertiesArray?: string[];
|
|
207
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Provides information about the current and previous cssClass property .
|
|
211
|
+
*/
|
|
212
|
+
export interface ICssClassArgs {
|
|
213
|
+
cssClass?: string;
|
|
214
|
+
oldCssClass?: string;
|
|
215
|
+
}
|
|
208
216
|
/**
|
|
209
217
|
|
|
210
218
|
*/
|
|
@@ -458,6 +466,7 @@ export interface IToolbarOptions {
|
|
|
458
466
|
rteToolbarObj: BaseToolbar;
|
|
459
467
|
enablePersistence: boolean;
|
|
460
468
|
overflowMode?: OverflowMode;
|
|
469
|
+
cssClass?: string;
|
|
461
470
|
}
|
|
462
471
|
/**
|
|
463
472
|
|
|
@@ -476,6 +485,7 @@ export interface IToolbarRenderOptions {
|
|
|
476
485
|
items?: (string | IToolbarItems)[];
|
|
477
486
|
mode?: OverflowMode;
|
|
478
487
|
container?: string;
|
|
488
|
+
cssClass?: string;
|
|
479
489
|
}
|
|
480
490
|
/**
|
|
481
491
|
|
|
@@ -645,6 +655,7 @@ export interface IQuickToolbarOptions {
|
|
|
645
655
|
mode: OverflowMode;
|
|
646
656
|
renderType: RenderType;
|
|
647
657
|
toolbarItems: (string | IToolbarItems)[];
|
|
658
|
+
cssClass: string;
|
|
648
659
|
}
|
|
649
660
|
/**
|
|
650
661
|
* Provides information about a BeforeQuickToolbarOpen event.
|
|
@@ -450,6 +450,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
450
450
|
}
|
|
451
451
|
// eslint-disable-next-line
|
|
452
452
|
(!this.enabled) ? this.unWireEvents() : this.eventInitializer();
|
|
453
|
+
this.notify(events.bindCssClass, { cssClass: this.cssClass });
|
|
453
454
|
this.renderComplete();
|
|
454
455
|
};
|
|
455
456
|
/**
|
|
@@ -1032,6 +1033,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1032
1033
|
case 'cssClass':
|
|
1033
1034
|
this.element.classList.remove(oldProp[prop]);
|
|
1034
1035
|
this.setCssClass(newProp[prop]);
|
|
1036
|
+
this.notify(events.bindCssClass, { cssClass: newProp[prop], oldCssClass: oldProp[prop] });
|
|
1035
1037
|
break;
|
|
1036
1038
|
case 'enabled':
|
|
1037
1039
|
this.setEnable();
|
|
@@ -66,7 +66,8 @@ var ContentRender = /** @class */ (function () {
|
|
|
66
66
|
* @returns {string} - specifies the string element.
|
|
67
67
|
*/
|
|
68
68
|
ContentRender.prototype.getText = function () {
|
|
69
|
-
|
|
69
|
+
var textString = this.getEditPanel().innerText;
|
|
70
|
+
return textString === '\n' ? '' : textString;
|
|
70
71
|
};
|
|
71
72
|
/**
|
|
72
73
|
* Set the content div element of RichTextEditor
|
|
@@ -14,6 +14,9 @@ export declare class Image {
|
|
|
14
14
|
private inputUrl;
|
|
15
15
|
private captionEle;
|
|
16
16
|
private checkBoxObj;
|
|
17
|
+
private widthNum;
|
|
18
|
+
private heightNum;
|
|
19
|
+
private browseButton;
|
|
17
20
|
private uploadUrl;
|
|
18
21
|
private contentModule;
|
|
19
22
|
private rendererFactory;
|
|
@@ -37,6 +40,8 @@ export declare class Image {
|
|
|
37
40
|
private constructor();
|
|
38
41
|
protected addEventListener(): void;
|
|
39
42
|
protected removeEventListener(): void;
|
|
43
|
+
private updateCss;
|
|
44
|
+
private setCssClass;
|
|
40
45
|
private onIframeMouseDown;
|
|
41
46
|
private afterRender;
|
|
42
47
|
private undoStack;
|
|
@@ -49,6 +49,7 @@ var Image = /** @class */ (function () {
|
|
|
49
49
|
this.parent.on(events.initialEnd, this.afterRender, this);
|
|
50
50
|
this.parent.on(events.dynamicModule, this.afterRender, this);
|
|
51
51
|
this.parent.on(events.paste, this.imagePaste, this);
|
|
52
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
52
53
|
this.parent.on(events.destroy, this.removeEventListener, this);
|
|
53
54
|
};
|
|
54
55
|
Image.prototype.removeEventListener = function () {
|
|
@@ -75,6 +76,7 @@ var Image = /** @class */ (function () {
|
|
|
75
76
|
this.parent.off(events.initialEnd, this.afterRender);
|
|
76
77
|
this.parent.off(events.dynamicModule, this.afterRender);
|
|
77
78
|
this.parent.off(events.paste, this.imagePaste);
|
|
79
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
78
80
|
this.parent.off(events.destroy, this.removeEventListener);
|
|
79
81
|
var dropElement = this.parent.iframeSettings.enable ? this.parent.inputElement.ownerDocument
|
|
80
82
|
: this.parent.inputElement;
|
|
@@ -92,6 +94,32 @@ var Image = /** @class */ (function () {
|
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
96
|
};
|
|
97
|
+
Image.prototype.updateCss = function (currentObj, e) {
|
|
98
|
+
if (currentObj && e.cssClass) {
|
|
99
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
100
|
+
currentObj.setProperties({ cssClass: (currentObj.cssClass + ' ' + e.cssClass).trim() });
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
currentObj.setProperties({ cssClass: (currentObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
Image.prototype.setCssClass = function (e) {
|
|
108
|
+
if (this.popupObj && e.cssClass) {
|
|
109
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
110
|
+
addClass([this.popupObj.element], e.cssClass);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
removeClass([this.popupObj.element], e.oldCssClass);
|
|
114
|
+
addClass([this.popupObj.element], e.cssClass);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
this.updateCss(this.checkBoxObj, e);
|
|
118
|
+
this.updateCss(this.widthNum, e);
|
|
119
|
+
this.updateCss(this.heightNum, e);
|
|
120
|
+
this.updateCss(this.uploadObj, e);
|
|
121
|
+
this.updateCss(this.dialogObj, e);
|
|
122
|
+
};
|
|
95
123
|
Image.prototype.onIframeMouseDown = function () {
|
|
96
124
|
if (this.dialogObj) {
|
|
97
125
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -695,6 +723,7 @@ var Image = /** @class */ (function () {
|
|
|
695
723
|
};
|
|
696
724
|
Image.prototype.showDialog = function () {
|
|
697
725
|
this.openDialog(false);
|
|
726
|
+
this.setCssClass({ cssClass: this.parent.cssClass });
|
|
698
727
|
};
|
|
699
728
|
Image.prototype.closeDialog = function () {
|
|
700
729
|
if (this.dialogObj) {
|
|
@@ -914,7 +943,8 @@ var Image = /** @class */ (function () {
|
|
|
914
943
|
var inputLink = linkWrap.querySelector('.e-img-link');
|
|
915
944
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
916
945
|
this.checkBoxObj = new CheckBox({
|
|
917
|
-
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
946
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.cssClass,
|
|
947
|
+
change: function (e) {
|
|
918
948
|
if (e.checked) {
|
|
919
949
|
target_1 = '_blank';
|
|
920
950
|
}
|
|
@@ -949,6 +979,9 @@ var Image = /** @class */ (function () {
|
|
|
949
979
|
}
|
|
950
980
|
}]
|
|
951
981
|
});
|
|
982
|
+
if (!isNOU(this.parent.cssClass)) {
|
|
983
|
+
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
984
|
+
}
|
|
952
985
|
if (!isNullOrUndefined(inputDetails)) {
|
|
953
986
|
inputLink.value = inputDetails.url;
|
|
954
987
|
// eslint-disable-next-line
|
|
@@ -994,6 +1027,9 @@ var Image = /** @class */ (function () {
|
|
|
994
1027
|
}
|
|
995
1028
|
}]
|
|
996
1029
|
});
|
|
1030
|
+
if (!isNOU(this.parent.cssClass)) {
|
|
1031
|
+
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
1032
|
+
}
|
|
997
1033
|
this.dialogObj.element.style.maxHeight = 'inherit';
|
|
998
1034
|
this.dialogObj.content.querySelector('input').focus();
|
|
999
1035
|
}
|
|
@@ -1214,6 +1250,9 @@ var Image = /** @class */ (function () {
|
|
|
1214
1250
|
}
|
|
1215
1251
|
}]
|
|
1216
1252
|
});
|
|
1253
|
+
if (!isNOU(this.parent.cssClass)) {
|
|
1254
|
+
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
1255
|
+
}
|
|
1217
1256
|
this.dialogObj.element.style.maxHeight = 'inherit';
|
|
1218
1257
|
this.dialogObj.content.querySelector('input').focus();
|
|
1219
1258
|
}
|
|
@@ -1491,24 +1530,26 @@ var Image = /** @class */ (function () {
|
|
|
1491
1530
|
+ ' /></div>';
|
|
1492
1531
|
var contentElem = parseHtml(content);
|
|
1493
1532
|
imgSizeWrap.appendChild(contentElem);
|
|
1494
|
-
|
|
1533
|
+
this.widthNum = new TextBox({
|
|
1495
1534
|
value: formatUnit(widthVal),
|
|
1496
1535
|
enableRtl: this.parent.enableRtl,
|
|
1536
|
+
cssClass: this.parent.cssClass,
|
|
1497
1537
|
input: function (e) {
|
|
1498
1538
|
_this.inputWidthValue = formatUnit(_this.inputValue(e.value));
|
|
1499
1539
|
}
|
|
1500
1540
|
});
|
|
1501
|
-
widthNum.createElement = this.parent.createElement;
|
|
1502
|
-
widthNum.appendTo(imgSizeWrap.querySelector('#imgwidth'));
|
|
1503
|
-
|
|
1541
|
+
this.widthNum.createElement = this.parent.createElement;
|
|
1542
|
+
this.widthNum.appendTo(imgSizeWrap.querySelector('#imgwidth'));
|
|
1543
|
+
this.heightNum = new TextBox({
|
|
1504
1544
|
value: formatUnit(heightVal),
|
|
1505
1545
|
enableRtl: this.parent.enableRtl,
|
|
1546
|
+
cssClass: this.parent.cssClass,
|
|
1506
1547
|
input: function (e) {
|
|
1507
1548
|
_this.inputHeightValue = formatUnit(_this.inputValue(e.value));
|
|
1508
1549
|
}
|
|
1509
1550
|
});
|
|
1510
|
-
heightNum.createElement = this.parent.createElement;
|
|
1511
|
-
heightNum.appendTo(imgSizeWrap.querySelector('#imgheight'));
|
|
1551
|
+
this.heightNum.createElement = this.parent.createElement;
|
|
1552
|
+
this.heightNum.appendTo(imgSizeWrap.querySelector('#imgheight'));
|
|
1512
1553
|
return imgSizeWrap;
|
|
1513
1554
|
};
|
|
1514
1555
|
Image.prototype.inputValue = function (value) {
|
|
@@ -1588,10 +1629,10 @@ var Image = /** @class */ (function () {
|
|
|
1588
1629
|
span.appendChild(btnEle);
|
|
1589
1630
|
uploadParentEle.appendChild(span);
|
|
1590
1631
|
var browserMsg = this.i10n.getConstant('browse');
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1632
|
+
this.browseButton = new Button({ content: browserMsg, enableRtl: this.parent.enableRtl });
|
|
1633
|
+
this.browseButton.isStringTemplate = true;
|
|
1634
|
+
this.browseButton.createElement = this.parent.createElement;
|
|
1635
|
+
this.browseButton.appendTo(btnEle);
|
|
1595
1636
|
var btnClick = (Browser.isDevice) ? span : btnEle;
|
|
1596
1637
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
1597
1638
|
var uploadEle = this.parent.createElement('input', {
|
|
@@ -1605,7 +1646,7 @@ var Image = /** @class */ (function () {
|
|
|
1605
1646
|
var beforeUploadArgs;
|
|
1606
1647
|
this.uploadObj = new Uploader({
|
|
1607
1648
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
1608
|
-
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl,
|
|
1649
|
+
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.cssClass,
|
|
1609
1650
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
1610
1651
|
selected: function (e) {
|
|
1611
1652
|
proxy.isImgUploaded = true;
|
|
@@ -1986,6 +2027,9 @@ var Image = /** @class */ (function () {
|
|
|
1986
2027
|
this.popupObj.element.style.display = 'none';
|
|
1987
2028
|
addClass([this.popupObj.element], classes.CLS_POPUP_OPEN);
|
|
1988
2029
|
addClass([this.popupObj.element], classes.CLS_RTE_UPLOAD_POPUP);
|
|
2030
|
+
if (!isNOU(this.parent.cssClass)) {
|
|
2031
|
+
addClass([this.popupObj.element], this.parent.cssClass);
|
|
2032
|
+
}
|
|
1989
2033
|
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
1990
2034
|
var timeOut = dragEvent.dataTransfer.files[0].size > 1000000 ? 300 : 100;
|
|
1991
2035
|
setTimeout(function () {
|
|
@@ -1998,7 +2042,7 @@ var Image = /** @class */ (function () {
|
|
|
1998
2042
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
1999
2043
|
removeUrl: this.parent.insertImageSettings.removeUrl
|
|
2000
2044
|
},
|
|
2001
|
-
cssClass: classes.CLS_RTE_DIALOG_UPLOAD,
|
|
2045
|
+
cssClass: classes.CLS_RTE_DIALOG_UPLOAD + ' ' + this.parent.cssClass,
|
|
2002
2046
|
dropArea: this.parent.element,
|
|
2003
2047
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
2004
2048
|
removing: function () {
|
|
@@ -19,6 +19,8 @@ export declare class Link {
|
|
|
19
19
|
private onToolbarAction;
|
|
20
20
|
protected removeEventListener(): void;
|
|
21
21
|
private onIframeMouseDown;
|
|
22
|
+
private updateCss;
|
|
23
|
+
private setCssClass;
|
|
22
24
|
private showLinkQuickToolbar;
|
|
23
25
|
private hideLinkQuickToolbar;
|
|
24
26
|
private editAreaClickHandler;
|
|
@@ -35,6 +35,7 @@ var Link = /** @class */ (function () {
|
|
|
35
35
|
this.parent.on(events.editLink, this.editLink, this);
|
|
36
36
|
this.parent.on(events.openLink, this.openLink, this);
|
|
37
37
|
this.parent.on(events.editAreaClick, this.editAreaClickHandler, this);
|
|
38
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
38
39
|
this.parent.on(events.destroy, this.destroy, this);
|
|
39
40
|
};
|
|
40
41
|
Link.prototype.onToolbarAction = function (args) {
|
|
@@ -67,6 +68,7 @@ var Link = /** @class */ (function () {
|
|
|
67
68
|
this.parent.off(events.editLink, this.editLink);
|
|
68
69
|
this.parent.off(events.openLink, this.openLink);
|
|
69
70
|
this.parent.off(events.editAreaClick, this.editAreaClickHandler);
|
|
71
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
70
72
|
this.parent.off(events.destroy, this.destroy);
|
|
71
73
|
};
|
|
72
74
|
Link.prototype.onIframeMouseDown = function () {
|
|
@@ -74,6 +76,20 @@ var Link = /** @class */ (function () {
|
|
|
74
76
|
this.dialogObj.hide({ returnValue: true });
|
|
75
77
|
}
|
|
76
78
|
};
|
|
79
|
+
Link.prototype.updateCss = function (currentObj, e) {
|
|
80
|
+
if (currentObj && e.cssClass) {
|
|
81
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
82
|
+
currentObj.setProperties({ cssClass: (currentObj.cssClass + ' ' + e.cssClass).trim() });
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
currentObj.setProperties({ cssClass: (currentObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
Link.prototype.setCssClass = function (e) {
|
|
90
|
+
this.updateCss(this.checkBoxObj, e);
|
|
91
|
+
this.updateCss(this.dialogObj, e);
|
|
92
|
+
};
|
|
77
93
|
Link.prototype.showLinkQuickToolbar = function (e) {
|
|
78
94
|
if (!isNullOrUndefined(e.args) && e.args.action !== 'enter' &&
|
|
79
95
|
e.args.action !== 'space') {
|
|
@@ -202,6 +218,7 @@ var Link = /** @class */ (function () {
|
|
|
202
218
|
};
|
|
203
219
|
Link.prototype.showDialog = function () {
|
|
204
220
|
this.openDialog(false);
|
|
221
|
+
this.setCssClass({ cssClass: this.parent.cssClass });
|
|
205
222
|
};
|
|
206
223
|
Link.prototype.closeDialog = function () {
|
|
207
224
|
if (this.dialogObj) {
|
|
@@ -257,7 +274,7 @@ var Link = /** @class */ (function () {
|
|
|
257
274
|
var linkText = linkContent.querySelector('.e-rte-linkText');
|
|
258
275
|
var linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
259
276
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
260
|
-
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl });
|
|
277
|
+
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.cssClass });
|
|
261
278
|
this.checkBoxObj.isStringTemplate = true;
|
|
262
279
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
263
280
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -270,7 +287,7 @@ var Link = /** @class */ (function () {
|
|
|
270
287
|
var dialogModel = {
|
|
271
288
|
header: this.i10n.getConstant('linkHeader'),
|
|
272
289
|
content: linkContent,
|
|
273
|
-
cssClass: CLS_RTE_ELEMENTS,
|
|
290
|
+
cssClass: CLS_RTE_ELEMENTS + ' ' + this.parent.cssClass,
|
|
274
291
|
enableRtl: this.parent.enableRtl,
|
|
275
292
|
locale: this.parent.locale,
|
|
276
293
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px', height: 'inherit',
|
|
@@ -11,6 +11,7 @@ export declare class Table {
|
|
|
11
11
|
private tblHeader;
|
|
12
12
|
popupObj: Popup;
|
|
13
13
|
editdlgObj: Dialog;
|
|
14
|
+
private createTableButton;
|
|
14
15
|
private contentModule;
|
|
15
16
|
private rendererFactory;
|
|
16
17
|
private quickToolObj;
|
|
@@ -23,6 +24,9 @@ export declare class Table {
|
|
|
23
24
|
private columnEle;
|
|
24
25
|
private rowTextBox;
|
|
25
26
|
private columnTextBox;
|
|
27
|
+
private tableWidthNum;
|
|
28
|
+
private tableCellPadding;
|
|
29
|
+
private tableCellSpacing;
|
|
26
30
|
private rowEle;
|
|
27
31
|
private l10n;
|
|
28
32
|
private moveEle;
|
|
@@ -31,6 +35,8 @@ export declare class Table {
|
|
|
31
35
|
private constructor();
|
|
32
36
|
protected addEventListener(): void;
|
|
33
37
|
protected removeEventListener(): void;
|
|
38
|
+
private updateCss;
|
|
39
|
+
private setCssClass;
|
|
34
40
|
private selectionTable;
|
|
35
41
|
private afterRender;
|
|
36
42
|
private dropdownSelect;
|
|
@@ -39,6 +39,7 @@ var Table = /** @class */ (function () {
|
|
|
39
39
|
this.parent.on(events.dropDownSelect, this.dropdownSelect, this);
|
|
40
40
|
this.parent.on(events.keyDown, this.keyDown, this);
|
|
41
41
|
this.parent.on(events.mouseUp, this.selectionTable, this);
|
|
42
|
+
this.parent.on(events.bindCssClass, this.setCssClass, this);
|
|
42
43
|
this.parent.on(events.destroy, this.destroy, this);
|
|
43
44
|
};
|
|
44
45
|
Table.prototype.removeEventListener = function () {
|
|
@@ -59,8 +60,38 @@ var Table = /** @class */ (function () {
|
|
|
59
60
|
this.parent.off(events.tableColorPickerChanged, this.setBGColor);
|
|
60
61
|
this.parent.off(events.keyDown, this.keyDown);
|
|
61
62
|
this.parent.off(events.mouseUp, this.selectionTable);
|
|
63
|
+
this.parent.off(events.bindCssClass, this.setCssClass);
|
|
62
64
|
this.parent.off(events.destroy, this.destroy);
|
|
63
65
|
};
|
|
66
|
+
Table.prototype.updateCss = function (currentObj, e) {
|
|
67
|
+
if (currentObj && e.cssClass) {
|
|
68
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
69
|
+
currentObj.setProperties({ cssClass: (currentObj.cssClass + ' ' + e.cssClass).trim() });
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
currentObj.setProperties({ cssClass: (currentObj.cssClass.replace(e.oldCssClass, '').trim() + ' ' + e.cssClass).trim() });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
Table.prototype.setCssClass = function (e) {
|
|
77
|
+
if (this.popupObj && e.cssClass) {
|
|
78
|
+
if (isNullOrUndefined(e.oldCssClass)) {
|
|
79
|
+
addClass([this.popupObj.element], e.cssClass);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
removeClass([this.popupObj.element], e.oldCssClass);
|
|
83
|
+
addClass([this.popupObj.element], e.cssClass);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
this.updateCss(this.createTableButton, e);
|
|
87
|
+
this.updateCss(this.editdlgObj, e);
|
|
88
|
+
var numericTextBoxObj = [
|
|
89
|
+
this.columnTextBox, this.rowTextBox, this.tableWidthNum, this.tableCellPadding, this.tableCellSpacing
|
|
90
|
+
];
|
|
91
|
+
for (var i = 0; i < numericTextBoxObj.length; i++) {
|
|
92
|
+
this.updateCss(numericTextBoxObj[i], e);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
64
95
|
Table.prototype.selectionTable = function (e) {
|
|
65
96
|
var target = e.args.target;
|
|
66
97
|
if (Browser.info.name === 'mozilla' && !isNOU(closest(target, 'table')) && closest(target, 'table').tagName === 'TABLE') {
|
|
@@ -193,6 +224,7 @@ var Table = /** @class */ (function () {
|
|
|
193
224
|
};
|
|
194
225
|
Table.prototype.showDialog = function () {
|
|
195
226
|
this.openDialog(false);
|
|
227
|
+
this.setCssClass({ cssClass: this.parent.cssClass });
|
|
196
228
|
};
|
|
197
229
|
Table.prototype.closeDialog = function () {
|
|
198
230
|
if (this.editdlgObj) {
|
|
@@ -914,12 +946,12 @@ var Table = /** @class */ (function () {
|
|
|
914
946
|
this.parent.getToolbarElement().querySelector('.e-expended-nav').setAttribute('tabindex', '1');
|
|
915
947
|
}
|
|
916
948
|
this.dlgDiv.appendChild(btnEle);
|
|
917
|
-
|
|
918
|
-
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat',
|
|
949
|
+
this.createTableButton = new Button({
|
|
950
|
+
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' + ' ' + this.parent.cssClass,
|
|
919
951
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
920
952
|
});
|
|
921
|
-
|
|
922
|
-
|
|
953
|
+
this.createTableButton.isStringTemplate = true;
|
|
954
|
+
this.createTableButton.appendTo(btnEle);
|
|
923
955
|
EventHandler.add(btnEle, 'click', this.insertTableDialog, { self: this, args: args.args, selection: args.selection });
|
|
924
956
|
this.parent.getToolbar().appendChild(this.dlgDiv);
|
|
925
957
|
var target = args.args.originalEvent.target;
|
|
@@ -942,6 +974,9 @@ var Table = /** @class */ (function () {
|
|
|
942
974
|
}
|
|
943
975
|
});
|
|
944
976
|
addClass([this.popupObj.element], 'e-popup-open');
|
|
977
|
+
if (!isNOU(this.parent.cssClass)) {
|
|
978
|
+
addClass([this.popupObj.element], this.parent.cssClass);
|
|
979
|
+
}
|
|
945
980
|
this.popupObj.refreshPosition(target);
|
|
946
981
|
};
|
|
947
982
|
Table.prototype.docClick = function (e) {
|
|
@@ -1014,7 +1049,8 @@ var Table = /** @class */ (function () {
|
|
|
1014
1049
|
_this.cancelDialog(e);
|
|
1015
1050
|
},
|
|
1016
1051
|
buttonModel: { cssClass: 'e-flat e-cancel', content: cancel }
|
|
1017
|
-
}]
|
|
1052
|
+
}],
|
|
1053
|
+
cssClass: this.parent.cssClass
|
|
1018
1054
|
});
|
|
1019
1055
|
this.editdlgObj.element.style.maxHeight = 'none';
|
|
1020
1056
|
this.editdlgObj.content.querySelector('input').focus();
|
|
@@ -1045,6 +1081,9 @@ var Table = /** @class */ (function () {
|
|
|
1045
1081
|
buttonModel: { cssClass: 'e-flat e-cancel', content: cancel }
|
|
1046
1082
|
}]
|
|
1047
1083
|
});
|
|
1084
|
+
if (!isNOU(proxy.parent.cssClass)) {
|
|
1085
|
+
proxy.editdlgObj.setProperties({ cssClass: proxy.parent.cssClass });
|
|
1086
|
+
}
|
|
1048
1087
|
proxy.editdlgObj.element.style.maxHeight = 'none';
|
|
1049
1088
|
proxy.editdlgObj.content.querySelector('input').focus();
|
|
1050
1089
|
};
|
|
@@ -1064,7 +1103,8 @@ var Table = /** @class */ (function () {
|
|
|
1064
1103
|
placeholder: tableColumn,
|
|
1065
1104
|
floatLabelType: 'Auto',
|
|
1066
1105
|
max: 50,
|
|
1067
|
-
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
1106
|
+
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1107
|
+
cssClass: this.parent.cssClass
|
|
1068
1108
|
});
|
|
1069
1109
|
this.columnTextBox.isStringTemplate = true;
|
|
1070
1110
|
this.columnTextBox.appendTo(tableWrap.querySelector('#tableColumn'));
|
|
@@ -1075,7 +1115,8 @@ var Table = /** @class */ (function () {
|
|
|
1075
1115
|
placeholder: tableRow,
|
|
1076
1116
|
floatLabelType: 'Auto',
|
|
1077
1117
|
max: 50,
|
|
1078
|
-
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
1118
|
+
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1119
|
+
cssClass: this.parent.cssClass
|
|
1079
1120
|
});
|
|
1080
1121
|
this.rowTextBox.isStringTemplate = true;
|
|
1081
1122
|
this.rowTextBox.appendTo(tableWrap.querySelector('#tableRow'));
|
|
@@ -1104,7 +1145,7 @@ var Table = /** @class */ (function () {
|
|
|
1104
1145
|
var header = this.l10n.getConstant('tabledialogHeader');
|
|
1105
1146
|
var dialogModel = {
|
|
1106
1147
|
header: header,
|
|
1107
|
-
cssClass: classes.CLS_RTE_ELEMENTS,
|
|
1148
|
+
cssClass: classes.CLS_RTE_ELEMENTS + ' ' + this.parent.cssClass,
|
|
1108
1149
|
enableRtl: this.parent.enableRtl,
|
|
1109
1150
|
locale: this.parent.locale,
|
|
1110
1151
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'initial',
|
|
@@ -1194,7 +1235,7 @@ var Table = /** @class */ (function () {
|
|
|
1194
1235
|
+ ' </div><div class="e-rte-field"><input type="text" data-role ="none" id="cellSpacing" class="e-cell-spacing" /></div>';
|
|
1195
1236
|
var contentElem = parseHtml(content);
|
|
1196
1237
|
tableWrap.appendChild(contentElem);
|
|
1197
|
-
|
|
1238
|
+
this.tableWidthNum = new NumericTextBox({
|
|
1198
1239
|
format: 'n0',
|
|
1199
1240
|
min: 0,
|
|
1200
1241
|
value: widthVal,
|
|
@@ -1202,9 +1243,9 @@ var Table = /** @class */ (function () {
|
|
|
1202
1243
|
floatLabelType: 'Auto',
|
|
1203
1244
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
1204
1245
|
});
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1246
|
+
this.tableWidthNum.isStringTemplate = true;
|
|
1247
|
+
this.tableWidthNum.appendTo(tableWrap.querySelector('#tableWidth'));
|
|
1248
|
+
this.tableCellPadding = new NumericTextBox({
|
|
1208
1249
|
format: 'n0',
|
|
1209
1250
|
min: 0,
|
|
1210
1251
|
// eslint-disable-next-line
|
|
@@ -1213,9 +1254,9 @@ var Table = /** @class */ (function () {
|
|
|
1213
1254
|
floatLabelType: 'Auto',
|
|
1214
1255
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
1215
1256
|
});
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1257
|
+
this.tableCellPadding.isStringTemplate = true;
|
|
1258
|
+
this.tableCellPadding.appendTo(tableWrap.querySelector('#cellPadding'));
|
|
1259
|
+
this.tableCellSpacing = new NumericTextBox({
|
|
1219
1260
|
format: 'n0',
|
|
1220
1261
|
min: 0,
|
|
1221
1262
|
// eslint-disable-next-line
|
|
@@ -1224,8 +1265,8 @@ var Table = /** @class */ (function () {
|
|
|
1224
1265
|
floatLabelType: 'Auto',
|
|
1225
1266
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
1226
1267
|
});
|
|
1227
|
-
|
|
1228
|
-
|
|
1268
|
+
this.tableCellSpacing.isStringTemplate = true;
|
|
1269
|
+
this.tableCellSpacing.appendTo(tableWrap.querySelector('#cellSpacing'));
|
|
1229
1270
|
return tableWrap;
|
|
1230
1271
|
};
|
|
1231
1272
|
/**
|
|
@@ -115,7 +115,8 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
115
115
|
created: this.toolbarCreated.bind(this),
|
|
116
116
|
clicked: this.toolbarClicked.bind(this),
|
|
117
117
|
enablePersistence: args.enablePersistence,
|
|
118
|
-
enableRtl: args.enableRtl
|
|
118
|
+
enableRtl: args.enableRtl,
|
|
119
|
+
cssClass: args.cssClass
|
|
119
120
|
});
|
|
120
121
|
args.rteToolbarObj.toolbarObj.isStringTemplate = true;
|
|
121
122
|
args.rteToolbarObj.toolbarObj.createElement = this.parent.createElement;
|