@syncfusion/ej2-richtexteditor 20.2.46 → 20.2.50
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 +26 -0
- 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 +43 -5
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +45 -6
- 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 +9 -9
- package/src/editor-manager/plugin/inserthtml.js +2 -2
- package/src/rich-text-editor/actions/html-editor.d.ts +1 -0
- package/src/rich-text-editor/actions/html-editor.js +10 -0
- package/src/rich-text-editor/base/constant.d.ts +5 -0
- package/src/rich-text-editor/base/constant.js +5 -0
- package/src/rich-text-editor/base/interface.d.ts +2 -0
- package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
- package/src/rich-text-editor/base/rich-text-editor.js +11 -3
- package/src/rich-text-editor/models/default-locale.js +4 -0
- package/src/rich-text-editor/renderer/table-module.js +11 -0
- package/src/rich-text-editor/renderer/view-source.js +1 -0
- package/styles/fluent-dark.css +1 -0
- package/styles/fluent.css +1 -0
- package/styles/rich-text-editor/_layout.scss +3 -0
- package/styles/rich-text-editor/fluent-dark.css +1 -0
- package/styles/rich-text-editor/fluent.css +1 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.2.
|
|
3
|
+
* version : 20.2.50
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@20.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@20.2.49",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-TSIyB0v3Rc/rIuDwbkeLQ0ziVOT3c2yf8WdOoGuqoDuTI8am8Js+ihJA9320rhBhq4vWrUd6AXMbQ0B9FChaTQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.2.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.2.49.tgz",
|
|
30
|
+
"_shasum": "9c624b3ff3b5a9ca111e8d72accc319b6dfbfa21",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~20.2.
|
|
41
|
+
"@syncfusion/ej2-base": "~20.2.48",
|
|
42
42
|
"@syncfusion/ej2-buttons": "~20.2.46",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~20.2.45",
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.2.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~20.2.
|
|
46
|
-
"@syncfusion/ej2-popups": "~20.2.
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.2.48",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.2.50",
|
|
46
|
+
"@syncfusion/ej2-popups": "~20.2.49",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~20.2.45"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "20.2.
|
|
73
|
+
"version": "20.2.50",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -320,7 +320,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
320
320
|
InsertHtml.getNodeCollection = function (range, nodeSelection, node) {
|
|
321
321
|
var nodes = [];
|
|
322
322
|
if (range.startOffset === range.endOffset && range.startContainer === range.endContainer &&
|
|
323
|
-
range.startContainer.nodeName != 'BR' &&
|
|
323
|
+
range.startContainer.nodeName != 'BR' && range.startContainer.childNodes.length > 0 &&
|
|
324
324
|
(range.startContainer.nodeName === 'TD' || (range.startContainer.nodeType !== 3 &&
|
|
325
325
|
node.classList && node.classList.contains('pasteContent')))) {
|
|
326
326
|
nodes.push(range.startContainer.childNodes[range.endOffset]);
|
|
@@ -373,7 +373,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
373
373
|
node.firstElementChild.insertAdjacentElement('afterend', liNode);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH') {
|
|
376
|
+
if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH' || blockNode.nodeName === 'TR') {
|
|
377
377
|
var tempSpan = createElement('span', { className: 'tempSpan' });
|
|
378
378
|
range.insertNode(tempSpan);
|
|
379
379
|
tempSpan.parentNode.replaceChild(node, tempSpan);
|
|
@@ -69,6 +69,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
69
69
|
this.parent.on(events.selectionRestore, this.onSelectionRestore, this);
|
|
70
70
|
this.parent.on(events.readOnlyMode, this.updateReadOnly, this);
|
|
71
71
|
this.parent.on(events.paste, this.onPaste, this);
|
|
72
|
+
this.parent.on(events.tableclass, this.isTableClassAdded, this);
|
|
72
73
|
};
|
|
73
74
|
HtmlEditor.prototype.updateReadOnly = function () {
|
|
74
75
|
if (this.parent.readonly) {
|
|
@@ -80,6 +81,14 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
80
81
|
removeClass([this.parent.element], classes.CLS_RTE_READONLY);
|
|
81
82
|
}
|
|
82
83
|
};
|
|
84
|
+
HtmlEditor.prototype.isTableClassAdded = function () {
|
|
85
|
+
var tableElement = this.parent.inputElement.querySelectorAll('table');
|
|
86
|
+
for (var i = 0; i < tableElement.length; i++) {
|
|
87
|
+
if (!tableElement[i].classList.contains('e-rte-table')) {
|
|
88
|
+
tableElement[i].classList.add('e-rte-table');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
83
92
|
HtmlEditor.prototype.onSelectionSave = function () {
|
|
84
93
|
var currentDocument = this.contentRenderer.getDocument();
|
|
85
94
|
var range = this.nodeSelectionObj.getRange(currentDocument);
|
|
@@ -628,6 +637,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
628
637
|
this.parent.off(events.selectionRestore, this.onSelectionRestore);
|
|
629
638
|
this.parent.off(events.readOnlyMode, this.updateReadOnly);
|
|
630
639
|
this.parent.off(events.paste, this.onPaste);
|
|
640
|
+
this.parent.off(events.tableclass, this.isTableClassAdded);
|
|
631
641
|
};
|
|
632
642
|
HtmlEditor.prototype.render = function () {
|
|
633
643
|
this.contentRenderer = this.renderFactory.getRenderer(RenderType.Content);
|
|
@@ -889,6 +889,8 @@ export interface ChangeEventArgs {
|
|
|
889
889
|
value: string;
|
|
890
890
|
/** Defines the event name. */
|
|
891
891
|
name?: string;
|
|
892
|
+
/** Specifies whether the request should be saved automatically or focused out. */
|
|
893
|
+
isInteracted: boolean;
|
|
892
894
|
}
|
|
893
895
|
/**
|
|
894
896
|
* Provides information about a DialogOpen event.
|
|
@@ -70,7 +70,9 @@ import { DialogRenderer } from '../renderer/dialog-renderer';
|
|
|
70
70
|
var RichTextEditor = /** @class */ (function (_super) {
|
|
71
71
|
__extends(RichTextEditor, _super);
|
|
72
72
|
function RichTextEditor(options, element) {
|
|
73
|
-
|
|
73
|
+
var _this = _super.call(this, options, element) || this;
|
|
74
|
+
_this.needsID = true;
|
|
75
|
+
return _this;
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
76
78
|
* To provide the array of modules needed for component rendering
|
|
@@ -155,7 +157,6 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
155
157
|
this.isFocusOut = false;
|
|
156
158
|
this.isRTE = false;
|
|
157
159
|
this.isBlur = true;
|
|
158
|
-
this.needsID = true;
|
|
159
160
|
this.defaultResetValue = null;
|
|
160
161
|
this.isResizeInitialized = false;
|
|
161
162
|
};
|
|
@@ -477,6 +478,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
477
478
|
// eslint-disable-next-line
|
|
478
479
|
(!this.enabled) ? this.unWireEvents() : this.eventInitializer();
|
|
479
480
|
this.notify(events.bindCssClass, { cssClass: this.cssClass });
|
|
481
|
+
this.notify(events.tableclass, {});
|
|
480
482
|
this.renderComplete();
|
|
481
483
|
};
|
|
482
484
|
/**
|
|
@@ -1049,6 +1051,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1049
1051
|
this.value = this.serializeValue(((this.enableHtmlEncode) ? this.encode(decode(val)) : val));
|
|
1050
1052
|
}
|
|
1051
1053
|
this.updatePanelValue();
|
|
1054
|
+
if (this.inputElement) {
|
|
1055
|
+
this.notify(events.tableclass, {});
|
|
1056
|
+
}
|
|
1052
1057
|
this.setPlaceHolder();
|
|
1053
1058
|
this.notify(events.xhtmlValidation, { module: 'XhtmlValidation', newProp: newProp, oldProp: oldProp });
|
|
1054
1059
|
if (this.enableXhtml) {
|
|
@@ -1880,6 +1885,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1880
1885
|
}
|
|
1881
1886
|
this.setProperties({ value: this.getUpdatedValue() }, true);
|
|
1882
1887
|
this.valueContainer.value = this.value;
|
|
1888
|
+
this.isValueChangeBlurhandler = false;
|
|
1883
1889
|
this.invokeChangeEvent();
|
|
1884
1890
|
};
|
|
1885
1891
|
RichTextEditor.prototype.updateIntervalValue = function () {
|
|
@@ -1935,6 +1941,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1935
1941
|
var value = this.getUpdatedValue();
|
|
1936
1942
|
this.setProperties({ value: value });
|
|
1937
1943
|
this.notify(events.toolbarRefresh, { args: e, documentNode: document });
|
|
1944
|
+
this.isValueChangeBlurhandler = true;
|
|
1938
1945
|
this.invokeChangeEvent();
|
|
1939
1946
|
this.isFocusOut = true;
|
|
1940
1947
|
this.isBlur = false;
|
|
@@ -1982,7 +1989,8 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1982
1989
|
currentValue = this.value;
|
|
1983
1990
|
}
|
|
1984
1991
|
var eventArgs = {
|
|
1985
|
-
value: currentValue
|
|
1992
|
+
value: currentValue,
|
|
1993
|
+
isInteracted: this.isValueChangeBlurhandler
|
|
1986
1994
|
};
|
|
1987
1995
|
if (this.value !== this.cloneValue) {
|
|
1988
1996
|
this.trigger('change', eventArgs);
|
|
@@ -49,6 +49,8 @@ export var defaultLocale = {
|
|
|
49
49
|
'upperCase': 'Upper Case',
|
|
50
50
|
'print': 'Print',
|
|
51
51
|
'formats': 'Formats',
|
|
52
|
+
'numberFormatList': 'Number Format List',
|
|
53
|
+
'bulletFormatList': 'Bullet Format List',
|
|
52
54
|
'sourcecode': 'Code View',
|
|
53
55
|
'preview': 'Preview',
|
|
54
56
|
'viewside': 'ViewSide',
|
|
@@ -208,6 +210,8 @@ export var toolsLocale = {
|
|
|
208
210
|
'uppercase': 'upperCase',
|
|
209
211
|
'print': 'print',
|
|
210
212
|
'formats': 'formats',
|
|
213
|
+
'numberformatlist': 'numberFormatList',
|
|
214
|
+
'bulletformatlist': 'bulletFormatList',
|
|
211
215
|
'sourcecode': 'sourcecode',
|
|
212
216
|
'preview': 'preview',
|
|
213
217
|
'viewside': 'viewside',
|
|
@@ -995,6 +995,17 @@ var Table = /** @class */ (function () {
|
|
|
995
995
|
};
|
|
996
996
|
this.parent.formatter.process(this.parent, (delKey) ? cmd : args, args.originalEvent, value);
|
|
997
997
|
this.contentModule.getEditPanel().focus();
|
|
998
|
+
if (this.parent.inputElement.innerHTML === null || this.parent.inputElement.innerHTML === '') {
|
|
999
|
+
if (this.parent.enterKey === 'DIV') {
|
|
1000
|
+
this.contentModule.getEditPanel().innerHTML = '<div><br/></div>';
|
|
1001
|
+
}
|
|
1002
|
+
else if (this.parent.enterKey === 'BR') {
|
|
1003
|
+
this.contentModule.getEditPanel().innerHTML = '<br/>';
|
|
1004
|
+
}
|
|
1005
|
+
else {
|
|
1006
|
+
this.contentModule.getEditPanel().innerHTML = '<p><br/></p>';
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
998
1009
|
this.removeResizeElement();
|
|
999
1010
|
this.hideTableQuickToolbar();
|
|
1000
1011
|
};
|
|
@@ -223,6 +223,7 @@ var ViewSource = /** @class */ (function () {
|
|
|
223
223
|
this.parent.trigger(events.actionComplete, { requestType: 'Preview', targetItem: 'Preview', args: args });
|
|
224
224
|
this.parent.formatter.enableUndo(this.parent);
|
|
225
225
|
this.parent.invokeChangeEvent();
|
|
226
|
+
this.parent.notify(events.tableclass, {});
|
|
226
227
|
};
|
|
227
228
|
ViewSource.prototype.getTextAreaValue = function () {
|
|
228
229
|
return (this.contentModule.getEditPanel().innerHTML === '<p><br></p>') ||
|
package/styles/fluent-dark.css
CHANGED
|
@@ -2226,6 +2226,7 @@
|
|
|
2226
2226
|
|
|
2227
2227
|
.e-rte-table-popup.e-dialog .e-dlg-content {
|
|
2228
2228
|
padding: 0;
|
|
2229
|
+
margin-bottom: 0;
|
|
2229
2230
|
}
|
|
2230
2231
|
|
|
2231
2232
|
.e-rte-quick-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control,
|
package/styles/fluent.css
CHANGED
|
@@ -2226,6 +2226,7 @@
|
|
|
2226
2226
|
|
|
2227
2227
|
.e-rte-table-popup.e-dialog .e-dlg-content {
|
|
2228
2228
|
padding: 0;
|
|
2229
|
+
margin-bottom: 0;
|
|
2229
2230
|
}
|
|
2230
2231
|
|
|
2231
2232
|
.e-rte-quick-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control,
|
|
@@ -2226,6 +2226,7 @@
|
|
|
2226
2226
|
|
|
2227
2227
|
.e-rte-table-popup.e-dialog .e-dlg-content {
|
|
2228
2228
|
padding: 0;
|
|
2229
|
+
margin-bottom: 0;
|
|
2229
2230
|
}
|
|
2230
2231
|
|
|
2231
2232
|
.e-rte-quick-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control,
|
|
@@ -2226,6 +2226,7 @@
|
|
|
2226
2226
|
|
|
2227
2227
|
.e-rte-table-popup.e-dialog .e-dlg-content {
|
|
2228
2228
|
padding: 0;
|
|
2229
|
+
margin-bottom: 0;
|
|
2229
2230
|
}
|
|
2230
2231
|
|
|
2231
2232
|
.e-rte-quick-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control,
|