@syncfusion/ej2-richtexteditor 20.2.49 → 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 +10 -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 +36 -1
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +36 -1
- 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 +6 -6
- 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/rich-text-editor.js +4 -0
- 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/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": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@syncfusion/ej2-buttons": "~20.2.46",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~20.2.45",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~20.2.48",
|
|
45
|
-
"@syncfusion/ej2-navigations": "~20.2.
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.2.50",
|
|
46
46
|
"@syncfusion/ej2-popups": "~20.2.49",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~20.2.45"
|
|
48
48
|
},
|
|
@@ -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
|
}
|
|
@@ -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);
|
|
@@ -478,6 +478,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
478
478
|
// eslint-disable-next-line
|
|
479
479
|
(!this.enabled) ? this.unWireEvents() : this.eventInitializer();
|
|
480
480
|
this.notify(events.bindCssClass, { cssClass: this.cssClass });
|
|
481
|
+
this.notify(events.tableclass, {});
|
|
481
482
|
this.renderComplete();
|
|
482
483
|
};
|
|
483
484
|
/**
|
|
@@ -1050,6 +1051,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1050
1051
|
this.value = this.serializeValue(((this.enableHtmlEncode) ? this.encode(decode(val)) : val));
|
|
1051
1052
|
}
|
|
1052
1053
|
this.updatePanelValue();
|
|
1054
|
+
if (this.inputElement) {
|
|
1055
|
+
this.notify(events.tableclass, {});
|
|
1056
|
+
}
|
|
1053
1057
|
this.setPlaceHolder();
|
|
1054
1058
|
this.notify(events.xhtmlValidation, { module: 'XhtmlValidation', newProp: newProp, oldProp: oldProp });
|
|
1055
1059
|
if (this.enableXhtml) {
|
|
@@ -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>') ||
|