@syncfusion/ej2-richtexteditor 26.1.41 → 26.1.42
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 +20 -8
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +20 -8
- 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/markdown-parser/base/markdown-parser.js +1 -2
- package/src/rich-text-editor/actions/html-editor.js +4 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
- package/src/rich-text-editor/base/rich-text-editor.js +15 -5
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 26.1.
|
|
3
|
+
* version : 26.1.42
|
|
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@26.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@26.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-Ei7JWoJPmb2CEUXhrNtZtNR2E5JUlNKwRaZLAgdFyQb9jz+kRqHCsFYCwaEQyJZY7GYKRlYE0MOxVyITi5ETVw==",
|
|
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-26.1.
|
|
29
|
-
"_shasum": "
|
|
28
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.1.41.tgz",
|
|
29
|
+
"_shasum": "2e0f1e3dbbedf137a93f185cb21172b4b8b35d82",
|
|
30
30
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
31
31
|
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
|
|
32
32
|
"author": {
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"bundleDependencies": false,
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@syncfusion/ej2-base": "~26.1.
|
|
40
|
+
"@syncfusion/ej2-base": "~26.1.42",
|
|
41
41
|
"@syncfusion/ej2-buttons": "~26.1.40",
|
|
42
42
|
"@syncfusion/ej2-filemanager": "~26.1.41",
|
|
43
|
-
"@syncfusion/ej2-inputs": "~26.1.
|
|
43
|
+
"@syncfusion/ej2-inputs": "~26.1.42",
|
|
44
44
|
"@syncfusion/ej2-navigations": "~26.1.41",
|
|
45
|
-
"@syncfusion/ej2-popups": "~26.1.
|
|
45
|
+
"@syncfusion/ej2-popups": "~26.1.42",
|
|
46
46
|
"@syncfusion/ej2-splitbuttons": "~26.1.35"
|
|
47
47
|
},
|
|
48
48
|
"deprecated": false,
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
80
80
|
},
|
|
81
81
|
"typings": "index.d.ts",
|
|
82
|
-
"version": "26.1.
|
|
82
|
+
"version": "26.1.42",
|
|
83
83
|
"sideEffects": false
|
|
84
84
|
}
|
|
@@ -50,13 +50,11 @@ var MarkdownParser = /** @class */ (function () {
|
|
|
50
50
|
this.observer.on(EVENTS.KEY_DOWN, this.editorKeyDown, this);
|
|
51
51
|
this.observer.on(EVENTS.KEY_UP, this.editorKeyUp, this);
|
|
52
52
|
this.observer.on(EVENTS.MODEL_CHANGED, this.onPropertyChanged, this);
|
|
53
|
-
this.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
54
53
|
};
|
|
55
54
|
MarkdownParser.prototype.unwireEvents = function () {
|
|
56
55
|
this.observer.off(EVENTS.KEY_DOWN, this.editorKeyDown);
|
|
57
56
|
this.observer.off(EVENTS.KEY_UP, this.editorKeyUp);
|
|
58
57
|
this.observer.off(EVENTS.MODEL_CHANGED, this.onPropertyChanged);
|
|
59
|
-
this.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
60
58
|
};
|
|
61
59
|
MarkdownParser.prototype.onPropertyChanged = function (props) {
|
|
62
60
|
this.observer.notify(EVENTS.MODEL_CHANGED_PLUGIN, props);
|
|
@@ -119,6 +117,7 @@ var MarkdownParser = /** @class */ (function () {
|
|
|
119
117
|
}
|
|
120
118
|
};
|
|
121
119
|
MarkdownParser.prototype.destroy = function () {
|
|
120
|
+
this.observer.notify(EVENTS.INTERNAL_DESTROY, {});
|
|
122
121
|
this.unwireEvents();
|
|
123
122
|
};
|
|
124
123
|
return MarkdownParser;
|
|
@@ -287,7 +287,9 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
287
287
|
focusNode = currentChildNode[0];
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
if (range.startContainer !== focusNode) {
|
|
291
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), focusNode, pointer);
|
|
292
|
+
}
|
|
291
293
|
}
|
|
292
294
|
var currentElem = this.parent.inputElement.querySelector('.currentStartMark');
|
|
293
295
|
if (!isNOU(currentElem)) {
|
|
@@ -611,6 +613,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
611
613
|
}
|
|
612
614
|
else if (brNode) {
|
|
613
615
|
detach(brNode);
|
|
616
|
+
e.args.preventDefault();
|
|
614
617
|
}
|
|
615
618
|
if (!isNullOrUndefined(this.deleteRangeElement) && (this.deleteOldRangeElement.tagName !== 'OL' && this.deleteOldRangeElement.tagName !== 'UL')
|
|
616
619
|
&& this.deleteOldRangeElement !== this.deleteRangeElement) {
|
|
@@ -1080,6 +1080,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
|
|
|
1080
1080
|
private originalElement;
|
|
1081
1081
|
private clickPoints;
|
|
1082
1082
|
private initialValue;
|
|
1083
|
+
private isSelectAll;
|
|
1083
1084
|
constructor(options?: RichTextEditorModel, element?: string | HTMLElement);
|
|
1084
1085
|
/**
|
|
1085
1086
|
* To provide the array of modules needed for component rendering
|
|
@@ -28,7 +28,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
28
28
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29
29
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30
30
|
};
|
|
31
|
-
import { Component, EventHandler, Complex, Browser, addClass, detach
|
|
31
|
+
import { Component, EventHandler, Complex, Browser, addClass, detach } from '@syncfusion/ej2-base';
|
|
32
32
|
import { Property, NotifyPropertyChanges, formatUnit, L10n, closest } from '@syncfusion/ej2-base';
|
|
33
33
|
import { setStyleAttribute, Event, removeClass, print as printWindow, attributes } from '@syncfusion/ej2-base';
|
|
34
34
|
import { isNullOrUndefined as isNOU, compile, append, extend, debounce } from '@syncfusion/ej2-base';
|
|
@@ -72,6 +72,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
72
72
|
function RichTextEditor(options, element) {
|
|
73
73
|
var _this = _super.call(this, options, element) || this;
|
|
74
74
|
_this.needsID = true;
|
|
75
|
+
_this.isSelectAll = false;
|
|
75
76
|
return _this;
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
@@ -804,6 +805,15 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
804
805
|
if (!isNOU(this.placeholder)) {
|
|
805
806
|
this.setPlaceHolder();
|
|
806
807
|
}
|
|
808
|
+
if (!isNOU(e) && !isNOU(e.code) && (e.code === 'Backspace' || e.code === 'Delete')) {
|
|
809
|
+
var range = this.contentModule.getDocument().getSelection().getRangeAt(0);
|
|
810
|
+
var div = document.createElement('div');
|
|
811
|
+
div.appendChild(range.cloneContents());
|
|
812
|
+
var selectedHTML = div.innerHTML;
|
|
813
|
+
if (selectedHTML === this.inputElement.innerHTML) {
|
|
814
|
+
this.isSelectAll = true;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
807
817
|
};
|
|
808
818
|
RichTextEditor.prototype.keyUp = function (e) {
|
|
809
819
|
if (this.editorMode === 'HTML') {
|
|
@@ -813,6 +823,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
813
823
|
var currentRange = this.getRange();
|
|
814
824
|
var selection = this.iframeSettings.enable ? this.contentModule.getPanel().ownerDocument.getSelection() :
|
|
815
825
|
this.contentModule.getDocument().getSelection();
|
|
826
|
+
if (this.isSelectAll) {
|
|
827
|
+
this.inputElement.innerHTML = this.enterKey !== 'BR' ? '<' + this.enterKey + '><br></' + this.enterKey + '>' : '<br>';
|
|
828
|
+
this.isSelectAll = false;
|
|
829
|
+
}
|
|
816
830
|
if (selection.rangeCount > 0) {
|
|
817
831
|
selection.removeAllRanges();
|
|
818
832
|
selection.addRange(currentRange);
|
|
@@ -1108,7 +1122,6 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1108
1122
|
removeClass([this.element], classes.CLS_RTE_HIDDEN);
|
|
1109
1123
|
}
|
|
1110
1124
|
else {
|
|
1111
|
-
remove(this.inputElement);
|
|
1112
1125
|
if (this.originalElement.innerHTML.trim() !== '') {
|
|
1113
1126
|
this.element.innerHTML = this.originalElement.innerHTML.trim();
|
|
1114
1127
|
this.setProperties({ value: (!isNOU(this.initialValue) ? this.initialValue : null) }, true);
|
|
@@ -1132,9 +1145,6 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1132
1145
|
}
|
|
1133
1146
|
}
|
|
1134
1147
|
}
|
|
1135
|
-
if (this.inputElement) {
|
|
1136
|
-
this.inputElement = null;
|
|
1137
|
-
}
|
|
1138
1148
|
if (this.rootContainer) {
|
|
1139
1149
|
this.rootContainer = null;
|
|
1140
1150
|
}
|