@syncfusion/ej2-richtexteditor 20.1.61 → 20.2.36
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 +10 -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 +419 -171
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +411 -162
- 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 +12 -4
- 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/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 +26 -23
- 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 +38 -37
- 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 +132 -55
- package/src/rich-text-editor/renderer/toolbar-renderer.js +11 -1
- package/src/rich-text-editor/renderer/view-source.js +1 -1
- package/styles/fluent-dark.css +1 -0
- package/styles/fluent.css +1 -0
- package/styles/rich-text-editor/_fluent-definition.scss +1 -0
- package/styles/rich-text-editor/_fusionnew-definition.scss +189 -0
- package/styles/rich-text-editor/_layout.scss +3 -0
- package/styles/rich-text-editor/_material3-definition.scss +189 -0
- package/styles/rich-text-editor/fluent-dark.css +1 -0
- package/styles/rich-text-editor/fluent.css +1 -0
- package/styles/rich-text-editor/icons/_fusionnew.scss +303 -0
- package/styles/rich-text-editor/icons/_material3.scss +303 -0
|
@@ -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
|
/**
|
|
@@ -877,6 +874,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
877
874
|
for (var i = 0; i < this.originalElement.classList.length; i++) {
|
|
878
875
|
addClass([this.element], this.originalElement.classList[i]);
|
|
879
876
|
}
|
|
877
|
+
if (!isNOU(this.cssClass)) {
|
|
878
|
+
var currentClassList = this.cssClass.split(' ');
|
|
879
|
+
for (var i = 0; i < currentClassList.length; i++) {
|
|
880
|
+
addClass([this.element], currentClassList[i]);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
880
883
|
removeClass([this.element], classes.CLS_RTE_HIDDEN);
|
|
881
884
|
}
|
|
882
885
|
else {
|
|
@@ -1252,7 +1255,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1252
1255
|
if (this.inputElement && this.placeholder && this.iframeSettings.enable !== true) {
|
|
1253
1256
|
if (this.editorMode !== 'Markdown') {
|
|
1254
1257
|
if (!this.placeHolderWrapper) {
|
|
1255
|
-
this.placeHolderWrapper = this.createElement('span', { className: 'rte-placeholder e-rte-placeholder' });
|
|
1258
|
+
this.placeHolderWrapper = this.createElement('span', { className: 'rte-placeholder e-rte-placeholder' + ' ' + this.cssClass });
|
|
1256
1259
|
if (this.inputElement) {
|
|
1257
1260
|
this.inputElement.parentElement.insertBefore(this.placeHolderWrapper, this.inputElement);
|
|
1258
1261
|
}
|
|
@@ -1502,7 +1505,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1502
1505
|
this.setProperties({ value: this.valueTemplate });
|
|
1503
1506
|
}
|
|
1504
1507
|
else {
|
|
1505
|
-
var compiledTemplate = compile(this.valueTemplate)(
|
|
1508
|
+
var compiledTemplate = compile(this.valueTemplate)('', this, 'valueTemplate');
|
|
1506
1509
|
for (var i = 0; i < compiledTemplate.length; i++) {
|
|
1507
1510
|
var item = compiledTemplate[i];
|
|
1508
1511
|
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,7 +975,7 @@ 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
981
|
});
|
|
@@ -1000,13 +1000,13 @@ var Image = /** @class */ (function () {
|
|
|
1000
1000
|
this.imagDialog(e);
|
|
1001
1001
|
var altText = this.i10n.getConstant('altText');
|
|
1002
1002
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
1003
|
-
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' });
|
|
1003
|
+
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + ' ' + this.parent.cssClass });
|
|
1004
1004
|
var altHeader = this.i10n.getConstant('alternateHeader');
|
|
1005
1005
|
var linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
1006
1006
|
var getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
1007
1007
|
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 + '"/>' +
|
|
1008
|
+
var content = '<div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
1009
|
+
'<input type="text" spellcheck="false" value="' + getAlt + '" class="e-input e-img-alt' + ' ' + this.parent.cssClass + '" placeholder="' + altText + '"/>' +
|
|
1010
1010
|
'</div>';
|
|
1011
1011
|
var contentElem = parseHtml(content);
|
|
1012
1012
|
altWrap.appendChild(contentElem);
|
|
@@ -1023,7 +1023,7 @@ var Image = /** @class */ (function () {
|
|
|
1023
1023
|
_this.insertAlt(altArgs_1);
|
|
1024
1024
|
},
|
|
1025
1025
|
buttonModel: {
|
|
1026
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt', isPrimary: true
|
|
1026
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + ' ' + this.parent.cssClass, isPrimary: true
|
|
1027
1027
|
}
|
|
1028
1028
|
}]
|
|
1029
1029
|
});
|
|
@@ -1189,11 +1189,11 @@ var Image = /** @class */ (function () {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
else {
|
|
1191
1191
|
this.captionEle = this.parent.createElement('span', {
|
|
1192
|
-
className: classes.CLS_CAPTION + ' ' + classes.CLS_RTE_CAPTION,
|
|
1192
|
+
className: classes.CLS_CAPTION + ' ' + classes.CLS_RTE_CAPTION + ' ' + this.parent.cssClass,
|
|
1193
1193
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
1194
1194
|
});
|
|
1195
|
-
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' });
|
|
1196
|
-
var imgInner = this.parent.createElement('span', { className: 'e-img-inner',
|
|
1195
|
+
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + ' ' + this.parent.cssClass });
|
|
1196
|
+
var imgInner = this.parent.createElement('span', { className: 'e-img-inner' + ' ' + this.parent.cssClass,
|
|
1197
1197
|
attrs: { contenteditable: 'true' } });
|
|
1198
1198
|
var parent_1 = e.selectNode[0].parentElement;
|
|
1199
1199
|
if (parent_1.tagName === 'A') {
|
|
@@ -1246,7 +1246,7 @@ var Image = /** @class */ (function () {
|
|
|
1246
1246
|
_this.insertSize(selectObj_1);
|
|
1247
1247
|
},
|
|
1248
1248
|
buttonModel: {
|
|
1249
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size', isPrimary: true
|
|
1249
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + ' ' + this.parent.cssClass, isPrimary: true
|
|
1250
1250
|
}
|
|
1251
1251
|
}]
|
|
1252
1252
|
});
|
|
@@ -1291,7 +1291,7 @@ var Image = /** @class */ (function () {
|
|
|
1291
1291
|
this.dialogObj.hide({ returnValue: true });
|
|
1292
1292
|
return;
|
|
1293
1293
|
}
|
|
1294
|
-
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog', id: this.rteID + '_image' });
|
|
1294
|
+
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + ' ' + this.parent.cssClass, id: this.rteID + '_image' });
|
|
1295
1295
|
this.parent.element.appendChild(imgDialog);
|
|
1296
1296
|
var imgInsert = this.i10n.getConstant('dialogInsert');
|
|
1297
1297
|
var imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -1300,7 +1300,7 @@ var Image = /** @class */ (function () {
|
|
|
1300
1300
|
var selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
1301
1301
|
var dialogModel = {
|
|
1302
1302
|
header: imgHeader,
|
|
1303
|
-
cssClass: classes.CLS_RTE_ELEMENTS,
|
|
1303
|
+
cssClass: classes.CLS_RTE_ELEMENTS + ' ' + this.parent.cssClass,
|
|
1304
1304
|
enableRtl: this.parent.enableRtl,
|
|
1305
1305
|
locale: this.parent.locale,
|
|
1306
1306
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'inherit',
|
|
@@ -1308,13 +1308,13 @@ var Image = /** @class */ (function () {
|
|
|
1308
1308
|
isModal: Browser.isDevice,
|
|
1309
1309
|
buttons: [{
|
|
1310
1310
|
click: this.insertImageUrl.bind(selectObj),
|
|
1311
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage', isPrimary: true, disabled: true }
|
|
1311
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + ' ' + this.parent.cssClass, isPrimary: true, disabled: true }
|
|
1312
1312
|
},
|
|
1313
1313
|
{
|
|
1314
1314
|
click: function (e) {
|
|
1315
1315
|
_this.cancelDialog(e);
|
|
1316
1316
|
},
|
|
1317
|
-
buttonModel: { cssClass: 'e-flat e-cancel', content: imglinkCancel }
|
|
1317
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + this.parent.cssClass, content: imglinkCancel }
|
|
1318
1318
|
}],
|
|
1319
1319
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
1320
1320
|
animationSettings: { effect: 'None' },
|
|
@@ -1337,12 +1337,12 @@ var Image = /** @class */ (function () {
|
|
|
1337
1337
|
_this.dialogObj = null;
|
|
1338
1338
|
}
|
|
1339
1339
|
};
|
|
1340
|
-
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' });
|
|
1340
|
+
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' + ' ' + this.parent.cssClass });
|
|
1341
1341
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
1342
1342
|
|| this.parent.editorMode === 'HTML') {
|
|
1343
1343
|
dialogContent.appendChild(this.imgUpload(e));
|
|
1344
1344
|
}
|
|
1345
|
-
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' });
|
|
1345
|
+
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + ' ' + this.parent.cssClass });
|
|
1346
1346
|
var linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
1347
1347
|
if (this.parent.editorMode === 'HTML') {
|
|
1348
1348
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -1414,7 +1414,8 @@ var Image = /** @class */ (function () {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
/* eslint-enable */
|
|
1416
1416
|
}
|
|
1417
|
-
if (!(this.parent.iframeSettings.enable && this.parent.currentTarget
|
|
1417
|
+
if (!(this.parent.iframeSettings.enable && !isNOU(this.parent.currentTarget) && this.parent.currentTarget.nodeName === 'IMG') &&
|
|
1418
|
+
e.target.tagName !== 'IMG' && this.imgResizeDiv && !(this.quickToolObj &&
|
|
1418
1419
|
this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
|
|
1419
1420
|
this.contentModule.getEditPanel().contains(this.imgResizeDiv)) {
|
|
1420
1421
|
this.cancelResizeAction();
|
|
@@ -1444,10 +1445,10 @@ var Image = /** @class */ (function () {
|
|
|
1444
1445
|
// eslint-disable-next-line
|
|
1445
1446
|
Image.prototype.imageUrlPopup = function (e) {
|
|
1446
1447
|
var _this = this;
|
|
1447
|
-
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' });
|
|
1448
|
+
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' + ' ' + this.parent.cssClass });
|
|
1448
1449
|
var placeUrl = this.i10n.getConstant('imageUrl');
|
|
1449
1450
|
this.inputUrl = this.parent.createElement('input', {
|
|
1450
|
-
className: 'e-input e-img-url',
|
|
1451
|
+
className: 'e-input e-img-url' + ' ' + this.parent.cssClass,
|
|
1451
1452
|
attrs: { placeholder: placeUrl, spellcheck: 'false' }
|
|
1452
1453
|
});
|
|
1453
1454
|
this.inputUrl.addEventListener('input', function () {
|
|
@@ -1514,7 +1515,7 @@ var Image = /** @class */ (function () {
|
|
|
1514
1515
|
var selectNode = e.selectNode[0];
|
|
1515
1516
|
var imgHeight = this.i10n.getConstant('imageHeight');
|
|
1516
1517
|
var imgWidth = this.i10n.getConstant('imageWidth');
|
|
1517
|
-
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' });
|
|
1518
|
+
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + ' ' + this.parent.cssClass });
|
|
1518
1519
|
var widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
1519
1520
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
1520
1521
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -1523,12 +1524,12 @@ var Image = /** @class */ (function () {
|
|
|
1523
1524
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
1524
1525
|
this.changedWidthValue = null;
|
|
1525
1526
|
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=' +
|
|
1527
|
+
var content = '<div class="e-rte-label' + ' ' + this.parent.cssClass + '"><label>' + imgWidth +
|
|
1528
|
+
'</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"><input type="text" id="imgwidth" class="e-img-width' + ' ' + this.parent.cssClass + '" value=' +
|
|
1528
1529
|
widthVal
|
|
1529
1530
|
+ ' /></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=' +
|
|
1531
|
+
'<div class="e-rte-label' + ' ' + this.parent.cssClass + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"> ' +
|
|
1532
|
+
'<input type="text" id="imgheight" class="e-img-height' + ' ' + this.parent.cssClass + '" value=' +
|
|
1532
1533
|
heightVal
|
|
1533
1534
|
+ ' /></div>';
|
|
1534
1535
|
var contentElem = parseHtml(content);
|
|
@@ -1618,16 +1619,16 @@ var Image = /** @class */ (function () {
|
|
|
1618
1619
|
save = e.selection;
|
|
1619
1620
|
selectParent = e.selectParent;
|
|
1620
1621
|
}
|
|
1621
|
-
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' });
|
|
1622
|
+
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + ' ' + this.parent.cssClass });
|
|
1622
1623
|
var deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
1623
1624
|
var imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
1624
|
-
var span = this.parent.createElement('span', { className: 'e-droptext' });
|
|
1625
|
+
var span = this.parent.createElement('span', { className: 'e-droptext' + ' ' + this.parent.cssClass });
|
|
1625
1626
|
var spanMsg = this.parent.createElement('span', {
|
|
1626
|
-
className: 'e-rte-upload-text', innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
1627
|
+
className: 'e-rte-upload-text' + ' ' + this.parent.cssClass, innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
1627
1628
|
});
|
|
1628
1629
|
span.appendChild(spanMsg);
|
|
1629
1630
|
var btnEle = this.parent.createElement('button', {
|
|
1630
|
-
className: 'e-browsebtn', id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
1631
|
+
className: 'e-browsebtn' + ' ' + this.parent.cssClass, id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
1631
1632
|
});
|
|
1632
1633
|
span.appendChild(btnEle);
|
|
1633
1634
|
uploadParentEle.appendChild(span);
|
|
@@ -1639,7 +1640,7 @@ var Image = /** @class */ (function () {
|
|
|
1639
1640
|
var btnClick = (Browser.isDevice) ? span : btnEle;
|
|
1640
1641
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
1641
1642
|
var uploadEle = this.parent.createElement('input', {
|
|
1642
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }
|
|
1643
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.cssClass
|
|
1643
1644
|
});
|
|
1644
1645
|
uploadParentEle.appendChild(uploadEle);
|
|
1645
1646
|
var altText;
|