@syncfusion/ej2-richtexteditor 27.2.2 → 27.2.3
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/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 +44 -13
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +44 -13
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/editor-manager/plugin/nodecutter.js +2 -2
- package/src/rich-text-editor/actions/enter-key.js +10 -2
- package/src/rich-text-editor/actions/html-editor.js +9 -1
- package/src/rich-text-editor/actions/toolbar.js +7 -0
- package/src/rich-text-editor/models/default-locale.js +5 -5
- package/src/rich-text-editor/renderer/image-module.js +11 -3
|
@@ -3048,11 +3048,11 @@ var formatsLocale = [
|
|
|
3048
3048
|
var numberFormatListLocale = [
|
|
3049
3049
|
{ locale: 'numberFormatListNone', value: 'none' },
|
|
3050
3050
|
{ locale: 'numberFormatListNumber', value: 'decimal' },
|
|
3051
|
-
{ locale: 'numberFormatListLowerAlpha', value: '
|
|
3052
|
-
{ locale: 'numberFormatListUpperAlpha', value: '
|
|
3053
|
-
{ locale: 'numberFormatListLowerRoman', value: '
|
|
3054
|
-
{ locale: 'numberFormatListUpperRoman', value: '
|
|
3055
|
-
{ locale: 'numberFormatListLowerGreek', value: '
|
|
3051
|
+
{ locale: 'numberFormatListLowerAlpha', value: 'lowerAlpha' },
|
|
3052
|
+
{ locale: 'numberFormatListUpperAlpha', value: 'upperAlpha' },
|
|
3053
|
+
{ locale: 'numberFormatListLowerRoman', value: 'lowerRoman' },
|
|
3054
|
+
{ locale: 'numberFormatListUpperRoman', value: 'upperRoman' },
|
|
3055
|
+
{ locale: 'numberFormatListLowerGreek', value: 'lowerGreek' }
|
|
3056
3056
|
];
|
|
3057
3057
|
var bulletFormatListLocale = [
|
|
3058
3058
|
{ locale: 'bulletFormatListNone', value: 'none' },
|
|
@@ -8769,9 +8769,17 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8769
8769
|
}
|
|
8770
8770
|
};
|
|
8771
8771
|
proxy.inputUrl.setAttribute('disabled', 'true');
|
|
8772
|
-
if (isNullOrUndefined(
|
|
8773
|
-
|
|
8774
|
-
|
|
8772
|
+
if (!isNullOrUndefined(_this.dialogObj)) {
|
|
8773
|
+
var button = _this.dialogObj.getButtons(0);
|
|
8774
|
+
if (!isNullOrUndefined(button)) {
|
|
8775
|
+
if (isNullOrUndefined(proxy.parent.insertImageSettings.saveUrl) && _this.isAllowedTypes
|
|
8776
|
+
&& selectArgs.filesData[0].size <= _this.uploadObj.maxFileSize) {
|
|
8777
|
+
button.element.removeAttribute('disabled');
|
|
8778
|
+
}
|
|
8779
|
+
else {
|
|
8780
|
+
button.element.setAttribute('disabled', 'true');
|
|
8781
|
+
}
|
|
8782
|
+
}
|
|
8775
8783
|
}
|
|
8776
8784
|
});
|
|
8777
8785
|
reader_1.readAsDataURL(selectArgs.filesData[0].rawFile);
|
|
@@ -16610,6 +16618,13 @@ var Toolbar = /** @__PURE__ @class */ (function () {
|
|
|
16610
16618
|
target: this.tbElement,
|
|
16611
16619
|
cssClass: this.parent.getCssClass()
|
|
16612
16620
|
});
|
|
16621
|
+
if (this.parent.element.classList.contains('e-rte-full-screen')) {
|
|
16622
|
+
this.updateItem({
|
|
16623
|
+
targetItem: 'Maximize',
|
|
16624
|
+
updateItem: 'Minimize',
|
|
16625
|
+
baseToolbar: this.parent.getBaseToolbarObject()
|
|
16626
|
+
});
|
|
16627
|
+
}
|
|
16613
16628
|
if (!this.parent.inlineMode.enable) {
|
|
16614
16629
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
16615
16630
|
this.checkIsTransformChild();
|
|
@@ -23465,7 +23480,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
|
23465
23480
|
fragment = this.spliceEmptyNode(fragment, false);
|
|
23466
23481
|
if (fragment && fragment.childNodes.length > 0) {
|
|
23467
23482
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG' && !(fragment.querySelectorAll('img').length > 0)
|
|
23468
|
-
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent !==
|
|
23483
|
+
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent.charCodeAt(0) !== 32 && fragment.textContent.charCodeAt(0) !== 160) ? true : false;
|
|
23469
23484
|
if (!isEmpty) {
|
|
23470
23485
|
if (node) {
|
|
23471
23486
|
InsertMethods.AppendBefore(fragment, node);
|
|
@@ -23486,7 +23501,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
|
23486
23501
|
fragment = this.spliceEmptyNode(fragment, true);
|
|
23487
23502
|
if (fragment && fragment.childNodes.length > 0) {
|
|
23488
23503
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
|
|
23489
|
-
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent !==
|
|
23504
|
+
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent.charCodeAt(0) !== 32 && fragment.textContent.charCodeAt(0) !== 160) ? true : false;
|
|
23490
23505
|
if (!isEmpty) {
|
|
23491
23506
|
if (node) {
|
|
23492
23507
|
InsertMethods.AppendBefore(fragment, node, true);
|
|
@@ -32075,7 +32090,10 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32075
32090
|
var editorValue = currentRange_1.startContainer.textContent.slice(0, currentRange_1.startOffset);
|
|
32076
32091
|
var orderedList_1 = this.isOrderedList(editorValue);
|
|
32077
32092
|
var unOrderedList = this.isUnOrderedList(editorValue);
|
|
32078
|
-
var hasSplitedText =
|
|
32093
|
+
var hasSplitedText = false;
|
|
32094
|
+
if (orderedList_1 || unOrderedList) {
|
|
32095
|
+
hasSplitedText = this.hasMultipleTextNode(currentRange_1);
|
|
32096
|
+
}
|
|
32079
32097
|
if (!hasSplitedText && (orderedList_1 && !unOrderedList || unOrderedList && !orderedList_1)) {
|
|
32080
32098
|
var eventArgs_1 = {
|
|
32081
32099
|
callBack: null,
|
|
@@ -32145,6 +32163,11 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32145
32163
|
HtmlEditor.prototype.hasMultipleTextNode = function (range) {
|
|
32146
32164
|
if (range && range.startContainer && range.startContainer.parentNode) {
|
|
32147
32165
|
var parentNode = range.startContainer.parentNode;
|
|
32166
|
+
if (range.startContainer.previousElementSibling &&
|
|
32167
|
+
range.startContainer.previousElementSibling.classList.contains('e-mention-chip')
|
|
32168
|
+
&& !range.startContainer.previousElementSibling.isContentEditable) {
|
|
32169
|
+
return true;
|
|
32170
|
+
}
|
|
32148
32171
|
if (this.parent.enterKey === 'BR' || closest(parentNode, 'table')) {
|
|
32149
32172
|
return false;
|
|
32150
32173
|
}
|
|
@@ -36871,13 +36894,21 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
36871
36894
|
}
|
|
36872
36895
|
var isMediaNode = false; // To check the image audio and video node cases
|
|
36873
36896
|
var isFocusedFirst = false;
|
|
36897
|
+
var parentElement = _this.range.startContainer.parentElement;
|
|
36898
|
+
var isPreWrapApplied = parentElement ? _this.parent.contentModule.getDocument().defaultView.getComputedStyle(_this.range.startContainer.parentElement, null).getPropertyValue('white-space') === 'pre-wrap' : false;
|
|
36874
36899
|
if (_this.range.startOffset !== 0 && _this.range.endOffset !== 0 &&
|
|
36875
36900
|
_this.range.startContainer === _this.range.endContainer && !(!isNullOrUndefined(nearBlockNode.childNodes[0])
|
|
36876
36901
|
&& (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
|
|
36877
36902
|
var startNodeText = _this.range.startContainer.textContent;
|
|
36878
36903
|
var splitFirstText = startNodeText.substring(0, _this.range.startOffset);
|
|
36879
|
-
|
|
36880
|
-
|
|
36904
|
+
var lastCharBeforeCursor = splitFirstText.charCodeAt(_this.range.startOffset - 1);
|
|
36905
|
+
var isSplitTextEmpty = splitFirstText.trim().length === 0;
|
|
36906
|
+
var hasContentAfterCursor = startNodeText.slice(_this.range.startOffset).trim().length !== 0;
|
|
36907
|
+
var isCursorAtStartNonPreWrap = lastCharBeforeCursor !== 160
|
|
36908
|
+
&& isSplitTextEmpty && !isPreWrapApplied;
|
|
36909
|
+
var isCursorAtStartPreWrapWithContent = lastCharBeforeCursor === 32
|
|
36910
|
+
&& isPreWrapApplied && isSplitTextEmpty && hasContentAfterCursor;
|
|
36911
|
+
if (isCursorAtStartNonPreWrap || isCursorAtStartPreWrapWithContent) {
|
|
36881
36912
|
isFocusedFirst = true;
|
|
36882
36913
|
}
|
|
36883
36914
|
}
|