@syncfusion/ej2-richtexteditor 20.2.44 → 20.2.49

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.
@@ -12562,7 +12562,7 @@ class InsertHtml {
12562
12562
  static getNodeCollection(range, nodeSelection, node) {
12563
12563
  let nodes = [];
12564
12564
  if (range.startOffset === range.endOffset && range.startContainer === range.endContainer &&
12565
- range.startContainer.nodeName != 'BR' &&
12565
+ range.startContainer.nodeName != 'BR' && range.startContainer.childNodes.length > 0 &&
12566
12566
  (range.startContainer.nodeName === 'TD' || (range.startContainer.nodeType !== 3 &&
12567
12567
  node.classList && node.classList.contains('pasteContent')))) {
12568
12568
  nodes.push(range.startContainer.childNodes[range.endOffset]);
@@ -12615,7 +12615,7 @@ class InsertHtml {
12615
12615
  node.firstElementChild.insertAdjacentElement('afterend', liNode);
12616
12616
  }
12617
12617
  }
12618
- if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH') {
12618
+ if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH' || blockNode.nodeName === 'TR') {
12619
12619
  const tempSpan = createElement('span', { className: 'tempSpan' });
12620
12620
  range.insertNode(tempSpan);
12621
12621
  tempSpan.parentNode.replaceChild(node, tempSpan);
@@ -19664,6 +19664,7 @@ class FullScreen {
19664
19664
  baseToolbar: this.parent.getBaseToolbarObject()
19665
19665
  });
19666
19666
  }
19667
+ this.parent.refreshUI();
19667
19668
  this.parent.trigger(actionComplete, { requestType: 'Maximize', targetItem: 'Maximize', args: event });
19668
19669
  }
19669
19670
  });
@@ -25020,7 +25021,7 @@ class EnterKeyAction {
25020
25021
  blockElement = curElement;
25021
25022
  curElement = curElement.parentElement;
25022
25023
  }
25023
- isTableEnter = blockElement.tagName === 'TD' ? false : true;
25024
+ isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
25024
25025
  }
25025
25026
  if (e.args.which === 13 && e.args.code === 'Enter') {
25026
25027
  if (isNullOrUndefined(this.startNode.closest('LI')) && isNullOrUndefined(this.endNode.closest('LI')) && isTableEnter &&
@@ -25106,7 +25107,10 @@ class EnterKeyAction {
25106
25107
  isFocusedFirst = true;
25107
25108
  }
25108
25109
  this.removeBRElement(nearBlockNode);
25109
- if (((this.range.startOffset === 0 && this.range.endOffset === 0) || isFocusedFirst) &&
25110
+ const fireFoxEnterAtMiddle = Browser.userAgent.indexOf('Firefox') != -1 && this.range.startOffset === 0 && this.range.startContainer === this.range.endContainer &&
25111
+ this.range.startContainer.nodeName === '#text' && !this.parent.formatter.editorManager.domNode.isBlockNode(this.range.startContainer.previousSibling) &&
25112
+ this.range.startContainer.parentElement === this.range.startContainer.previousSibling.parentElement;
25113
+ if (!fireFoxEnterAtMiddle && ((this.range.startOffset === 0 && this.range.endOffset === 0) || isFocusedFirst) &&
25110
25114
  !(!isNullOrUndefined(this.range.startContainer.previousSibling) &&
25111
25115
  (this.range.startContainer.previousSibling.nodeName === 'IMG' || this.range.startContainer.previousSibling.nodeName === 'BR'))) {
25112
25116
  let isNearBlockLengthZero;
@@ -25345,6 +25349,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
25345
25349
  let RichTextEditor = class RichTextEditor extends Component {
25346
25350
  constructor(options, element) {
25347
25351
  super(options, element);
25352
+ this.needsID = true;
25348
25353
  }
25349
25354
  /**
25350
25355
  * To provide the array of modules needed for component rendering
@@ -25429,7 +25434,6 @@ let RichTextEditor = class RichTextEditor extends Component {
25429
25434
  this.isFocusOut = false;
25430
25435
  this.isRTE = false;
25431
25436
  this.isBlur = true;
25432
- this.needsID = true;
25433
25437
  this.defaultResetValue = null;
25434
25438
  this.isResizeInitialized = false;
25435
25439
  }
@@ -26471,7 +26475,7 @@ let RichTextEditor = class RichTextEditor extends Component {
26471
26475
  if (this.valueContainer) {
26472
26476
  this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
26473
26477
  }
26474
- if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.trim() !== value.trim()) {
26478
+ if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.replace('&', '&').trim() !== value.trim()) {
26475
26479
  this.inputElement.innerHTML = value;
26476
26480
  }
26477
26481
  else if (this.editorMode === 'Markdown' && this.inputElement
@@ -27151,6 +27155,7 @@ let RichTextEditor = class RichTextEditor extends Component {
27151
27155
  }
27152
27156
  this.setProperties({ value: this.getUpdatedValue() }, true);
27153
27157
  this.valueContainer.value = this.value;
27158
+ this.isValueChangeBlurhandler = false;
27154
27159
  this.invokeChangeEvent();
27155
27160
  }
27156
27161
  updateIntervalValue() {
@@ -27206,6 +27211,7 @@ let RichTextEditor = class RichTextEditor extends Component {
27206
27211
  const value = this.getUpdatedValue();
27207
27212
  this.setProperties({ value: value });
27208
27213
  this.notify(toolbarRefresh, { args: e, documentNode: document });
27214
+ this.isValueChangeBlurhandler = true;
27209
27215
  this.invokeChangeEvent();
27210
27216
  this.isFocusOut = true;
27211
27217
  this.isBlur = false;
@@ -27253,7 +27259,8 @@ let RichTextEditor = class RichTextEditor extends Component {
27253
27259
  currentValue = this.value;
27254
27260
  }
27255
27261
  const eventArgs = {
27256
- value: currentValue
27262
+ value: currentValue,
27263
+ isInteracted: this.isValueChangeBlurhandler
27257
27264
  };
27258
27265
  if (this.value !== this.cloneValue) {
27259
27266
  this.trigger('change', eventArgs);