@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.
@@ -12660,7 +12660,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
12660
12660
  InsertHtml.getNodeCollection = function (range, nodeSelection, node) {
12661
12661
  var nodes = [];
12662
12662
  if (range.startOffset === range.endOffset && range.startContainer === range.endContainer &&
12663
- range.startContainer.nodeName != 'BR' &&
12663
+ range.startContainer.nodeName != 'BR' && range.startContainer.childNodes.length > 0 &&
12664
12664
  (range.startContainer.nodeName === 'TD' || (range.startContainer.nodeType !== 3 &&
12665
12665
  node.classList && node.classList.contains('pasteContent')))) {
12666
12666
  nodes.push(range.startContainer.childNodes[range.endOffset]);
@@ -12713,7 +12713,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
12713
12713
  node.firstElementChild.insertAdjacentElement('afterend', liNode);
12714
12714
  }
12715
12715
  }
12716
- if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH') {
12716
+ if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH' || blockNode.nodeName === 'TR') {
12717
12717
  var tempSpan = createElement('span', { className: 'tempSpan' });
12718
12718
  range.insertNode(tempSpan);
12719
12719
  tempSpan.parentNode.replaceChild(node, tempSpan);
@@ -19746,6 +19746,7 @@ var FullScreen = /** @__PURE__ @class */ (function () {
19746
19746
  baseToolbar: _this.parent.getBaseToolbarObject()
19747
19747
  });
19748
19748
  }
19749
+ _this.parent.refreshUI();
19749
19750
  _this.parent.trigger(actionComplete, { requestType: 'Maximize', targetItem: 'Maximize', args: event });
19750
19751
  }
19751
19752
  });
@@ -25255,7 +25256,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
25255
25256
  blockElement = curElement;
25256
25257
  curElement = curElement.parentElement;
25257
25258
  }
25258
- isTableEnter = blockElement.tagName === 'TD' ? false : true;
25259
+ isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
25259
25260
  }
25260
25261
  if (e.args.which === 13 && e.args.code === 'Enter') {
25261
25262
  if (isNullOrUndefined(this.startNode.closest('LI')) && isNullOrUndefined(this.endNode.closest('LI')) && isTableEnter &&
@@ -25341,7 +25342,10 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
25341
25342
  isFocusedFirst = true;
25342
25343
  }
25343
25344
  _this.removeBRElement(nearBlockNode);
25344
- if (((_this.range.startOffset === 0 && _this.range.endOffset === 0) || isFocusedFirst) &&
25345
+ var fireFoxEnterAtMiddle = Browser.userAgent.indexOf('Firefox') != -1 && _this.range.startOffset === 0 && _this.range.startContainer === _this.range.endContainer &&
25346
+ _this.range.startContainer.nodeName === '#text' && !_this.parent.formatter.editorManager.domNode.isBlockNode(_this.range.startContainer.previousSibling) &&
25347
+ _this.range.startContainer.parentElement === _this.range.startContainer.previousSibling.parentElement;
25348
+ if (!fireFoxEnterAtMiddle && ((_this.range.startOffset === 0 && _this.range.endOffset === 0) || isFocusedFirst) &&
25345
25349
  !(!isNullOrUndefined(_this.range.startContainer.previousSibling) &&
25346
25350
  (_this.range.startContainer.previousSibling.nodeName === 'IMG' || _this.range.startContainer.previousSibling.nodeName === 'BR'))) {
25347
25351
  var isNearBlockLengthZero = void 0;
@@ -25605,7 +25609,9 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
25605
25609
  var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
25606
25610
  __extends$4(RichTextEditor, _super);
25607
25611
  function RichTextEditor(options, element) {
25608
- return _super.call(this, options, element) || this;
25612
+ var _this = _super.call(this, options, element) || this;
25613
+ _this.needsID = true;
25614
+ return _this;
25609
25615
  }
25610
25616
  /**
25611
25617
  * To provide the array of modules needed for component rendering
@@ -25690,7 +25696,6 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
25690
25696
  this.isFocusOut = false;
25691
25697
  this.isRTE = false;
25692
25698
  this.isBlur = true;
25693
- this.needsID = true;
25694
25699
  this.defaultResetValue = null;
25695
25700
  this.isResizeInitialized = false;
25696
25701
  };
@@ -26734,7 +26739,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
26734
26739
  if (this.valueContainer) {
26735
26740
  this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
26736
26741
  }
26737
- if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.trim() !== value.trim()) {
26742
+ if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.replace('&', '&').trim() !== value.trim()) {
26738
26743
  this.inputElement.innerHTML = value;
26739
26744
  }
26740
26745
  else if (this.editorMode === 'Markdown' && this.inputElement
@@ -27415,6 +27420,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
27415
27420
  }
27416
27421
  this.setProperties({ value: this.getUpdatedValue() }, true);
27417
27422
  this.valueContainer.value = this.value;
27423
+ this.isValueChangeBlurhandler = false;
27418
27424
  this.invokeChangeEvent();
27419
27425
  };
27420
27426
  RichTextEditor.prototype.updateIntervalValue = function () {
@@ -27470,6 +27476,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
27470
27476
  var value = this.getUpdatedValue();
27471
27477
  this.setProperties({ value: value });
27472
27478
  this.notify(toolbarRefresh, { args: e, documentNode: document });
27479
+ this.isValueChangeBlurhandler = true;
27473
27480
  this.invokeChangeEvent();
27474
27481
  this.isFocusOut = true;
27475
27482
  this.isBlur = false;
@@ -27517,7 +27524,8 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
27517
27524
  currentValue = this.value;
27518
27525
  }
27519
27526
  var eventArgs = {
27520
- value: currentValue
27527
+ value: currentValue,
27528
+ isInteracted: this.isValueChangeBlurhandler
27521
27529
  };
27522
27530
  if (this.value !== this.cloneValue) {
27523
27531
  this.trigger('change', eventArgs);