@syncfusion/ej2-richtexteditor 19.3.55 → 19.4.47
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +41 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +27 -0
- package/CHANGELOG.md +37 -1
- package/README.md +1 -1
- 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 +250 -100
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +249 -99
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/editor-manager/plugin/inserthtml.js +9 -1
- package/src/editor-manager/plugin/lists.js +4 -2
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +54 -20
- package/src/editor-manager/plugin/selection-commands.js +10 -5
- package/src/editor-manager/plugin/undo.js +10 -1
- package/src/rich-text-editor/actions/color-picker.d.ts +1 -0
- package/src/rich-text-editor/actions/color-picker.js +2 -1
- package/src/rich-text-editor/actions/dropdown-buttons.js +0 -10
- package/src/rich-text-editor/actions/enter-key.d.ts +1 -0
- package/src/rich-text-editor/actions/enter-key.js +90 -37
- package/src/rich-text-editor/actions/html-editor.js +4 -3
- package/src/rich-text-editor/actions/quick-toolbar.js +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +3 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -1
- package/src/rich-text-editor/base/rich-text-editor.js +2 -2
- package/src/rich-text-editor/formatter/formatter.js +3 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +53 -7
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +1 -1
- package/src/rich-text-editor/renderer/toolbar-renderer.js +3 -2
- package/src/selection/selection.js +2 -1
- package/styles/rich-text-editor/_fluent-definition.scss +168 -0
- package/styles/rich-text-editor/_layout.scss +1 -1
- package/styles/rich-text-editor/icons/_fluent.scss +303 -0
|
@@ -169,7 +169,7 @@ export interface IRenderer {
|
|
|
169
169
|
renderPopup?(args: BaseQuickToolbar): void;
|
|
170
170
|
renderDropDownButton?(args: DropDownItemModel): DropDownButton;
|
|
171
171
|
renderColorPicker?(args: IColorPickerModel, item?: string): ColorPicker;
|
|
172
|
-
renderColorPickerDropDown?(args?: IColorPickerModel, item?: string, colorPicker?: ColorPicker): DropDownButton;
|
|
172
|
+
renderColorPickerDropDown?(args?: IColorPickerModel, item?: string, colorPicker?: ColorPicker, defaultColor?: string): DropDownButton;
|
|
173
173
|
renderListDropDown?(args: IDropDownModel): DropDownButton;
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
@@ -576,6 +576,8 @@ export interface ActionBeginEventArgs {
|
|
|
576
576
|
originalEvent?: MouseEvent | KeyboardEvent;
|
|
577
577
|
/** Defines the event name. */
|
|
578
578
|
name?: string;
|
|
579
|
+
/** Defines the selection type is dropdown. */
|
|
580
|
+
selectType?: string;
|
|
579
581
|
/**
|
|
580
582
|
* Defines the url action details.
|
|
581
583
|
*
|
|
@@ -78,7 +78,7 @@ export interface RichTextEditorModel extends ComponentModel{
|
|
|
78
78
|
* allowedStyleProps: ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius',
|
|
79
79
|
* 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor',
|
|
80
80
|
* 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style',
|
|
81
|
-
* 'height', 'left', 'line-height', 'margin', 'margin-top', 'margin-left',
|
|
81
|
+
* 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left',
|
|
82
82
|
* 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width',
|
|
83
83
|
* 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right',
|
|
84
84
|
* 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent',
|
|
@@ -230,7 +230,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
|
|
|
230
230
|
* allowedStyleProps: ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius',
|
|
231
231
|
* 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor',
|
|
232
232
|
* 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style',
|
|
233
|
-
* 'height', 'left', 'line-height', 'margin', 'margin-top', 'margin-left',
|
|
233
|
+
* 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left',
|
|
234
234
|
* 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width',
|
|
235
235
|
* 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right',
|
|
236
236
|
* 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent',
|
|
@@ -1431,7 +1431,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1431
1431
|
this.setProperties({ value: this.valueTemplate });
|
|
1432
1432
|
}
|
|
1433
1433
|
else {
|
|
1434
|
-
var compiledTemplate = compile(this.valueTemplate)(
|
|
1434
|
+
var compiledTemplate = compile(this.valueTemplate)("", this, 'valueTemplate');
|
|
1435
1435
|
for (var i = 0; i < compiledTemplate.length; i++) {
|
|
1436
1436
|
var item = compiledTemplate[i];
|
|
1437
1437
|
append([item], this.element);
|
|
@@ -1826,7 +1826,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1826
1826
|
this.isRTE = false;
|
|
1827
1827
|
}
|
|
1828
1828
|
this.notify(events.docClick, { args: e });
|
|
1829
|
-
if (e.detail > 3) {
|
|
1829
|
+
if (Browser.info.name !== 'msie' && e.detail > 3) {
|
|
1830
1830
|
e.preventDefault();
|
|
1831
1831
|
}
|
|
1832
1832
|
};
|
|
@@ -88,7 +88,7 @@ var Formatter = /** @class */ (function () {
|
|
|
88
88
|
|| ((args.item.subCommand === 'FontName' || args.item.subCommand === 'FontSize') && args.name === 'dropDownSelect')
|
|
89
89
|
|| ((args.item.subCommand === 'BackgroundColor' || args.item.subCommand === 'FontColor')
|
|
90
90
|
&& args.name === 'colorPickerChanged'))) {
|
|
91
|
-
extend(args, args, { requestType: args.item.subCommand, cancel: false, itemCollection: value }, true);
|
|
91
|
+
extend(args, args, { requestType: args.item.subCommand, cancel: false, itemCollection: value, selectType: args.name }, true);
|
|
92
92
|
self.trigger(CONSTANT.actionBegin, args, function (actionBeginArgs) {
|
|
93
93
|
if (!actionBeginArgs.cancel) {
|
|
94
94
|
if (_this.getUndoRedoStack().length === 0 && actionBeginArgs.item.command !== 'Links'
|
|
@@ -106,8 +106,8 @@ var Formatter = /** @class */ (function () {
|
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
108
108
|
_this.editorManager.observer.notify(CONSTANT.checkUndo, { subCommand: actionBeginArgs.item.subCommand });
|
|
109
|
-
_this.editorManager.execCommand(actionBeginArgs.item.command, actionBeginArgs.item.subCommand, event, _this.onSuccess.bind(_this, self), actionBeginArgs.item.value, actionBeginArgs.item.subCommand === 'Pre' &&
|
|
110
|
-
{ name:
|
|
109
|
+
_this.editorManager.execCommand(actionBeginArgs.item.command, actionBeginArgs.item.subCommand, event, _this.onSuccess.bind(_this, self), actionBeginArgs.item.value, actionBeginArgs.item.subCommand === 'Pre' && actionBeginArgs.selectType === 'dropDownSelect' ?
|
|
110
|
+
{ name: actionBeginArgs.selectType } : value, ('#' + self.getID() + ' iframe'), self.enterKey);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
});
|
|
@@ -429,7 +429,7 @@ export interface PasteCleanupSettingsModel {
|
|
|
429
429
|
/**
|
|
430
430
|
* Specifies the allowed style properties when pasting in RichTextEditor.
|
|
431
431
|
*
|
|
432
|
-
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
432
|
+
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
433
433
|
*/
|
|
434
434
|
allowedStyleProps?: string[];
|
|
435
435
|
|
|
@@ -374,7 +374,7 @@ export declare class PasteCleanupSettings extends ChildProperty<PasteCleanupSett
|
|
|
374
374
|
/**
|
|
375
375
|
* Specifies the allowed style properties when pasting in RichTextEditor.
|
|
376
376
|
*
|
|
377
|
-
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
377
|
+
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
378
378
|
*/
|
|
379
379
|
allowedStyleProps: string[];
|
|
380
380
|
/**
|
|
@@ -236,7 +236,7 @@ var PasteCleanupSettings = /** @class */ (function (_super) {
|
|
|
236
236
|
Property(null)
|
|
237
237
|
], PasteCleanupSettings.prototype, "deniedAttrs", void 0);
|
|
238
238
|
__decorate([
|
|
239
|
-
Property(['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width'])
|
|
239
|
+
Property(['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width'])
|
|
240
240
|
], PasteCleanupSettings.prototype, "allowedStyleProps", void 0);
|
|
241
241
|
__decorate([
|
|
242
242
|
Property(null)
|
|
@@ -304,7 +304,7 @@ var Image = /** @class */ (function () {
|
|
|
304
304
|
left: elem.offsetLeft
|
|
305
305
|
};
|
|
306
306
|
};
|
|
307
|
-
Image.prototype.setAspectRatio = function (img, expectedX, expectedY) {
|
|
307
|
+
Image.prototype.setAspectRatio = function (img, expectedX, expectedY, e) {
|
|
308
308
|
if (isNullOrUndefined(img.width)) {
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
@@ -328,10 +328,14 @@ var Image = /** @class */ (function () {
|
|
|
328
328
|
img.style.height = expectedY + 'px';
|
|
329
329
|
}
|
|
330
330
|
else if (img.style.width !== '' && img.style.height === '') {
|
|
331
|
-
|
|
331
|
+
var currentWidth = ((width / height * expectedY) + width / height) < (this.parent.inputElement.getBoundingClientRect().right - 32) ?
|
|
332
|
+
((width / height * expectedY) + width / height) : (this.parent.inputElement.getBoundingClientRect().right - 32);
|
|
333
|
+
img.style.width = currentWidth.toString() + 'px';
|
|
332
334
|
}
|
|
333
335
|
else if (img.style.width !== '') {
|
|
334
|
-
|
|
336
|
+
var currentWidth = (width / height * expectedY) < (this.parent.inputElement.getBoundingClientRect().right - 32) ?
|
|
337
|
+
(width / height * expectedY) : (this.parent.inputElement.getBoundingClientRect().right - 32);
|
|
338
|
+
img.style.width = currentWidth + 'px';
|
|
335
339
|
img.style.height = expectedY + 'px';
|
|
336
340
|
}
|
|
337
341
|
else {
|
|
@@ -354,7 +358,7 @@ var Image = /** @class */ (function () {
|
|
|
354
358
|
img.style.height = (height / width * expectedX) + 'px';
|
|
355
359
|
}
|
|
356
360
|
else {
|
|
357
|
-
img.setAttribute('width', expectedX.toString());
|
|
361
|
+
img.setAttribute('width', this.resizeBtnStat.botRight ? (this.getPointX(e.event) - img.getBoundingClientRect().left).toString() : expectedX.toString());
|
|
358
362
|
}
|
|
359
363
|
}
|
|
360
364
|
else {
|
|
@@ -395,7 +399,7 @@ var Image = /** @class */ (function () {
|
|
|
395
399
|
return;
|
|
396
400
|
}
|
|
397
401
|
_this.imgEle.parentElement.style.cursor = 'pointer';
|
|
398
|
-
_this.setAspectRatio(_this.imgEle, parseInt(width, 10), parseInt(height, 10));
|
|
402
|
+
_this.setAspectRatio(_this.imgEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
399
403
|
_this.resizeImgDupPos(_this.imgEle);
|
|
400
404
|
_this.imgResizePos(_this.imgEle, _this.imgResizeDiv);
|
|
401
405
|
_this.parent.setContentHeight('', false);
|
|
@@ -440,7 +444,8 @@ var Image = /** @class */ (function () {
|
|
|
440
444
|
};
|
|
441
445
|
Image.prototype.resizeImgDupPos = function (e) {
|
|
442
446
|
this.imgDupPos = {
|
|
443
|
-
width: (e.style.
|
|
447
|
+
width: (e.style.width !== '' && (this.parent.insertImageSettings &&
|
|
448
|
+
!this.parent.insertImageSettings.resizeByPercent)) ? this.imgEle.style.width : e.width + 'px',
|
|
444
449
|
height: (e.style.height !== '') ? this.imgEle.style.height : e.height + 'px'
|
|
445
450
|
};
|
|
446
451
|
};
|
|
@@ -608,6 +613,27 @@ var Image = /** @class */ (function () {
|
|
|
608
613
|
var src = this.deletedImg[i].src;
|
|
609
614
|
this.imageRemovePost(src);
|
|
610
615
|
}
|
|
616
|
+
if (range.startContainer.nodeType === 3) {
|
|
617
|
+
if (originalEvent.code === 'Backspace') {
|
|
618
|
+
if (range.startContainer.previousElementSibling && range.startOffset === 0 &&
|
|
619
|
+
range.startContainer.previousElementSibling.classList.contains(classes.CLS_CAPTION) &&
|
|
620
|
+
range.startContainer.previousElementSibling.classList.contains(classes.CLS_CAPINLINE)) {
|
|
621
|
+
detach(range.startContainer.previousElementSibling);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
if (range.startContainer.nextElementSibling &&
|
|
626
|
+
range.endContainer.textContent.length === range.endOffset &&
|
|
627
|
+
range.startContainer.nextElementSibling.classList.contains(classes.CLS_CAPTION) &&
|
|
628
|
+
range.startContainer.nextElementSibling.classList.contains(classes.CLS_CAPINLINE)) {
|
|
629
|
+
detach(range.startContainer.nextElementSibling);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
else if ((range.startContainer.nodeType === 1 &&
|
|
634
|
+
range.startContainer.querySelector('.' + classes.CLS_CAPTION + '.' + classes.CLS_CAPINLINE))) {
|
|
635
|
+
detach(range.startContainer.querySelector('.' + classes.CLS_CAPTION + '.' + classes.CLS_CAPINLINE));
|
|
636
|
+
}
|
|
611
637
|
break;
|
|
612
638
|
case 'insert-image':
|
|
613
639
|
this.openDialog(true, originalEvent, save, selectNodeEle, selectParentEle);
|
|
@@ -813,7 +839,7 @@ var Image = /** @class */ (function () {
|
|
|
813
839
|
var target = args.target;
|
|
814
840
|
this.contentModule = this.rendererFactory.getRenderer(RenderType.Content);
|
|
815
841
|
var isPopupOpen = this.quickToolObj.imageQTBar.element.classList.contains('e-rte-pop');
|
|
816
|
-
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule
|
|
842
|
+
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule) {
|
|
817
843
|
if (isPopupOpen) {
|
|
818
844
|
return;
|
|
819
845
|
}
|
|
@@ -1054,6 +1080,9 @@ var Image = /** @class */ (function () {
|
|
|
1054
1080
|
Image.prototype.imageRemovePost = function (src) {
|
|
1055
1081
|
var proxy = this;
|
|
1056
1082
|
var absoluteUrl = '';
|
|
1083
|
+
if (isNOU(this.parent.insertImageSettings.removeUrl) || this.parent.insertImageSettings.removeUrl === '') {
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1057
1086
|
if (src.indexOf('http://') > -1 || src.indexOf('https://') > -1) {
|
|
1058
1087
|
absoluteUrl = src;
|
|
1059
1088
|
}
|
|
@@ -1899,6 +1928,7 @@ var Image = /** @class */ (function () {
|
|
|
1899
1928
|
imageTag.addEventListener('load', function () {
|
|
1900
1929
|
_this.parent.trigger(events.actionComplete, e);
|
|
1901
1930
|
});
|
|
1931
|
+
detach(parentElement);
|
|
1902
1932
|
};
|
|
1903
1933
|
/**
|
|
1904
1934
|
* Rendering uploader and popup for drag and drop
|
|
@@ -1934,6 +1964,9 @@ var Image = /** @class */ (function () {
|
|
|
1934
1964
|
_this.popupObj.destroy();
|
|
1935
1965
|
detach(_this.popupObj.element);
|
|
1936
1966
|
_this.popupObj = null;
|
|
1967
|
+
if (!_this.parent.inlineMode.enable) {
|
|
1968
|
+
_this.parent.toolbarModule.baseToolbar.toolbarObj.disable(false);
|
|
1969
|
+
}
|
|
1937
1970
|
}
|
|
1938
1971
|
});
|
|
1939
1972
|
this.popupObj.element.style.display = 'none';
|
|
@@ -1965,6 +1998,10 @@ var Image = /** @class */ (function () {
|
|
|
1965
1998
|
isUploading = false;
|
|
1966
1999
|
detach(imageElement);
|
|
1967
2000
|
_this.popupObj.close();
|
|
2001
|
+
_this.quickToolObj.imageQTBar.hidePopup();
|
|
2002
|
+
setTimeout(function () {
|
|
2003
|
+
_this.uploadObj.destroy();
|
|
2004
|
+
}, 900);
|
|
1968
2005
|
},
|
|
1969
2006
|
beforeUpload: function (args) {
|
|
1970
2007
|
if (_this.parent.isServerRendered) {
|
|
@@ -1976,6 +2013,9 @@ var Image = /** @class */ (function () {
|
|
|
1976
2013
|
if (beforeUploadArgs.cancel) {
|
|
1977
2014
|
return;
|
|
1978
2015
|
}
|
|
2016
|
+
if (!_this.parent.inlineMode.enable) {
|
|
2017
|
+
_this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
2018
|
+
}
|
|
1979
2019
|
/* eslint-disable */
|
|
1980
2020
|
_this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
1981
2021
|
beforeUploadArgs.currentRequest : _this.uploadObj.currentRequestHeader;
|
|
@@ -1988,6 +2028,9 @@ var Image = /** @class */ (function () {
|
|
|
1988
2028
|
}
|
|
1989
2029
|
else {
|
|
1990
2030
|
_this.parent.trigger(events.beforeImageUpload, args);
|
|
2031
|
+
if (!_this.parent.inlineMode.enable) {
|
|
2032
|
+
_this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
2033
|
+
}
|
|
1991
2034
|
}
|
|
1992
2035
|
},
|
|
1993
2036
|
uploading: function (e) {
|
|
@@ -2030,6 +2073,9 @@ var Image = /** @class */ (function () {
|
|
|
2030
2073
|
}, 900);
|
|
2031
2074
|
},
|
|
2032
2075
|
success: function (e) {
|
|
2076
|
+
if (e.operation === "cancel") {
|
|
2077
|
+
return;
|
|
2078
|
+
}
|
|
2033
2079
|
isUploading = false;
|
|
2034
2080
|
_this.parent.inputElement.contentEditable = 'true';
|
|
2035
2081
|
var args = {
|
|
@@ -71,7 +71,7 @@ export declare class ToolbarRenderer implements IRenderer {
|
|
|
71
71
|
* @hidden
|
|
72
72
|
|
|
73
73
|
*/
|
|
74
|
-
renderColorPickerDropDown(args: IColorPickerModel, item: string, colorPicker: ColorPicker): DropDownButton;
|
|
74
|
+
renderColorPickerDropDown(args: IColorPickerModel, item: string, colorPicker: ColorPicker, defaultColor: string): DropDownButton;
|
|
75
75
|
private pickerRefresh;
|
|
76
76
|
private popupModal;
|
|
77
77
|
private setColorPickerContentWidth;
|
|
@@ -289,7 +289,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
289
289
|
* @hidden
|
|
290
290
|
|
|
291
291
|
*/
|
|
292
|
-
ToolbarRenderer.prototype.renderColorPickerDropDown = function (args, item, colorPicker) {
|
|
292
|
+
ToolbarRenderer.prototype.renderColorPickerDropDown = function (args, item, colorPicker, defaultColor) {
|
|
293
293
|
var _this = this;
|
|
294
294
|
// eslint-disable-next-line
|
|
295
295
|
var proxy = this;
|
|
@@ -298,8 +298,9 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
298
298
|
var content = proxy.parent.createElement('span', { className: CLS_COLOR_CONTENT });
|
|
299
299
|
var inlineEle = proxy.parent.createElement('span', { className: args.cssClass });
|
|
300
300
|
var range;
|
|
301
|
+
var initialBackgroundColor = (isNullOrUndefined(defaultColor)) ? proxy.parent.backgroundColor.default : defaultColor;
|
|
301
302
|
inlineEle.style.borderBottomColor = (item === 'backgroundcolor') ?
|
|
302
|
-
|
|
303
|
+
initialBackgroundColor : proxy.parent.fontColor.default;
|
|
303
304
|
content.appendChild(inlineEle);
|
|
304
305
|
var dropDown = new DropDownButton({
|
|
305
306
|
target: colorPicker.element.parentElement, cssClass: css,
|
|
@@ -116,7 +116,8 @@ var NodeSelection = /** @class */ (function () {
|
|
|
116
116
|
|| range.startContainer;
|
|
117
117
|
var endNode = range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) : range.endOffset]
|
|
118
118
|
|| range.endContainer;
|
|
119
|
-
if (startNode === endNode && startNode.childNodes.
|
|
119
|
+
if ((startNode === endNode || (startNode.nodeName === 'BR' && startNode === range.endContainer.childNodes[range.endOffset])) &&
|
|
120
|
+
startNode.childNodes.length === 0) {
|
|
120
121
|
return [startNode];
|
|
121
122
|
}
|
|
122
123
|
if (range.startOffset === range.endOffset && range.startOffset !== 0 && range.startContainer.nodeName === 'PRE') {
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
$skin-name: 'FluentUI' !default;
|
|
2
|
+
//Layout Variables Start
|
|
3
|
+
$rte-border-size: 1px !default;
|
|
4
|
+
$rte-2px-border-size: 2px !default;
|
|
5
|
+
$rte-border-type: solid !default;
|
|
6
|
+
$rte-list-btn-flex: column !default;
|
|
7
|
+
$rte-list-btn-line-height: 1 !default;
|
|
8
|
+
$rte-split-btn-line-height: 41px !default;
|
|
9
|
+
$rte-big-split-btn-line-height: 50px !default;
|
|
10
|
+
$rte-big-quick-item-btn-width: 39px !default;
|
|
11
|
+
$rte-quick-item-btn-width: 27px !default;
|
|
12
|
+
$rte-big-quick-item-btn-height: 34px !default;
|
|
13
|
+
$rte-quick-item-btn-height: 26px !default;
|
|
14
|
+
$rte-big-quick-item-padding: 0 !default;
|
|
15
|
+
$rte-quick-item-padding: 0 !default;
|
|
16
|
+
$rte-quick-item-icon-min-width: 20px !default;
|
|
17
|
+
$rte-big-quick-item-line-height: $leading-normal !default;
|
|
18
|
+
$rte-content-padding: 24px !default;
|
|
19
|
+
$rte-toolbar-icon-size: $text-base !default;
|
|
20
|
+
$rte-toolbar-big-icon-size: $text-lg !default;
|
|
21
|
+
$rte-big-quick-drop-btn-line-height: 33px !default;
|
|
22
|
+
$rte-quick-drop-btn-line-height: 24px !default;
|
|
23
|
+
$rte-big-quick-drop-btn-margin: 4px 0 !default;
|
|
24
|
+
$rte-quick-drop-btn-margin: 4px 0 !default;
|
|
25
|
+
$rte-big-quick-drop-btn-padding: 0 !default;
|
|
26
|
+
$rte-quick-drop-btn-padding: 1px 0 !default;
|
|
27
|
+
$rte-big-quick-drop-btn-icon-size: 16px !default;
|
|
28
|
+
$rte-quick-drop-btn-icon-size: 14px !default;
|
|
29
|
+
$rte-big-quick-drop-btn-caret-icon-size: 10px !default;
|
|
30
|
+
$rte-quick-drop-btn-caret-icon-size: 12px !default;
|
|
31
|
+
$rte-big-quick-drop-btn-caret-font-size: 12px !default;
|
|
32
|
+
$rte-quick-drop-btn-caret-font-size: 10px !default;
|
|
33
|
+
$rte-big-tb-items-margin-left: 8px !default;
|
|
34
|
+
$rte-tb-items-margin-left: 8px !default;
|
|
35
|
+
$rte-big-tb-items-padding-left: 8px !default;
|
|
36
|
+
$rte-tb-items-padding-left: 8px !default;
|
|
37
|
+
$rte-active-tb-item-btn-padding: 0 !default;
|
|
38
|
+
$rte-split-btn-bar-size: 0 !default;
|
|
39
|
+
$rte-split-btn-active-color-icon-line-height: 30px !default;
|
|
40
|
+
$rte-big-split-btn-active-color-icon-line-height: 37px !default;
|
|
41
|
+
$rte-format-btn-min-width: 72px !default;
|
|
42
|
+
$rte-font-name-btn-min-width: 0 !default;
|
|
43
|
+
$rte-font-size-btn-min-width: 37px !default;
|
|
44
|
+
$rte-drop-btn-padding-left: 7px !default;
|
|
45
|
+
$dropdown-btn-font-size: $text-sm;
|
|
46
|
+
$dropdown-btn-big-font-size: $text-base;
|
|
47
|
+
$rte-drop-btn-padding-right: 7px !default;
|
|
48
|
+
$rte-drop-btn-action-padding-left: 7px !default;
|
|
49
|
+
$rte-drop-btn-action-padding-right: 7px !default;
|
|
50
|
+
$rte-big-drop-btn-padding-left: 10px !default;
|
|
51
|
+
$rte-big-drop-btn-padding-right: 6px !default;
|
|
52
|
+
$rte-big-drop-btn-action-padding-left: 10px !default;
|
|
53
|
+
$rte-big-drop-btn-action-padding-right: 6px !default;
|
|
54
|
+
$rte-colorpicker-parent-padding: 0 !default;
|
|
55
|
+
$rte-colorpicker-parent-padding-hover: 0 !default;
|
|
56
|
+
$rte-colorpicker-parent-padding-active-hover: 0 !default;
|
|
57
|
+
$rte-font-icon-width: 30px !default;
|
|
58
|
+
$rte-font-arrow-width: 18px !default;
|
|
59
|
+
$rte-font-arrow-touch-width: 20px !default;
|
|
60
|
+
$rte-font-icon-line-height: $leading-tight !default;
|
|
61
|
+
$rte-placeholder-line-height: $leading-normal !default;
|
|
62
|
+
$rte-big-active-tb-item-btn-padding: 0 6px !default;
|
|
63
|
+
$rte-table-popup-padding: 10px !default;
|
|
64
|
+
$rte-insert-dialog-label-padding-top: 12px !default;
|
|
65
|
+
$rte-insert-dialog-label-padding-bottom: 12px !default;
|
|
66
|
+
$rte-big-quick-tbar-item-min-height: 34px !default;
|
|
67
|
+
$rte-big-quick-tbar-item-min-width: 39px !default;
|
|
68
|
+
$rte-content-font-size: $text-sm !default;
|
|
69
|
+
$rte-dropdown-caret-icon-size: $text-xs !default;
|
|
70
|
+
$rte-big-dropdown-caret-icon-size: $text-sm !default;
|
|
71
|
+
$font-weight: $font-weight-normal !default;
|
|
72
|
+
$rte-table-popup-bdr-radius: 0 !default;
|
|
73
|
+
$rte-resize-handler-width: 15px;
|
|
74
|
+
$rte-resize-handler-height: 15px;
|
|
75
|
+
$rte-resize-handler-position: 0;
|
|
76
|
+
$rte-big-inline-tmp-min-width: 48px;
|
|
77
|
+
$rte-inline-tmp-min-width: 55px;
|
|
78
|
+
$rte-big-inline-tmp-size-min-width: 59px;
|
|
79
|
+
$rte-inline-tmp-size-min-width: 66px;
|
|
80
|
+
$rte-big-inline-tmp-color-min-width: 50px;
|
|
81
|
+
$rte-inline-tmp-color-min-width: 55px;
|
|
82
|
+
$rte-big-color-list-span-common-padding-left-right: 0;
|
|
83
|
+
//Layout Variables End
|
|
84
|
+
|
|
85
|
+
//Theme Variables Start
|
|
86
|
+
$rte-split-btn-active-border: 0 !default;
|
|
87
|
+
$rte-border-color: $border-light !default;
|
|
88
|
+
$rte-content-bg: $content-bg-color !default;
|
|
89
|
+
$rte-full-screen-bg: $content-bg-color !default;
|
|
90
|
+
$rte-content-font-color: $content-text-color !default;
|
|
91
|
+
$rte-item-color: $icon-color !default;
|
|
92
|
+
$rte-icons-color: $icon-color !default;
|
|
93
|
+
$rte-img-popup-border: 1px solid $border-light !default;
|
|
94
|
+
$rte-img-popup-box-shadow: $shadow-lg !default;
|
|
95
|
+
$rte-img-popup-color: $border-light !default;
|
|
96
|
+
$rte-quick-item-active-bg: $content-bg-color-alt5 !default;
|
|
97
|
+
$rte-quick-item-active-font-color: $icon-color !default;
|
|
98
|
+
$rte-quick-item-border: 0 !default;
|
|
99
|
+
$rte-quick-item-hover-border-color: $content-bg-color-alt4 !default;
|
|
100
|
+
$rte-quick-item-active-border-color: $secondary-border-color-pressed !default;
|
|
101
|
+
$rte-quick-drop-btn-border-color: $content-bg-color-alt2 !default;
|
|
102
|
+
$rte-quick-drop-btn-hover-border-color: $content-bg-color-alt4 !default;
|
|
103
|
+
$rte-extended-toolbar-background: $content-bg-color-alt2 !default;
|
|
104
|
+
$rte-quick-pop-border: none !default;
|
|
105
|
+
$rte-quick-tb-border: 1px solid $border-light !default;
|
|
106
|
+
$rte-quick-pop-bg: $content-bg-color-alt2 !default;
|
|
107
|
+
$rte-quick-vr-line-color: $border-light !default;
|
|
108
|
+
$rte-quick-pop-shadow: $shadow-sm !default;
|
|
109
|
+
$rte-quick-pop-item-focus-bg: $content-bg-color-alt4 !default;
|
|
110
|
+
$rte-quick-tb-btn-hover: $content-bg-color-alt4 !default;
|
|
111
|
+
$rte-tb-item-active-bg: $content-bg-color-alt5 !default;
|
|
112
|
+
$rte-tb-active-font-color: $icon-color !default;
|
|
113
|
+
$rte-tb-item-active-border: 1px solid $secondary-border-color-pressed !default;
|
|
114
|
+
$rte-expand-tb-border-bottom: $rte-border-size $rte-border-type $border-light !default;
|
|
115
|
+
$rte-color-picker-active-bg: inherit !default;
|
|
116
|
+
$rte-drop-btn-active-bg: $secondary-bg-color-pressed !default;
|
|
117
|
+
$rte-drop-btn-active-color: $icon-color !default;
|
|
118
|
+
$rte-drop-btn-active-border-color: $secondary-border-color-pressed !default;
|
|
119
|
+
$rte-split-btn-active-hover-font-color: $icon-color !default;
|
|
120
|
+
$rte-split-btn-color: $secondary-bg-color-pressed !default;
|
|
121
|
+
$rte-split-btn-active-color: $icon-color !default;
|
|
122
|
+
$rte-split-btn-hover-bg: $content-bg-color-alt3 !default;
|
|
123
|
+
$rte-split-btn-active-bg: $content-bg-color-alt5 !default;
|
|
124
|
+
$rte-split-btn-span-hover-bg: $content-bg-color-alt3 !default;
|
|
125
|
+
$rte-split-btn-span-focus-bg: $content-bg-color-alt3 !default;
|
|
126
|
+
$rte-split-btn-span-active-bg: $content-bg-color-alt5 !default;
|
|
127
|
+
$rte-split-btn-bar-bg: $content-bg-color !default;
|
|
128
|
+
$rte-split-btn-active-bar-bg: $content-bg-color !default;
|
|
129
|
+
$rte-split-btn-bar-size: 0 !default;
|
|
130
|
+
$rte-split-btn-active-border: 0 !default;
|
|
131
|
+
$rte-split-btn-active-color-icon-line-height: 30px !default;
|
|
132
|
+
$rte-big-split-btn-active-color-icon-line-height: 38px !default;
|
|
133
|
+
|
|
134
|
+
$rte-link-valid-color: $danger !default;
|
|
135
|
+
$rte-upload-drag-border-clr: $border-dark !default;
|
|
136
|
+
$rte-img-header-clr: $content-text-color !default;
|
|
137
|
+
$rte-drop-text-clr: $content-text-color-alt2 !default;
|
|
138
|
+
$rte-default-character-count-color: $content-text-color-disabled !default;
|
|
139
|
+
$rte-warning-character-count-color: $warning !default;
|
|
140
|
+
$rte-error-character-count-color: $danger !default;
|
|
141
|
+
$rte-img-border: dashed 2px $primary !default;
|
|
142
|
+
$rte-font-family: $font-family !default;
|
|
143
|
+
$rte-content-color: $content-text-color !default;
|
|
144
|
+
$rte-content-blockquote-border-left-color: solid 2px $content-text-color !default;
|
|
145
|
+
$rte-dropdown-selection-bgcolor: $secondary-bg-color-pressed !default;
|
|
146
|
+
$rte-ext-tbar-overlay-icons-color: $icon-color-disabled !default;
|
|
147
|
+
$rte-overlay-color: $overlay-bg-color !default;
|
|
148
|
+
$rte-dropdown-selection-color: $secondary-text-color-pressed !default;
|
|
149
|
+
$rte-anchor-color: $primary !default;
|
|
150
|
+
$rte-ext-tbar-overlay-dropdown-color: $content-bg-color-alt4 !default;
|
|
151
|
+
$rte-img-resize-back-color: $primary !default;
|
|
152
|
+
$rte-img-resize-color: $primary-text-color !default;
|
|
153
|
+
$rte-table-header-color: $content-text-color-alt2 !default;
|
|
154
|
+
$rte-table-span-bg-color: $flyout-bg-color !default;
|
|
155
|
+
$rte-table-span-border: 1px solid $flyout-border !default;
|
|
156
|
+
$rte-table-span-active-bg-color: $primary-lighter !default;
|
|
157
|
+
$rte-table-span-active-border-color: $primary !default;
|
|
158
|
+
$rte-table-select-border-color: $primary !default;
|
|
159
|
+
$rte-table-popup-bg: $flyout-bg-color !default;
|
|
160
|
+
$rte-table-popup-color: $flyout-border !default;
|
|
161
|
+
$rte-table-popup-box: $shadow-lg !default;
|
|
162
|
+
$rte-table-border-color: $border-light !default;
|
|
163
|
+
$rte-table-alternate-color: $content-bg-color-alt1 !default;
|
|
164
|
+
$rte-table-header-bg: $content-bg-color-alt1 !default;
|
|
165
|
+
//Theme Variables End
|
|
166
|
+
|
|
167
|
+
$rte-tb-hover-font-color: $secondary-text-color-hover;
|
|
168
|
+
$transparent: $transparent;
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.e-rte-dropdown-btn-text {
|
|
197
|
-
@if $skin-name == 'tailwind' or $skin-name == 'bootstrap5' {
|
|
197
|
+
@if $skin-name == 'tailwind' or $skin-name == 'bootstrap5' or $skin-name == 'FluentUI' {
|
|
198
198
|
font-size: $dropdown-btn-font-size;
|
|
199
199
|
}
|
|
200
200
|
font-weight: $font-weight;
|