@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.46
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.45",
3
+ "_id": "@syncfusion/ej2-richtexteditor@20.2.49",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-ej4cOLeY7dXoZNyj8rsNeaT5yHrFYM+Mi2QBJcYPvuRSK91wnoNGME4CptbxZoKegPVj2ahTr8fHvSBpTfMM3A==",
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.45.tgz",
30
- "_shasum": "a037c49ba04ac66b8143621556c31764671d0931",
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.46",
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",
45
- "@syncfusion/ej2-navigations": "~20.2.46",
46
- "@syncfusion/ej2-popups": "~20.2.45",
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.46",
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);
@@ -40,6 +40,7 @@ export declare class HtmlEditor {
40
40
  sanitizeHelper(value: string): string;
41
41
  private addEventListener;
42
42
  private updateReadOnly;
43
+ private isTableClassAdded;
43
44
  private onSelectionSave;
44
45
  private onSelectionRestore;
45
46
  private onKeyUp;
@@ -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);
@@ -11,6 +11,11 @@ export declare const destroyed: string;
11
11
  /**
12
12
  * @hidden
13
13
 
14
+ */
15
+ export declare const tableclass: string;
16
+ /**
17
+ * @hidden
18
+
14
19
  */
15
20
  export declare const load: string;
16
21
  /**
@@ -11,6 +11,11 @@ export var destroyed = 'destroy';
11
11
  /**
12
12
  * @hidden
13
13
 
14
+ */
15
+ export var tableclass = 'tableclass';
16
+ /**
17
+ * @hidden
18
+
14
19
  */
15
20
  export var load = 'load';
16
21
  /**
@@ -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.
@@ -52,6 +52,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
52
52
  private touchModule;
53
53
  private defaultResetValue;
54
54
  private isResizeInitialized;
55
+ private isValueChangeBlurhandler;
55
56
  /**
56
57
  * @hidden
57
58
 
@@ -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
- return _super.call(this, options, element) || this;
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>') ||
@@ -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,
@@ -1732,6 +1732,9 @@
1732
1732
 
1733
1733
  .e-rte-table-popup.e-dialog .e-dlg-content {
1734
1734
  padding: 0;
1735
+ @if $skin-name == 'FluentUI' {
1736
+ margin-bottom: 0;
1737
+ }
1735
1738
  }
1736
1739
 
1737
1740
  @if $skin-name == 'tailwind' {
@@ -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,