@syncfusion/ej2-richtexteditor 20.1.60 → 20.2.38
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 +30 -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 +439 -181
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +431 -172
- 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/helpers/e2e/index.js +8 -6
- package/helpers/e2e/rte-helper.js +80 -64
- package/package.json +12 -12
- package/src/common/util.js +7 -8
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +25 -3
- package/src/editor-manager/plugin/lists.js +14 -4
- package/src/editor-manager/plugin/ms-word-clean-up.js +1 -1
- package/src/markdown-parser/base/constant.d.ts +6 -0
- package/src/markdown-parser/base/constant.js +6 -0
- package/src/markdown-parser/base/markdown-parser.d.ts +2 -0
- package/src/markdown-parser/base/markdown-parser.js +6 -0
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/insert-text.d.ts +22 -0
- package/src/markdown-parser/plugin/insert-text.js +51 -0
- package/src/rich-text-editor/actions/color-picker.js +20 -4
- package/src/rich-text-editor/actions/full-screen.js +4 -2
- package/src/rich-text-editor/actions/resize.js +4 -3
- package/src/rich-text-editor/actions/toolbar.js +4 -2
- package/src/rich-text-editor/base/classes.d.ts +5 -0
- package/src/rich-text-editor/base/classes.js +5 -0
- package/src/rich-text-editor/base/constant.d.ts +40 -0
- package/src/rich-text-editor/base/constant.js +41 -1
- package/src/rich-text-editor/base/interface.d.ts +2 -0
- package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
- package/src/rich-text-editor/base/rich-text-editor.js +32 -25
- package/src/rich-text-editor/base/util.js +3 -3
- package/src/rich-text-editor/formatter/formatter.js +1 -1
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +44 -40
- package/src/rich-text-editor/renderer/link-module.js +16 -14
- package/src/rich-text-editor/renderer/markdown-renderer.js +2 -1
- package/src/rich-text-editor/renderer/table-module.d.ts +3 -0
- package/src/rich-text-editor/renderer/table-module.js +133 -56
- package/src/rich-text-editor/renderer/toolbar-renderer.js +11 -1
- package/src/rich-text-editor/renderer/view-source.js +1 -1
- package/styles/bootstrap-dark.css +49 -0
- package/styles/bootstrap.css +49 -0
- package/styles/bootstrap4.css +49 -0
- package/styles/bootstrap5-dark.css +49 -0
- package/styles/bootstrap5.css +49 -0
- package/styles/fabric-dark.css +49 -0
- package/styles/fabric.css +49 -0
- package/styles/fluent-dark.css +50 -0
- package/styles/fluent.css +50 -0
- package/styles/highcontrast-light.css +49 -0
- package/styles/highcontrast.css +49 -0
- package/styles/material-dark.css +49 -0
- package/styles/material.css +49 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +17 -16
- package/styles/rich-text-editor/_bootstrap-definition.scss +17 -16
- package/styles/rich-text-editor/_bootstrap4-definition.scss +17 -16
- package/styles/rich-text-editor/_bootstrap5-definition.scss +17 -16
- package/styles/rich-text-editor/_fabric-dark-definition.scss +17 -16
- package/styles/rich-text-editor/_fabric-definition.scss +17 -16
- package/styles/rich-text-editor/_fluent-definition.scss +18 -16
- package/styles/rich-text-editor/_fusionnew-definition.scss +190 -0
- package/styles/rich-text-editor/_highcontrast-definition.scss +17 -16
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +17 -16
- package/styles/rich-text-editor/_layout.scss +59 -0
- package/styles/rich-text-editor/_material-dark-definition.scss +17 -16
- package/styles/rich-text-editor/_material-definition.scss +17 -16
- package/styles/rich-text-editor/_material3-definition.scss +190 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +17 -16
- package/styles/rich-text-editor/bootstrap-dark.css +49 -0
- package/styles/rich-text-editor/bootstrap.css +49 -0
- package/styles/rich-text-editor/bootstrap4.css +49 -0
- package/styles/rich-text-editor/bootstrap5-dark.css +49 -0
- package/styles/rich-text-editor/bootstrap5.css +49 -0
- package/styles/rich-text-editor/fabric-dark.css +49 -0
- package/styles/rich-text-editor/fabric.css +49 -0
- package/styles/rich-text-editor/fluent-dark.css +50 -0
- package/styles/rich-text-editor/fluent.css +50 -0
- package/styles/rich-text-editor/highcontrast-light.css +49 -0
- package/styles/rich-text-editor/highcontrast.css +49 -0
- package/styles/rich-text-editor/icons/_fusionnew.scss +303 -0
- package/styles/rich-text-editor/icons/_material3.scss +303 -0
- package/styles/rich-text-editor/material-dark.css +49 -0
- package/styles/rich-text-editor/material.css +49 -0
- package/styles/rich-text-editor/tailwind-dark.css +49 -0
- package/styles/rich-text-editor/tailwind.css +49 -0
- package/styles/tailwind-dark.css +49 -0
- package/styles/tailwind.css +49 -0
|
@@ -105,7 +105,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
105
105
|
container: ((this.parent.inlineMode.enable) ? 'quick' : 'toolbar'),
|
|
106
106
|
items: this.parent.toolbarSettings.items,
|
|
107
107
|
mode: tBarMode,
|
|
108
|
-
target: ele
|
|
108
|
+
target: ele,
|
|
109
|
+
cssClass: this.parent.cssClass
|
|
109
110
|
});
|
|
110
111
|
if (this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
111
112
|
addClass([ele], ['e-rte-tb-mobile']);
|
|
@@ -222,7 +223,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
222
223
|
container: 'toolbar',
|
|
223
224
|
items: this.parent.toolbarSettings.items,
|
|
224
225
|
mode: this.getToolbarMode(),
|
|
225
|
-
target: this.tbElement
|
|
226
|
+
target: this.tbElement,
|
|
227
|
+
cssClass: this.parent.cssClass
|
|
226
228
|
});
|
|
227
229
|
if (!this.parent.inlineMode.enable) {
|
|
228
230
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
@@ -519,11 +519,41 @@ export declare const imageRemoving: string;
|
|
|
519
519
|
/**
|
|
520
520
|
* @hidden
|
|
521
521
|
|
|
522
|
+
*/
|
|
523
|
+
export declare const mediaSelected: string;
|
|
524
|
+
/**
|
|
525
|
+
* @hidden
|
|
526
|
+
|
|
527
|
+
*/
|
|
528
|
+
export declare const mediaUploading: string;
|
|
529
|
+
/**
|
|
530
|
+
* @hidden
|
|
531
|
+
|
|
532
|
+
*/
|
|
533
|
+
export declare const mediaUploadSuccess: string;
|
|
534
|
+
/**
|
|
535
|
+
* @hidden
|
|
536
|
+
|
|
537
|
+
*/
|
|
538
|
+
export declare const mediaUploadFailed: string;
|
|
539
|
+
/**
|
|
540
|
+
* @hidden
|
|
541
|
+
|
|
542
|
+
*/
|
|
543
|
+
export declare const mediaRemoving: string;
|
|
544
|
+
/**
|
|
545
|
+
* @hidden
|
|
546
|
+
|
|
522
547
|
*/
|
|
523
548
|
export declare const afterImageDelete: string;
|
|
524
549
|
/**
|
|
525
550
|
* @hidden
|
|
526
551
|
|
|
552
|
+
*/
|
|
553
|
+
export declare const afterMediaDelete: string;
|
|
554
|
+
/**
|
|
555
|
+
* @hidden
|
|
556
|
+
|
|
527
557
|
*/
|
|
528
558
|
export declare const drop: string;
|
|
529
559
|
/**
|
|
@@ -539,6 +569,11 @@ export declare const beforeImageUpload: string;
|
|
|
539
569
|
/**
|
|
540
570
|
* @hidden
|
|
541
571
|
|
|
572
|
+
*/
|
|
573
|
+
export declare const beforeMediaUpload: string;
|
|
574
|
+
/**
|
|
575
|
+
* @hidden
|
|
576
|
+
|
|
542
577
|
*/
|
|
543
578
|
export declare const resizeInitialized: string;
|
|
544
579
|
/**
|
|
@@ -594,6 +629,11 @@ export declare const closeImageDialog: string;
|
|
|
594
629
|
/**
|
|
595
630
|
* @hidden
|
|
596
631
|
|
|
632
|
+
*/
|
|
633
|
+
export declare const closeAudioDialog: string;
|
|
634
|
+
/**
|
|
635
|
+
* @hidden
|
|
636
|
+
|
|
597
637
|
*/
|
|
598
638
|
export declare const showTableDialog: string;
|
|
599
639
|
/**
|
|
@@ -519,11 +519,41 @@ export var imageRemoving = 'imageRemoving';
|
|
|
519
519
|
/**
|
|
520
520
|
* @hidden
|
|
521
521
|
|
|
522
|
+
*/
|
|
523
|
+
export var mediaSelected = 'mediaSelected';
|
|
524
|
+
/**
|
|
525
|
+
* @hidden
|
|
526
|
+
|
|
527
|
+
*/
|
|
528
|
+
export var mediaUploading = 'mediaUploading';
|
|
529
|
+
/**
|
|
530
|
+
* @hidden
|
|
531
|
+
|
|
532
|
+
*/
|
|
533
|
+
export var mediaUploadSuccess = 'mediaUploadSuccess';
|
|
534
|
+
/**
|
|
535
|
+
* @hidden
|
|
536
|
+
|
|
537
|
+
*/
|
|
538
|
+
export var mediaUploadFailed = 'mediaUploadFailed';
|
|
539
|
+
/**
|
|
540
|
+
* @hidden
|
|
541
|
+
|
|
542
|
+
*/
|
|
543
|
+
export var mediaRemoving = 'mediaRemoving';
|
|
544
|
+
/**
|
|
545
|
+
* @hidden
|
|
546
|
+
|
|
522
547
|
*/
|
|
523
548
|
export var afterImageDelete = 'afterImageDelete';
|
|
524
549
|
/**
|
|
525
550
|
* @hidden
|
|
526
551
|
|
|
552
|
+
*/
|
|
553
|
+
export var afterMediaDelete = 'afterMediaaDelete';
|
|
554
|
+
/**
|
|
555
|
+
* @hidden
|
|
556
|
+
|
|
527
557
|
*/
|
|
528
558
|
export var drop = 'drop';
|
|
529
559
|
/**
|
|
@@ -539,6 +569,11 @@ export var beforeImageUpload = 'beforeImageUpload';
|
|
|
539
569
|
/**
|
|
540
570
|
* @hidden
|
|
541
571
|
|
|
572
|
+
*/
|
|
573
|
+
export var beforeMediaUpload = 'beforeMediaUpload';
|
|
574
|
+
/**
|
|
575
|
+
* @hidden
|
|
576
|
+
|
|
542
577
|
*/
|
|
543
578
|
export var resizeInitialized = 'resizeInitialized';
|
|
544
579
|
/**
|
|
@@ -594,6 +629,11 @@ export var closeImageDialog = 'closeImageDialog';
|
|
|
594
629
|
/**
|
|
595
630
|
* @hidden
|
|
596
631
|
|
|
632
|
+
*/
|
|
633
|
+
export var closeAudioDialog = 'closeAudioDialog';
|
|
634
|
+
/**
|
|
635
|
+
* @hidden
|
|
636
|
+
|
|
597
637
|
*/
|
|
598
638
|
export var showTableDialog = 'showTableDialog';
|
|
599
639
|
/**
|
|
@@ -610,4 +650,4 @@ export var bindCssClass = 'closeTableDialog';
|
|
|
610
650
|
* @hidden
|
|
611
651
|
|
|
612
652
|
*/
|
|
613
|
-
export var blockInlineEmptyNodes = "address:empty, article:empty, aside:empty, blockquote:empty,\
|
|
653
|
+
export var blockInlineEmptyNodes = "address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, hr:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty,\n a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\n canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\n ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\n q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\n template:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty";
|
|
@@ -148,6 +148,7 @@ export interface IRichTextEditor extends Component<HTMLElement> {
|
|
|
148
148
|
enableXhtml?: boolean;
|
|
149
149
|
enableHtmlSanitizer?: boolean;
|
|
150
150
|
getInsertImgMaxWidth?(): string | number;
|
|
151
|
+
getInsertVidMaxWidth?(): string | number;
|
|
151
152
|
getSelection(): string;
|
|
152
153
|
currentTarget: HTMLElement;
|
|
153
154
|
}
|
|
@@ -256,6 +257,7 @@ export interface IColorPickerModel extends ColorPickerModel {
|
|
|
256
257
|
subCommand?: string;
|
|
257
258
|
target?: string;
|
|
258
259
|
iconCss?: string;
|
|
260
|
+
cssClass?: string;
|
|
259
261
|
}
|
|
260
262
|
/**
|
|
261
263
|
* @hidden
|
|
@@ -70,26 +70,7 @@ import { DialogRenderer } from '../renderer/dialog-renderer';
|
|
|
70
70
|
var RichTextEditor = /** @class */ (function (_super) {
|
|
71
71
|
__extends(RichTextEditor, _super);
|
|
72
72
|
function RichTextEditor(options, element) {
|
|
73
|
-
|
|
74
|
-
_this.defaultResetValue = null;
|
|
75
|
-
_this.isResizeInitialized = false;
|
|
76
|
-
/**
|
|
77
|
-
* @hidden
|
|
78
|
-
|
|
79
|
-
*/
|
|
80
|
-
_this.isFocusOut = false;
|
|
81
|
-
/**
|
|
82
|
-
* @hidden
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
_this.isRTE = false;
|
|
86
|
-
/**
|
|
87
|
-
* @hidden
|
|
88
|
-
|
|
89
|
-
*/
|
|
90
|
-
_this.isBlur = true;
|
|
91
|
-
_this.needsID = true;
|
|
92
|
-
return _this;
|
|
73
|
+
return _super.call(this, options, element) || this;
|
|
93
74
|
}
|
|
94
75
|
/**
|
|
95
76
|
* To provide the array of modules needed for component rendering
|
|
@@ -170,6 +151,14 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
170
151
|
// eslint-disable-next-line
|
|
171
152
|
(this.enabled) ? this.eventInitializer() : this.unWireEvents();
|
|
172
153
|
};
|
|
154
|
+
RichTextEditor.prototype.initializeValue = function () {
|
|
155
|
+
this.isFocusOut = false;
|
|
156
|
+
this.isRTE = false;
|
|
157
|
+
this.isBlur = true;
|
|
158
|
+
this.needsID = true;
|
|
159
|
+
this.defaultResetValue = null;
|
|
160
|
+
this.isResizeInitialized = false;
|
|
161
|
+
};
|
|
173
162
|
/**
|
|
174
163
|
* For internal use only - Initialize the event handler;
|
|
175
164
|
*
|
|
@@ -178,6 +167,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
178
167
|
* @private
|
|
179
168
|
*/
|
|
180
169
|
RichTextEditor.prototype.preRender = function () {
|
|
170
|
+
this.initializeValue();
|
|
181
171
|
this.onBlurHandler = this.blurHandler.bind(this);
|
|
182
172
|
this.onFocusHandler = this.focusHandler.bind(this);
|
|
183
173
|
this.onResizeHandler = this.resizeHandler.bind(this);
|
|
@@ -234,11 +224,18 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
234
224
|
}
|
|
235
225
|
else {
|
|
236
226
|
this.valueContainer = this.createElement('textarea', {
|
|
237
|
-
id: this.getID() + '-value'
|
|
227
|
+
id: this.getID() + '-value',
|
|
228
|
+
attrs: { 'aria-labelledby': this.getID() }
|
|
238
229
|
});
|
|
239
230
|
}
|
|
240
231
|
this.valueContainer.name = this.getID();
|
|
241
232
|
addClass([this.valueContainer], classes.CLS_RTE_HIDDEN);
|
|
233
|
+
if (!isNOU(this.cssClass)) {
|
|
234
|
+
var currentClassList = this.cssClass.split(' ');
|
|
235
|
+
for (var i = 0; i < currentClassList.length; i++) {
|
|
236
|
+
addClass([this.valueContainer], currentClassList[i]);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
242
239
|
this.element.appendChild(this.valueContainer);
|
|
243
240
|
};
|
|
244
241
|
/**
|
|
@@ -505,8 +502,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
505
502
|
var closestLI = closest(endNode, 'LI');
|
|
506
503
|
if (!isNOU(closestLI) && endNode.textContent.length === range.endOffset &&
|
|
507
504
|
!range.collapsed && isNOU(endNode.nextElementSibling)) {
|
|
508
|
-
|
|
509
|
-
|
|
505
|
+
for (var i = 0; i < closestLI.childNodes.length; i++) {
|
|
506
|
+
if (closestLI.childNodes[i].nodeName === "#text" && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
507
|
+
detach(closestLI.childNodes[i]);
|
|
508
|
+
i--;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
510
511
|
var currentLastElem = closestLI;
|
|
511
512
|
while (currentLastElem.nodeName !== '#text') {
|
|
512
513
|
currentLastElem = currentLastElem.lastChild;
|
|
@@ -877,6 +878,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
877
878
|
for (var i = 0; i < this.originalElement.classList.length; i++) {
|
|
878
879
|
addClass([this.element], this.originalElement.classList[i]);
|
|
879
880
|
}
|
|
881
|
+
if (!isNOU(this.cssClass)) {
|
|
882
|
+
var currentClassList = this.cssClass.split(' ');
|
|
883
|
+
for (var i = 0; i < currentClassList.length; i++) {
|
|
884
|
+
addClass([this.element], currentClassList[i]);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
880
887
|
removeClass([this.element], classes.CLS_RTE_HIDDEN);
|
|
881
888
|
}
|
|
882
889
|
else {
|
|
@@ -1252,7 +1259,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1252
1259
|
if (this.inputElement && this.placeholder && this.iframeSettings.enable !== true) {
|
|
1253
1260
|
if (this.editorMode !== 'Markdown') {
|
|
1254
1261
|
if (!this.placeHolderWrapper) {
|
|
1255
|
-
this.placeHolderWrapper = this.createElement('span', { className: 'rte-placeholder e-rte-placeholder' });
|
|
1262
|
+
this.placeHolderWrapper = this.createElement('span', { className: 'rte-placeholder e-rte-placeholder' + ' ' + this.cssClass });
|
|
1256
1263
|
if (this.inputElement) {
|
|
1257
1264
|
this.inputElement.parentElement.insertBefore(this.placeHolderWrapper, this.inputElement);
|
|
1258
1265
|
}
|
|
@@ -1502,7 +1509,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1502
1509
|
this.setProperties({ value: this.valueTemplate });
|
|
1503
1510
|
}
|
|
1504
1511
|
else {
|
|
1505
|
-
var compiledTemplate = compile(this.valueTemplate)(
|
|
1512
|
+
var compiledTemplate = compile(this.valueTemplate)('', this, 'valueTemplate');
|
|
1506
1513
|
for (var i = 0; i < compiledTemplate.length; i++) {
|
|
1507
1514
|
var item = compiledTemplate[i];
|
|
1508
1515
|
append([item], this.element);
|
|
@@ -177,7 +177,7 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
177
177
|
result = getDropDownValue(formatItems, value, 'subCommand', 'text');
|
|
178
178
|
dropDown.formatDropDown.content = ('<span style="display: inline-flex;' +
|
|
179
179
|
'width:' + e.parent.format.width + '" >' +
|
|
180
|
-
'<span class="e-rte-dropdown-btn-text">'
|
|
180
|
+
'<span class="e-rte-dropdown-btn-text' + ' ' + e.parent.cssClass + '">'
|
|
181
181
|
+ (isNOU(result) ? formatContent : result) +
|
|
182
182
|
'</span></span>');
|
|
183
183
|
dropDown.formatDropDown.dataBind();
|
|
@@ -207,7 +207,7 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
207
207
|
e.tbElements[j].title = name_1;
|
|
208
208
|
dropDown.fontNameDropDown.content = ('<span style="display: inline-flex;' +
|
|
209
209
|
'width:' + e.parent.fontFamily.width + '" >' +
|
|
210
|
-
'<span class="e-rte-dropdown-btn-text">'
|
|
210
|
+
'<span class="e-rte-dropdown-btn-text' + ' ' + e.parent.cssClass + '">'
|
|
211
211
|
+ name_1 + '</span></span>');
|
|
212
212
|
dropDown.fontNameDropDown.dataBind();
|
|
213
213
|
break;
|
|
@@ -223,7 +223,7 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
223
223
|
result = getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
|
|
224
224
|
dropDown.fontSizeDropDown.content = ('<span style="display: inline-flex;' +
|
|
225
225
|
'width:' + e.parent.fontSize.width + '" >' +
|
|
226
|
-
'<span class="e-rte-dropdown-btn-text">'
|
|
226
|
+
'<span class="e-rte-dropdown-btn-text' + ' ' + e.parent.cssClass + '">'
|
|
227
227
|
+ getFormattedFontSize(result) + '</span></span>');
|
|
228
228
|
dropDown.fontSizeDropDown.dataBind();
|
|
229
229
|
break;
|
|
@@ -170,7 +170,7 @@ var Formatter = /** @class */ (function () {
|
|
|
170
170
|
}
|
|
171
171
|
self.trigger(CONSTANT.actionComplete, events, function (callbackArgs) {
|
|
172
172
|
self.setPlaceHolder();
|
|
173
|
-
if (callbackArgs.requestType === 'Images' || callbackArgs.requestType === 'Links' && self.editorMode === 'HTML') {
|
|
173
|
+
if ((callbackArgs.requestType === 'Images' || callbackArgs.requestType === 'Links') && self.editorMode === 'HTML') {
|
|
174
174
|
var args = callbackArgs;
|
|
175
175
|
if (callbackArgs.requestType === 'Links' && callbackArgs.event &&
|
|
176
176
|
callbackArgs.event.type === 'keydown' &&
|
|
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
import { ContentRender } from '../renderer/content-renderer';
|
|
15
15
|
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
16
16
|
import { getEditValue } from '../base/util';
|
|
17
|
-
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n </style>\n </head>";
|
|
17
|
+
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n </style>\n </head>";
|
|
18
18
|
/**
|
|
19
19
|
* Content module is used to render Rich Text Editor content
|
|
20
20
|
*
|
|
@@ -255,18 +255,18 @@ var Image = /** @class */ (function () {
|
|
|
255
255
|
this.resizeBtnInit();
|
|
256
256
|
this.imgEle = e;
|
|
257
257
|
addClass([this.imgEle], 'e-resize');
|
|
258
|
-
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize', id: this.rteID + '_imgResize' });
|
|
258
|
+
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' + ' ' + this.parent.cssClass, id: this.rteID + '_imgResize' });
|
|
259
259
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
260
|
-
className: 'e-rte-imageboxmark e-rte-topLeft', styles: 'cursor: nwse-resize'
|
|
260
|
+
className: 'e-rte-imageboxmark e-rte-topLeft' + ' ' + this.parent.cssClass, styles: 'cursor: nwse-resize'
|
|
261
261
|
}));
|
|
262
262
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
263
|
-
className: 'e-rte-imageboxmark e-rte-topRight', styles: 'cursor: nesw-resize'
|
|
263
|
+
className: 'e-rte-imageboxmark e-rte-topRight' + ' ' + this.parent.cssClass, styles: 'cursor: nesw-resize'
|
|
264
264
|
}));
|
|
265
265
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
266
|
-
className: 'e-rte-imageboxmark e-rte-botLeft', styles: 'cursor: nesw-resize'
|
|
266
|
+
className: 'e-rte-imageboxmark e-rte-botLeft' + ' ' + this.parent.cssClass, styles: 'cursor: nesw-resize'
|
|
267
267
|
}));
|
|
268
268
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
269
|
-
className: 'e-rte-imageboxmark e-rte-botRight', styles: 'cursor: nwse-resize'
|
|
269
|
+
className: 'e-rte-imageboxmark e-rte-botRight' + ' ' + this.parent.cssClass, styles: 'cursor: nwse-resize'
|
|
270
270
|
}));
|
|
271
271
|
if (Browser.isDevice) {
|
|
272
272
|
addClass([this.imgResizeDiv], 'e-mob-rte');
|
|
@@ -931,12 +931,12 @@ var Image = /** @class */ (function () {
|
|
|
931
931
|
}
|
|
932
932
|
this.imagDialog(e);
|
|
933
933
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
934
|
-
var linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' });
|
|
934
|
+
var linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' + ' ' + this.parent.cssClass });
|
|
935
935
|
var linkUrl = this.i10n.getConstant('linkurl');
|
|
936
|
-
var content = '<div class="e-rte-field">' +
|
|
937
|
-
'<input type="text" data-role ="none" class="e-input e-img-link" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
936
|
+
var content = '<div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
937
|
+
'<input type="text" data-role ="none" class="e-input e-img-link' + ' ' + this.parent.cssClass + '" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
938
938
|
'<div class="e-rte-label"></div>' + '<div class="e-rte-field">' +
|
|
939
|
-
'<input type="checkbox" class="e-rte-linkTarget" data-role ="none"></div>';
|
|
939
|
+
'<input type="checkbox" class="e-rte-linkTarget' + ' ' + this.parent.cssClass + '" data-role ="none"></div>';
|
|
940
940
|
var contentElem = parseHtml(content);
|
|
941
941
|
linkWrap.appendChild(contentElem);
|
|
942
942
|
var linkTarget = linkWrap.querySelector('.e-rte-linkTarget');
|
|
@@ -975,9 +975,10 @@ var Image = /** @class */ (function () {
|
|
|
975
975
|
_this.insertlink(linkargs_1);
|
|
976
976
|
},
|
|
977
977
|
buttonModel: {
|
|
978
|
-
content: linkUpdate, cssClass: 'e-flat e-update-link', isPrimary: true
|
|
978
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + ' ' + this.parent.cssClass, isPrimary: true
|
|
979
979
|
}
|
|
980
|
-
}]
|
|
980
|
+
}],
|
|
981
|
+
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
981
982
|
});
|
|
982
983
|
if (!isNOU(this.parent.cssClass)) {
|
|
983
984
|
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
@@ -1000,13 +1001,13 @@ var Image = /** @class */ (function () {
|
|
|
1000
1001
|
this.imagDialog(e);
|
|
1001
1002
|
var altText = this.i10n.getConstant('altText');
|
|
1002
1003
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
1003
|
-
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' });
|
|
1004
|
+
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + ' ' + this.parent.cssClass });
|
|
1004
1005
|
var altHeader = this.i10n.getConstant('alternateHeader');
|
|
1005
1006
|
var linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
1006
1007
|
var getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
1007
1008
|
e.selectNode[0].getAttribute('alt');
|
|
1008
|
-
var content = '<div class="e-rte-field">' +
|
|
1009
|
-
'<input type="text" spellcheck="false" value="' + getAlt + '" class="e-input e-img-alt" placeholder="' + altText + '"/>' +
|
|
1009
|
+
var content = '<div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
1010
|
+
'<input type="text" spellcheck="false" value="' + getAlt + '" class="e-input e-img-alt' + ' ' + this.parent.cssClass + '" placeholder="' + altText + '"/>' +
|
|
1010
1011
|
'</div>';
|
|
1011
1012
|
var contentElem = parseHtml(content);
|
|
1012
1013
|
altWrap.appendChild(contentElem);
|
|
@@ -1023,9 +1024,10 @@ var Image = /** @class */ (function () {
|
|
|
1023
1024
|
_this.insertAlt(altArgs_1);
|
|
1024
1025
|
},
|
|
1025
1026
|
buttonModel: {
|
|
1026
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt', isPrimary: true
|
|
1027
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + ' ' + this.parent.cssClass, isPrimary: true
|
|
1027
1028
|
}
|
|
1028
|
-
}]
|
|
1029
|
+
}],
|
|
1030
|
+
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
1029
1031
|
});
|
|
1030
1032
|
if (!isNOU(this.parent.cssClass)) {
|
|
1031
1033
|
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
@@ -1189,11 +1191,11 @@ var Image = /** @class */ (function () {
|
|
|
1189
1191
|
}
|
|
1190
1192
|
else {
|
|
1191
1193
|
this.captionEle = this.parent.createElement('span', {
|
|
1192
|
-
className: classes.CLS_CAPTION + ' ' + classes.CLS_RTE_CAPTION,
|
|
1194
|
+
className: classes.CLS_CAPTION + ' ' + classes.CLS_RTE_CAPTION + ' ' + this.parent.cssClass,
|
|
1193
1195
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
1194
1196
|
});
|
|
1195
|
-
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' });
|
|
1196
|
-
var imgInner = this.parent.createElement('span', { className: 'e-img-inner',
|
|
1197
|
+
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + ' ' + this.parent.cssClass });
|
|
1198
|
+
var imgInner = this.parent.createElement('span', { className: 'e-img-inner' + ' ' + this.parent.cssClass,
|
|
1197
1199
|
attrs: { contenteditable: 'true' } });
|
|
1198
1200
|
var parent_1 = e.selectNode[0].parentElement;
|
|
1199
1201
|
if (parent_1.tagName === 'A') {
|
|
@@ -1246,9 +1248,10 @@ var Image = /** @class */ (function () {
|
|
|
1246
1248
|
_this.insertSize(selectObj_1);
|
|
1247
1249
|
},
|
|
1248
1250
|
buttonModel: {
|
|
1249
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size', isPrimary: true
|
|
1251
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + ' ' + this.parent.cssClass, isPrimary: true
|
|
1250
1252
|
}
|
|
1251
|
-
}]
|
|
1253
|
+
}],
|
|
1254
|
+
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
1252
1255
|
});
|
|
1253
1256
|
if (!isNOU(this.parent.cssClass)) {
|
|
1254
1257
|
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
@@ -1291,7 +1294,7 @@ var Image = /** @class */ (function () {
|
|
|
1291
1294
|
this.dialogObj.hide({ returnValue: true });
|
|
1292
1295
|
return;
|
|
1293
1296
|
}
|
|
1294
|
-
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog', id: this.rteID + '_image' });
|
|
1297
|
+
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + ' ' + this.parent.cssClass, id: this.rteID + '_image' });
|
|
1295
1298
|
this.parent.element.appendChild(imgDialog);
|
|
1296
1299
|
var imgInsert = this.i10n.getConstant('dialogInsert');
|
|
1297
1300
|
var imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -1300,7 +1303,7 @@ var Image = /** @class */ (function () {
|
|
|
1300
1303
|
var selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
1301
1304
|
var dialogModel = {
|
|
1302
1305
|
header: imgHeader,
|
|
1303
|
-
cssClass: classes.CLS_RTE_ELEMENTS,
|
|
1306
|
+
cssClass: classes.CLS_RTE_ELEMENTS + ' ' + this.parent.cssClass,
|
|
1304
1307
|
enableRtl: this.parent.enableRtl,
|
|
1305
1308
|
locale: this.parent.locale,
|
|
1306
1309
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'inherit',
|
|
@@ -1308,13 +1311,13 @@ var Image = /** @class */ (function () {
|
|
|
1308
1311
|
isModal: Browser.isDevice,
|
|
1309
1312
|
buttons: [{
|
|
1310
1313
|
click: this.insertImageUrl.bind(selectObj),
|
|
1311
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage', isPrimary: true, disabled: true }
|
|
1314
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + ' ' + this.parent.cssClass, isPrimary: true, disabled: true }
|
|
1312
1315
|
},
|
|
1313
1316
|
{
|
|
1314
1317
|
click: function (e) {
|
|
1315
1318
|
_this.cancelDialog(e);
|
|
1316
1319
|
},
|
|
1317
|
-
buttonModel: { cssClass: 'e-flat e-cancel', content: imglinkCancel }
|
|
1320
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + this.parent.cssClass, content: imglinkCancel }
|
|
1318
1321
|
}],
|
|
1319
1322
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
1320
1323
|
animationSettings: { effect: 'None' },
|
|
@@ -1337,12 +1340,12 @@ var Image = /** @class */ (function () {
|
|
|
1337
1340
|
_this.dialogObj = null;
|
|
1338
1341
|
}
|
|
1339
1342
|
};
|
|
1340
|
-
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' });
|
|
1343
|
+
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' + ' ' + this.parent.cssClass });
|
|
1341
1344
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
1342
1345
|
|| this.parent.editorMode === 'HTML') {
|
|
1343
1346
|
dialogContent.appendChild(this.imgUpload(e));
|
|
1344
1347
|
}
|
|
1345
|
-
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' });
|
|
1348
|
+
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + ' ' + this.parent.cssClass });
|
|
1346
1349
|
var linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
1347
1350
|
if (this.parent.editorMode === 'HTML') {
|
|
1348
1351
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -1414,7 +1417,8 @@ var Image = /** @class */ (function () {
|
|
|
1414
1417
|
}
|
|
1415
1418
|
/* eslint-enable */
|
|
1416
1419
|
}
|
|
1417
|
-
if (!(this.parent.iframeSettings.enable && this.parent.currentTarget
|
|
1420
|
+
if (!(this.parent.iframeSettings.enable && !isNOU(this.parent.currentTarget) && this.parent.currentTarget.nodeName === 'IMG') &&
|
|
1421
|
+
e.target.tagName !== 'IMG' && this.imgResizeDiv && !(this.quickToolObj &&
|
|
1418
1422
|
this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
|
|
1419
1423
|
this.contentModule.getEditPanel().contains(this.imgResizeDiv)) {
|
|
1420
1424
|
this.cancelResizeAction();
|
|
@@ -1444,10 +1448,10 @@ var Image = /** @class */ (function () {
|
|
|
1444
1448
|
// eslint-disable-next-line
|
|
1445
1449
|
Image.prototype.imageUrlPopup = function (e) {
|
|
1446
1450
|
var _this = this;
|
|
1447
|
-
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' });
|
|
1451
|
+
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' + ' ' + this.parent.cssClass });
|
|
1448
1452
|
var placeUrl = this.i10n.getConstant('imageUrl');
|
|
1449
1453
|
this.inputUrl = this.parent.createElement('input', {
|
|
1450
|
-
className: 'e-input e-img-url',
|
|
1454
|
+
className: 'e-input e-img-url' + ' ' + this.parent.cssClass,
|
|
1451
1455
|
attrs: { placeholder: placeUrl, spellcheck: 'false' }
|
|
1452
1456
|
});
|
|
1453
1457
|
this.inputUrl.addEventListener('input', function () {
|
|
@@ -1514,7 +1518,7 @@ var Image = /** @class */ (function () {
|
|
|
1514
1518
|
var selectNode = e.selectNode[0];
|
|
1515
1519
|
var imgHeight = this.i10n.getConstant('imageHeight');
|
|
1516
1520
|
var imgWidth = this.i10n.getConstant('imageWidth');
|
|
1517
|
-
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' });
|
|
1521
|
+
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + ' ' + this.parent.cssClass });
|
|
1518
1522
|
var widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
1519
1523
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
1520
1524
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -1523,12 +1527,12 @@ var Image = /** @class */ (function () {
|
|
|
1523
1527
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
1524
1528
|
this.changedWidthValue = null;
|
|
1525
1529
|
this.changedHeightValue = null;
|
|
1526
|
-
var content = '<div class="e-rte-label"><label>' + imgWidth +
|
|
1527
|
-
'</label></div><div class="e-rte-field"><input type="text" id="imgwidth" class="e-img-width" value=' +
|
|
1530
|
+
var content = '<div class="e-rte-label' + ' ' + this.parent.cssClass + '"><label>' + imgWidth +
|
|
1531
|
+
'</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"><input type="text" id="imgwidth" class="e-img-width' + ' ' + this.parent.cssClass + '" value=' +
|
|
1528
1532
|
widthVal
|
|
1529
1533
|
+ ' /></div>' +
|
|
1530
|
-
'<div class="e-rte-label">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field"> ' +
|
|
1531
|
-
'<input type="text" id="imgheight" class="e-img-height" value=' +
|
|
1534
|
+
'<div class="e-rte-label' + ' ' + this.parent.cssClass + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"> ' +
|
|
1535
|
+
'<input type="text" id="imgheight" class="e-img-height' + ' ' + this.parent.cssClass + '" value=' +
|
|
1532
1536
|
heightVal
|
|
1533
1537
|
+ ' /></div>';
|
|
1534
1538
|
var contentElem = parseHtml(content);
|
|
@@ -1618,16 +1622,16 @@ var Image = /** @class */ (function () {
|
|
|
1618
1622
|
save = e.selection;
|
|
1619
1623
|
selectParent = e.selectParent;
|
|
1620
1624
|
}
|
|
1621
|
-
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' });
|
|
1625
|
+
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + ' ' + this.parent.cssClass });
|
|
1622
1626
|
var deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
1623
1627
|
var imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
1624
|
-
var span = this.parent.createElement('span', { className: 'e-droptext' });
|
|
1628
|
+
var span = this.parent.createElement('span', { className: 'e-droptext' + ' ' + this.parent.cssClass });
|
|
1625
1629
|
var spanMsg = this.parent.createElement('span', {
|
|
1626
|
-
className: 'e-rte-upload-text', innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
1630
|
+
className: 'e-rte-upload-text' + ' ' + this.parent.cssClass, innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
1627
1631
|
});
|
|
1628
1632
|
span.appendChild(spanMsg);
|
|
1629
1633
|
var btnEle = this.parent.createElement('button', {
|
|
1630
|
-
className: 'e-browsebtn', id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
1634
|
+
className: 'e-browsebtn' + ' ' + this.parent.cssClass, id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
1631
1635
|
});
|
|
1632
1636
|
span.appendChild(btnEle);
|
|
1633
1637
|
uploadParentEle.appendChild(span);
|
|
@@ -1639,7 +1643,7 @@ var Image = /** @class */ (function () {
|
|
|
1639
1643
|
var btnClick = (Browser.isDevice) ? span : btnEle;
|
|
1640
1644
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
1641
1645
|
var uploadEle = this.parent.createElement('input', {
|
|
1642
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }
|
|
1646
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.cssClass
|
|
1643
1647
|
});
|
|
1644
1648
|
uploadParentEle.appendChild(uploadEle);
|
|
1645
1649
|
var altText;
|