@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.2.
|
|
3
|
+
* version : 27.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@27.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@27.2.2",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-XhxuV4pqamHtam7yooDj+UAn8UorGonjtxLr2pDoVeiz3r/YodlN5r+UV8Ta6jk4p0hvmwyTa/wJGliZjPBuzQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
26
26
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
27
27
|
],
|
|
28
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-27.
|
|
29
|
-
"_shasum": "
|
|
28
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-27.2.2.tgz",
|
|
29
|
+
"_shasum": "0b7cb82941dbccb875cbea81919374a9245339a9",
|
|
30
30
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
31
31
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
32
32
|
"author": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@syncfusion/ej2-base": "~27.2.2",
|
|
41
41
|
"@syncfusion/ej2-buttons": "~27.2.2",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~27.2.
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~27.2.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~27.2.3",
|
|
43
|
+
"@syncfusion/ej2-filemanager": "~27.2.3",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~27.2.2",
|
|
45
|
-
"@syncfusion/ej2-navigations": "~27.2.
|
|
45
|
+
"@syncfusion/ej2-navigations": "~27.2.3",
|
|
46
46
|
"@syncfusion/ej2-popups": "~27.2.2",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~27.2.2"
|
|
48
48
|
},
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
81
81
|
},
|
|
82
82
|
"typings": "index.d.ts",
|
|
83
|
-
"version": "27.2.
|
|
83
|
+
"version": "27.2.3",
|
|
84
84
|
"sideEffects": false
|
|
85
85
|
}
|
|
@@ -50,7 +50,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
50
50
|
fragment = this.spliceEmptyNode(fragment, false);
|
|
51
51
|
if (fragment && fragment.childNodes.length > 0) {
|
|
52
52
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG' && !(fragment.querySelectorAll('img').length > 0)
|
|
53
|
-
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent !==
|
|
53
|
+
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent.charCodeAt(0) !== 32 && fragment.textContent.charCodeAt(0) !== 160) ? true : false;
|
|
54
54
|
if (!isEmpty) {
|
|
55
55
|
if (node) {
|
|
56
56
|
InsertMethods.AppendBefore(fragment, node);
|
|
@@ -71,7 +71,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
71
71
|
fragment = this.spliceEmptyNode(fragment, true);
|
|
72
72
|
if (fragment && fragment.childNodes.length > 0) {
|
|
73
73
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
|
|
74
|
-
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent !==
|
|
74
|
+
&& this.isRteElm(fragment) && fragment.textContent.trim() === '' && fragment.textContent.charCodeAt(0) !== 32 && fragment.textContent.charCodeAt(0) !== 160) ? true : false;
|
|
75
75
|
if (!isEmpty) {
|
|
76
76
|
if (node) {
|
|
77
77
|
InsertMethods.AppendBefore(fragment, node, true);
|
|
@@ -172,13 +172,21 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
172
172
|
}
|
|
173
173
|
var isMediaNode = false; // To check the image audio and video node cases
|
|
174
174
|
var isFocusedFirst = false;
|
|
175
|
+
var parentElement = _this.range.startContainer.parentElement;
|
|
176
|
+
var isPreWrapApplied = parentElement ? _this.parent.contentModule.getDocument().defaultView.getComputedStyle(_this.range.startContainer.parentElement, null).getPropertyValue('white-space') === 'pre-wrap' : false;
|
|
175
177
|
if (_this.range.startOffset !== 0 && _this.range.endOffset !== 0 &&
|
|
176
178
|
_this.range.startContainer === _this.range.endContainer && !(!isNOU(nearBlockNode.childNodes[0])
|
|
177
179
|
&& (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
|
|
178
180
|
var startNodeText = _this.range.startContainer.textContent;
|
|
179
181
|
var splitFirstText = startNodeText.substring(0, _this.range.startOffset);
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
var lastCharBeforeCursor = splitFirstText.charCodeAt(_this.range.startOffset - 1);
|
|
183
|
+
var isSplitTextEmpty = splitFirstText.trim().length === 0;
|
|
184
|
+
var hasContentAfterCursor = startNodeText.slice(_this.range.startOffset).trim().length !== 0;
|
|
185
|
+
var isCursorAtStartNonPreWrap = lastCharBeforeCursor !== 160
|
|
186
|
+
&& isSplitTextEmpty && !isPreWrapApplied;
|
|
187
|
+
var isCursorAtStartPreWrapWithContent = lastCharBeforeCursor === 32
|
|
188
|
+
&& isPreWrapApplied && isSplitTextEmpty && hasContentAfterCursor;
|
|
189
|
+
if (isCursorAtStartNonPreWrap || isCursorAtStartPreWrapWithContent) {
|
|
182
190
|
isFocusedFirst = true;
|
|
183
191
|
}
|
|
184
192
|
}
|
|
@@ -421,7 +421,10 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
421
421
|
var editorValue = currentRange_1.startContainer.textContent.slice(0, currentRange_1.startOffset);
|
|
422
422
|
var orderedList_1 = this.isOrderedList(editorValue);
|
|
423
423
|
var unOrderedList = this.isUnOrderedList(editorValue);
|
|
424
|
-
var hasSplitedText =
|
|
424
|
+
var hasSplitedText = false;
|
|
425
|
+
if (orderedList_1 || unOrderedList) {
|
|
426
|
+
hasSplitedText = this.hasMultipleTextNode(currentRange_1);
|
|
427
|
+
}
|
|
425
428
|
if (!hasSplitedText && (orderedList_1 && !unOrderedList || unOrderedList && !orderedList_1)) {
|
|
426
429
|
var eventArgs_1 = {
|
|
427
430
|
callBack: null,
|
|
@@ -491,6 +494,11 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
491
494
|
HtmlEditor.prototype.hasMultipleTextNode = function (range) {
|
|
492
495
|
if (range && range.startContainer && range.startContainer.parentNode) {
|
|
493
496
|
var parentNode = range.startContainer.parentNode;
|
|
497
|
+
if (range.startContainer.previousElementSibling &&
|
|
498
|
+
range.startContainer.previousElementSibling.classList.contains('e-mention-chip')
|
|
499
|
+
&& !range.startContainer.previousElementSibling.isContentEditable) {
|
|
500
|
+
return true;
|
|
501
|
+
}
|
|
494
502
|
if (this.parent.enterKey === 'BR' || closest(parentNode, 'table')) {
|
|
495
503
|
return false;
|
|
496
504
|
}
|
|
@@ -169,6 +169,13 @@ var Toolbar = /** @class */ (function () {
|
|
|
169
169
|
target: this.tbElement,
|
|
170
170
|
cssClass: this.parent.getCssClass()
|
|
171
171
|
});
|
|
172
|
+
if (this.parent.element.classList.contains('e-rte-full-screen')) {
|
|
173
|
+
this.updateItem({
|
|
174
|
+
targetItem: 'Maximize',
|
|
175
|
+
updateItem: 'Minimize',
|
|
176
|
+
baseToolbar: this.parent.getBaseToolbarObject()
|
|
177
|
+
});
|
|
178
|
+
}
|
|
172
179
|
if (!this.parent.inlineMode.enable) {
|
|
173
180
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
174
181
|
this.checkIsTransformChild();
|
|
@@ -360,11 +360,11 @@ export var formatsLocale = [
|
|
|
360
360
|
export var numberFormatListLocale = [
|
|
361
361
|
{ locale: 'numberFormatListNone', value: 'none' },
|
|
362
362
|
{ locale: 'numberFormatListNumber', value: 'decimal' },
|
|
363
|
-
{ locale: 'numberFormatListLowerAlpha', value: '
|
|
364
|
-
{ locale: 'numberFormatListUpperAlpha', value: '
|
|
365
|
-
{ locale: 'numberFormatListLowerRoman', value: '
|
|
366
|
-
{ locale: 'numberFormatListUpperRoman', value: '
|
|
367
|
-
{ locale: 'numberFormatListLowerGreek', value: '
|
|
363
|
+
{ locale: 'numberFormatListLowerAlpha', value: 'lowerAlpha' },
|
|
364
|
+
{ locale: 'numberFormatListUpperAlpha', value: 'upperAlpha' },
|
|
365
|
+
{ locale: 'numberFormatListLowerRoman', value: 'lowerRoman' },
|
|
366
|
+
{ locale: 'numberFormatListUpperRoman', value: 'upperRoman' },
|
|
367
|
+
{ locale: 'numberFormatListLowerGreek', value: 'lowerGreek' }
|
|
368
368
|
];
|
|
369
369
|
export var bulletFormatListLocale = [
|
|
370
370
|
{ locale: 'bulletFormatListNone', value: 'none' },
|
|
@@ -1829,9 +1829,17 @@ var Image = /** @class */ (function () {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
};
|
|
1831
1831
|
proxy.inputUrl.setAttribute('disabled', 'true');
|
|
1832
|
-
if (isNOU(
|
|
1833
|
-
|
|
1834
|
-
|
|
1832
|
+
if (!isNOU(_this.dialogObj)) {
|
|
1833
|
+
var button = _this.dialogObj.getButtons(0);
|
|
1834
|
+
if (!isNOU(button)) {
|
|
1835
|
+
if (isNOU(proxy.parent.insertImageSettings.saveUrl) && _this.isAllowedTypes
|
|
1836
|
+
&& selectArgs.filesData[0].size <= _this.uploadObj.maxFileSize) {
|
|
1837
|
+
button.element.removeAttribute('disabled');
|
|
1838
|
+
}
|
|
1839
|
+
else {
|
|
1840
|
+
button.element.setAttribute('disabled', 'true');
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1835
1843
|
}
|
|
1836
1844
|
});
|
|
1837
1845
|
reader_1.readAsDataURL(selectArgs.filesData[0].rawFile);
|