@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.43
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 +35 -1
- package/dist/ej2-richtexteditor.min.js +2 -2
- 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 +574 -309
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +573 -308
- 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 +13 -13
- package/src/common/config.js +1 -1
- package/src/editor-manager/plugin/audio.js +13 -3
- package/src/editor-manager/plugin/dom-node.js +1 -14
- package/src/editor-manager/plugin/image.js +30 -3
- package/src/editor-manager/plugin/inserthtml.js +5 -2
- package/src/editor-manager/plugin/ms-word-clean-up.js +4 -1
- package/src/editor-manager/plugin/nodecutter.js +1 -1
- package/src/editor-manager/plugin/selection-commands.js +39 -0
- package/src/rich-text-editor/actions/base-quick-toolbar.js +18 -4
- package/src/rich-text-editor/actions/color-picker.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.js +4 -2
- package/src/rich-text-editor/actions/emoji-picker.js +12 -3
- package/src/rich-text-editor/actions/enter-key.js +2 -1
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.js +2 -2
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +36 -5
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +75 -19
- package/src/rich-text-editor/actions/quick-toolbar.js +24 -5
- package/src/rich-text-editor/actions/toolbar.d.ts +1 -0
- package/src/rich-text-editor/actions/toolbar.js +18 -10
- 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 +6 -1
- package/src/rich-text-editor/base/constant.js +6 -1
- package/src/rich-text-editor/base/interface.d.ts +11 -0
- 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 +9 -0
- package/src/rich-text-editor/base/rich-text-editor.js +80 -17
- package/src/rich-text-editor/base/util.js +11 -2
- package/src/rich-text-editor/formatter/formatter.js +1 -1
- package/src/rich-text-editor/models/default-locale.js +2 -0
- package/src/rich-text-editor/models/items.js +1 -1
- package/src/rich-text-editor/renderer/dialog-renderer.js +10 -1
- package/src/rich-text-editor/renderer/image-module.js +68 -59
- package/src/rich-text-editor/renderer/link-module.js +43 -23
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +43 -30
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +0 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.js +13 -93
- package/src/rich-text-editor/renderer/view-source.js +3 -1
- package/styles/bootstrap-dark.css +194 -52
- package/styles/bootstrap.css +197 -53
- package/styles/bootstrap4.css +194 -52
- package/styles/bootstrap5-dark.css +195 -53
- package/styles/bootstrap5.css +195 -53
- package/styles/fabric-dark.css +194 -52
- package/styles/fabric.css +194 -52
- package/styles/fluent-dark.css +197 -53
- package/styles/fluent.css +197 -53
- package/styles/highcontrast-light.css +194 -52
- package/styles/highcontrast.css +194 -52
- package/styles/material-dark.css +196 -53
- package/styles/material.css +196 -53
- package/styles/material3-dark.css +194 -52
- package/styles/material3.css +194 -52
- package/styles/rich-text-editor/_bootstrap5-definition.scss +1 -1
- package/styles/rich-text-editor/_fluent-definition.scss +1 -1
- package/styles/rich-text-editor/_layout.scss +78 -3
- package/styles/rich-text-editor/_theme.scss +1 -1
- package/styles/rich-text-editor/bootstrap-dark.css +194 -52
- package/styles/rich-text-editor/bootstrap.css +197 -53
- package/styles/rich-text-editor/bootstrap4.css +194 -52
- package/styles/rich-text-editor/bootstrap5-dark.css +195 -53
- package/styles/rich-text-editor/bootstrap5.css +195 -53
- package/styles/rich-text-editor/fabric-dark.css +194 -52
- package/styles/rich-text-editor/fabric.css +194 -52
- package/styles/rich-text-editor/fluent-dark.css +197 -53
- package/styles/rich-text-editor/fluent.css +197 -53
- package/styles/rich-text-editor/highcontrast-light.css +194 -52
- package/styles/rich-text-editor/highcontrast.css +194 -52
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +3 -3
- package/styles/rich-text-editor/icons/_bootstrap.scss +3 -3
- package/styles/rich-text-editor/icons/_bootstrap4.scss +3 -3
- package/styles/rich-text-editor/icons/_bootstrap5.scss +3 -3
- package/styles/rich-text-editor/icons/_fabric-dark.scss +3 -3
- package/styles/rich-text-editor/icons/_fabric.scss +3 -3
- package/styles/rich-text-editor/icons/_fluent.scss +3 -3
- package/styles/rich-text-editor/icons/_fusionnew.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast.scss +3 -3
- package/styles/rich-text-editor/icons/_material-dark.scss +3 -3
- package/styles/rich-text-editor/icons/_material.scss +3 -3
- package/styles/rich-text-editor/icons/_material3.scss +3 -3
- package/styles/rich-text-editor/icons/_tailwind.scss +3 -3
- package/styles/rich-text-editor/material-dark.css +196 -53
- package/styles/rich-text-editor/material.css +196 -53
- package/styles/rich-text-editor/material3-dark.css +194 -52
- package/styles/rich-text-editor/material3.css +194 -52
- package/styles/rich-text-editor/tailwind-dark.css +194 -52
- package/styles/rich-text-editor/tailwind.css +194 -52
- package/styles/tailwind-dark.css +194 -52
- package/styles/tailwind.css +194 -52
|
@@ -390,7 +390,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
390
390
|
if (tool.command === 'InsertText') {
|
|
391
391
|
currentInsertContentLength = value.length;
|
|
392
392
|
}
|
|
393
|
-
var currentLength = this.getText().trim().length;
|
|
393
|
+
var currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
394
394
|
var selectionLength = this.getSelection().length;
|
|
395
395
|
var totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
396
396
|
if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
|
|
@@ -565,7 +565,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
565
565
|
if (this.enableXhtml) {
|
|
566
566
|
this.setProperties({ value: this.getXhtml() }, true);
|
|
567
567
|
}
|
|
568
|
-
if (this.toolbarSettings.enable && this.toolbarSettings.type === 'Expand' && !isNOU(this.getToolbar()) &&
|
|
568
|
+
if (this.toolbarSettings.enable && (this.toolbarSettings.type === 'Expand' || this.toolbarSettings.type === 'MultiRow' || this.toolbarSettings.type === 'Scrollable') && !isNOU(this.getToolbar()) &&
|
|
569
569
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
570
570
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
571
571
|
}
|
|
@@ -575,7 +575,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
575
575
|
}
|
|
576
576
|
// eslint-disable-next-line
|
|
577
577
|
(this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
|
|
578
|
-
this.notify(events.bindCssClass, { cssClass: this.
|
|
578
|
+
this.notify(events.bindCssClass, { cssClass: this.getCssClass() });
|
|
579
579
|
this.addAudioVideoWrapper();
|
|
580
580
|
this.notify(events.tableclass, {});
|
|
581
581
|
this.renderComplete();
|
|
@@ -666,7 +666,13 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
666
666
|
range.endContainer;
|
|
667
667
|
var closestLI = closest(endNode, 'LI');
|
|
668
668
|
var isDetached = false;
|
|
669
|
-
|
|
669
|
+
var currentRangeEndOffset = range.endOffset;
|
|
670
|
+
if (currentEndContainer.nodeType === Node.TEXT_NODE) {
|
|
671
|
+
if (currentEndContainer.textContent.charAt(currentRangeEndOffset - 1) === '\uFEFF') {
|
|
672
|
+
currentRangeEndOffset--;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
if (!isNOU(closestLI) && endNode.textContent.trim().length === currentRangeEndOffset &&
|
|
670
676
|
!range.collapsed && isNOU(endNode.nextElementSibling)) {
|
|
671
677
|
for (var i = 0; i < closestLI.childNodes.length; i++) {
|
|
672
678
|
if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
@@ -745,7 +751,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
745
751
|
}
|
|
746
752
|
var notFormatPainterCopy = isNOU(e.action) ? true : (e.action !== 'format-copy' ? true : false);
|
|
747
753
|
if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy &&
|
|
748
|
-
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which
|
|
754
|
+
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which == 67))) {
|
|
749
755
|
this.formatter.saveData();
|
|
750
756
|
}
|
|
751
757
|
if (e.action !== 'insert-link' &&
|
|
@@ -814,7 +820,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
814
820
|
this.formatter.onKeyHandler(this, e);
|
|
815
821
|
}
|
|
816
822
|
if (this.inputElement && this.inputElement.textContent.length !== 0
|
|
817
|
-
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0) {
|
|
823
|
+
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0 || this.formatter.getUndoRedoStack().length > 0) {
|
|
818
824
|
this.notify(events.toolbarRefresh, { args: e });
|
|
819
825
|
}
|
|
820
826
|
if (!isNOU(this.placeholder)) {
|
|
@@ -906,20 +912,61 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
906
912
|
return;
|
|
907
913
|
}
|
|
908
914
|
}
|
|
909
|
-
this.notifyMouseUp(e);
|
|
910
915
|
if (e.detail === 3) {
|
|
911
916
|
var range = this.getRange();
|
|
912
917
|
var selection = this.formatter.editorManager.domNode.getSelection();
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
918
|
+
// To handle the triple click node selection improper range due to browser behavior.
|
|
919
|
+
if (selection.rangeCount > 0 && !isNOU(range.startContainer.parentElement) && (!isNOU(range.startContainer.parentElement.nextSibling) &&
|
|
920
|
+
(range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
|
|
921
|
+
/\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
|
|
922
|
+
|| range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
|
|
923
|
+
var newRange = new Range();
|
|
924
|
+
var start = range.startContainer;
|
|
925
|
+
var end = range.endContainer;
|
|
926
|
+
var isInvalid = false;
|
|
927
|
+
var isInsideList = range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL'
|
|
928
|
+
|| range.commonAncestorContainer.nodeName === 'LI';
|
|
929
|
+
if (!isInsideList && end.nodeType === 1 && end.nodeName === 'LI') {
|
|
930
|
+
end = closest(end, 'ol, ul').previousElementSibling.lastElementChild;
|
|
931
|
+
}
|
|
932
|
+
else if (isInsideList && end.nodeType === 1 && range.endOffset === 0) {
|
|
933
|
+
if (end.previousElementSibling && end.previousElementSibling.lastElementChild) {
|
|
934
|
+
end = end.previousElementSibling.lastElementChild;
|
|
935
|
+
}
|
|
936
|
+
else {
|
|
937
|
+
end = closest(end.parentElement, 'li');
|
|
938
|
+
if (end && end.nodeName === 'LI') {
|
|
939
|
+
end = end.previousElementSibling;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
else {
|
|
944
|
+
if (!closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild &&
|
|
945
|
+
end.previousElementSibling.textContent.trim().length > 0) {
|
|
946
|
+
end = end.previousElementSibling.lastChild;
|
|
947
|
+
}
|
|
948
|
+
else if (closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild) {
|
|
949
|
+
end = closest(end, 'li').parentElement.previousElementSibling.lastChild;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
if (!end || end === this.inputElement) {
|
|
953
|
+
end = start;
|
|
954
|
+
isInvalid = true;
|
|
955
|
+
}
|
|
956
|
+
while (end.nodeName !== '#text' && !isInvalid) {
|
|
957
|
+
if (end.lastElementChild) {
|
|
958
|
+
end = end.lastElementChild;
|
|
959
|
+
}
|
|
960
|
+
else {
|
|
961
|
+
end = end.lastChild;
|
|
962
|
+
}
|
|
920
963
|
}
|
|
964
|
+
newRange.setStart(start, 0);
|
|
965
|
+
newRange.setEnd(end, end.textContent.length);
|
|
966
|
+
this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(), newRange);
|
|
921
967
|
}
|
|
922
968
|
}
|
|
969
|
+
this.notifyMouseUp(e);
|
|
923
970
|
};
|
|
924
971
|
/**
|
|
925
972
|
* @param {Function} module - specifies the module function.
|
|
@@ -963,7 +1010,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
963
1010
|
var currentLength = _this.inputElement.textContent.length;
|
|
964
1011
|
var selectionLength = _this.getSelection().length;
|
|
965
1012
|
var pastedContentLength = (isNOU(e) || isNOU(e.clipboardData))
|
|
966
|
-
? 0 : e.clipboardData.getData('text/plain').length;
|
|
1013
|
+
? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
967
1014
|
var totalLength = (currentLength - selectionLength) + pastedContentLength;
|
|
968
1015
|
if (_this.editorMode === 'Markdown') {
|
|
969
1016
|
var args_1 = { requestType: 'Paste', editorMode: _this.editorMode, event: e };
|
|
@@ -1395,7 +1442,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1395
1442
|
RichTextEditor.prototype.updatePanelValue = function () {
|
|
1396
1443
|
var value = this.value;
|
|
1397
1444
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
1398
|
-
var getTextArea = this.element.querySelector('.
|
|
1445
|
+
var getTextArea = this.element.querySelector('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
1399
1446
|
if (value) {
|
|
1400
1447
|
if (getTextArea && getTextArea.style.display === 'block') {
|
|
1401
1448
|
getTextArea.value = this.value;
|
|
@@ -2026,6 +2073,16 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2026
2073
|
RichTextEditor.prototype.getID = function () {
|
|
2027
2074
|
return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
|
|
2028
2075
|
};
|
|
2076
|
+
/**
|
|
2077
|
+
* @returns {void}
|
|
2078
|
+
* getCssClass method
|
|
2079
|
+
*
|
|
2080
|
+
* @hidden
|
|
2081
|
+
|
|
2082
|
+
*/
|
|
2083
|
+
RichTextEditor.prototype.getCssClass = function (isSpace) {
|
|
2084
|
+
return (isNOU(this.cssClass) ? '' : isSpace ? ' ' + this.cssClass : this.cssClass);
|
|
2085
|
+
};
|
|
2029
2086
|
RichTextEditor.prototype.mouseDownHandler = function (e) {
|
|
2030
2087
|
var touch = (e.touches ? e.changedTouches[0] : e);
|
|
2031
2088
|
addClass([this.element], [classes.CLS_FOCUS]);
|
|
@@ -2137,7 +2194,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2137
2194
|
};
|
|
2138
2195
|
RichTextEditor.prototype.getUpdatedValue = function () {
|
|
2139
2196
|
var value;
|
|
2140
|
-
var getTextArea = this.element.querySelector('.
|
|
2197
|
+
var getTextArea = this.element.querySelector('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
2141
2198
|
if (this.editorMode === 'HTML') {
|
|
2142
2199
|
value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
|
|
2143
2200
|
this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
|
|
@@ -2168,6 +2225,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2168
2225
|
clearTimeout(this.idleInterval);
|
|
2169
2226
|
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
2170
2227
|
};
|
|
2228
|
+
RichTextEditor.prototype.cleanupResizeElements = function (args) {
|
|
2229
|
+
var value = this.removeResizeElement(args.value);
|
|
2230
|
+
args.callBack(value);
|
|
2231
|
+
};
|
|
2171
2232
|
RichTextEditor.prototype.removeResizeElement = function (value) {
|
|
2172
2233
|
var valueElementWrapper = document.createElement("div");
|
|
2173
2234
|
valueElementWrapper.innerHTML = value;
|
|
@@ -2389,6 +2450,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2389
2450
|
this.on(events.contentChanged, this.contentChanged, this);
|
|
2390
2451
|
this.on(events.resizeInitialized, this.updateResizeFlag, this);
|
|
2391
2452
|
this.on(events.updateTbItemsStatus, this.updateStatus, this);
|
|
2453
|
+
this.on(events.cleanupResizeElements, this.cleanupResizeElements, this);
|
|
2392
2454
|
if (this.readonly && this.enabled) {
|
|
2393
2455
|
return;
|
|
2394
2456
|
}
|
|
@@ -2475,6 +2537,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2475
2537
|
this.off(events.contentChanged, this.contentChanged);
|
|
2476
2538
|
this.off(events.resizeInitialized, this.updateResizeFlag);
|
|
2477
2539
|
this.off(events.updateTbItemsStatus, this.updateStatus);
|
|
2540
|
+
this.off(events.cleanupResizeElements, this.cleanupResizeElements);
|
|
2478
2541
|
if (this.readonly && this.enabled) {
|
|
2479
2542
|
return;
|
|
2480
2543
|
}
|
|
@@ -265,11 +265,11 @@ export function getTBarItemsIndex(items, toolbarItems) {
|
|
|
265
265
|
continue;
|
|
266
266
|
}
|
|
267
267
|
else {
|
|
268
|
-
if (items[i] === 'OrderedList' && toolbarItems[j].subCommand === 'OL') {
|
|
268
|
+
if ((items[i] === 'OrderedList' || items[i] === 'NumberFormatList') && toolbarItems[j].subCommand === 'OL') {
|
|
269
269
|
itemsIndex.push(j);
|
|
270
270
|
break;
|
|
271
271
|
}
|
|
272
|
-
else if (items[i] === 'UnorderedList' && toolbarItems[j].subCommand === 'UL') {
|
|
272
|
+
else if ((items[i] === 'UnorderedList' || items[i] === 'BulletFormatList') && toolbarItems[j].subCommand === 'UL') {
|
|
273
273
|
itemsIndex.push(j);
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
@@ -422,6 +422,15 @@ export function updateTextNode(value, rteObj) {
|
|
|
422
422
|
for (var i = 0; i < emptyBlockElem.length; i++) {
|
|
423
423
|
emptyBlockElem[i].innerHTML = '<br>';
|
|
424
424
|
}
|
|
425
|
+
// To handle the Empty block node with \n
|
|
426
|
+
var allPNodes = tempNode.querySelectorAll('p');
|
|
427
|
+
for (var i = 0; i < allPNodes.length; i++) {
|
|
428
|
+
if (allPNodes[i].textContent.trim().length === 0 && allPNodes[i].childNodes.length === 1
|
|
429
|
+
&& allPNodes[i].childNodes[0].nodeName === '#text' &&
|
|
430
|
+
isNOU(allPNodes[i].childNodes[0].textContent.match(/\u00a0/g))) {
|
|
431
|
+
allPNodes[i].innerHTML = '<br>';
|
|
432
|
+
}
|
|
433
|
+
}
|
|
425
434
|
var emptyInlineElem = tempNode.querySelectorAll(CONSTANT.inlineEmptyNodes);
|
|
426
435
|
for (var i = 0; i < emptyInlineElem.length; i++) {
|
|
427
436
|
emptyInlineElem[i].innerHTML = '​';
|
|
@@ -60,7 +60,7 @@ var Formatter = /** @class */ (function () {
|
|
|
60
60
|
if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
61
61
|
currentInsertContentLength = 1;
|
|
62
62
|
}
|
|
63
|
-
var currentLength = self.getText().trim().length;
|
|
63
|
+
var currentLength = self.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
64
64
|
var selectionLength = self.getSelection().length;
|
|
65
65
|
var totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
66
66
|
if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
|
|
@@ -227,6 +227,7 @@ export var toolsLocale = {
|
|
|
227
227
|
'bulletformatlist': 'bulletFormatList',
|
|
228
228
|
'undo': 'undo',
|
|
229
229
|
'redo': 'redo',
|
|
230
|
+
'filemanager': 'fileManager',
|
|
230
231
|
'superscript': 'superscript',
|
|
231
232
|
'subscript': 'subscript',
|
|
232
233
|
'createlink': 'createLink',
|
|
@@ -293,6 +294,7 @@ export var toolsLocale = {
|
|
|
293
294
|
'emojiPickerTypeToFind': 'Type to find',
|
|
294
295
|
'emojiPickerNoResultFound': 'No results found',
|
|
295
296
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
297
|
+
'ImageLinkAriaLabel': 'Open in new window',
|
|
296
298
|
};
|
|
297
299
|
export var fontNameLocale = [
|
|
298
300
|
{ locale: 'fontNameSegoeUI', value: 'Segoe UI' },
|
|
@@ -780,7 +780,7 @@ export var windowKeys = {
|
|
|
780
780
|
'Number Format List': 'Ctrl+Shift+O',
|
|
781
781
|
'Bullet Format List': 'Ctrl+Alt+O',
|
|
782
782
|
'Insert Audio': 'Ctrl+Shift+A',
|
|
783
|
-
'Insert Video': 'Ctrl+
|
|
783
|
+
'Insert Video': 'Ctrl+Alt+V',
|
|
784
784
|
'Increase Indent': 'Ctrl+]',
|
|
785
785
|
'Decrease Indent': 'Ctrl+[',
|
|
786
786
|
'Decrease Fontsize': 'Ctrl+Shift+<',
|
|
@@ -83,7 +83,16 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
83
83
|
DialogRenderer.prototype.getDialogPosition = function () {
|
|
84
84
|
var distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
|
|
85
85
|
if (distanceFromVisibleTop < 0) {
|
|
86
|
-
|
|
86
|
+
var topHeight = 0;
|
|
87
|
+
var parentElement = this.parent.element;
|
|
88
|
+
while (parentElement.nodeName !== 'BODY') {
|
|
89
|
+
var top_1 = parentElement.getBoundingClientRect().top;
|
|
90
|
+
if (top_1 > 0) {
|
|
91
|
+
topHeight = top_1;
|
|
92
|
+
}
|
|
93
|
+
parentElement = parentElement.parentElement;
|
|
94
|
+
}
|
|
95
|
+
distanceFromVisibleTop = Math.abs(distanceFromVisibleTop) + topHeight;
|
|
87
96
|
return distanceFromVisibleTop.toString();
|
|
88
97
|
}
|
|
89
98
|
else {
|