@syncfusion/ej2-richtexteditor 20.4.38 → 20.4.42

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.
@@ -4754,6 +4754,9 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
4754
4754
  */
4755
4755
  Toolbar$$1.prototype.updateItem = function (args) {
4756
4756
  var item = this.tools[args.updateItem.toLocaleLowerCase()];
4757
+ if (this.parent.locale !== 'en-US') {
4758
+ item.tooltip = getTooltipText(args.updateItem.toLocaleLowerCase(), this.locator);
4759
+ }
4757
4760
  var trgItem = this.tools[args.targetItem.toLocaleLowerCase()];
4758
4761
  var index = getTBarItemsIndex(getCollection(trgItem.subCommand), args.baseToolbar.toolbarObj.items)[0];
4759
4762
  if (!isNullOrUndefined(index)) {
@@ -17753,10 +17756,11 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
17753
17756
  var formatCollection = JSON.parse(JSON.stringify(statusCollection));
17754
17757
  var nodeCollection = JSON.parse(JSON.stringify(statusCollection));
17755
17758
  var nodeSelection = new NodeSelection();
17756
- var nodes = documentNode ? [documentNode] : nodeSelection.getNodeCollection(nodeSelection.getRange(docElement));
17759
+ var range = nodeSelection.getRange(docElement);
17760
+ var nodes = documentNode ? [documentNode] : range.collapsed ? nodeSelection.getNodeCollection(range) :
17761
+ nodeSelection.getSelectionNodeCollectionBr(range);
17757
17762
  var nodesLength = nodes.length;
17758
17763
  var isNodeChanged = false;
17759
- var range = nodeSelection.getRange(docElement);
17760
17764
  for (var index = 0; index < nodes.length; index++) {
17761
17765
  while (nodes[index].nodeType === 3 && range.startContainer.nodeType === 3 && nodes[index].parentNode &&
17762
17766
  nodes[index].parentNode.lastElementChild && nodes[index].parentNode.lastElementChild.nodeName !== 'BR' &&
@@ -18580,22 +18584,32 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
18580
18584
  }
18581
18585
  var previousLength = this.parent.inputElement.innerHTML.length;
18582
18586
  var currentLength = this.parent.inputElement.innerHTML.replace(regEx, '').length;
18587
+ var focusNode = range.startContainer;
18583
18588
  if (previousLength > currentLength) {
18584
18589
  var currentChild = this.parent.inputElement.firstChild;
18585
18590
  while (!isNullOrUndefined(currentChild) && currentChild.textContent.replace(regEx, '').trim().length > 0) {
18586
18591
  currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
18587
18592
  currentChild = currentChild.nextElementSibling;
18588
18593
  }
18589
- if (this.parent.inputElement.querySelector('.currentStartMark').childNodes.length > 1) {
18590
- var currentChild_1 = this.parent.inputElement.querySelector('.currentStartMark').childNodes;
18591
- for (var i = 0; i < currentChild_1.length; i++) {
18592
- if (currentChild_1[i].nodeName === '#text' && currentChild_1[i].textContent.length === 0) {
18593
- detach(currentChild_1[i]);
18594
+ var currentChildNode = this.parent.inputElement.querySelector('.currentStartMark').childNodes;
18595
+ if (currentChildNode.length > 1) {
18596
+ for (var i = 0; i < currentChildNode.length; i++) {
18597
+ if (currentChildNode[i].nodeName === '#text' && currentChildNode[i].textContent.length === 0) {
18598
+ detach(currentChildNode[i]);
18594
18599
  i--;
18595
18600
  }
18601
+ if (focusNode.textContent.replace(regEx, '') === currentChildNode[i].textContent) {
18602
+ pointer = focusNode.textContent.length > 1 ? focusNode.textContent.length - 1 : focusNode.textContent.length;
18603
+ focusNode = currentChildNode[i];
18604
+ }
18596
18605
  }
18597
18606
  }
18598
- this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.parent.inputElement.querySelector('.currentStartMark').childNodes[0], pointer);
18607
+ else if (currentChildNode.length === 1) {
18608
+ if (focusNode.textContent.replace(regEx, '') === currentChildNode[0].textContent) {
18609
+ focusNode = currentChildNode[0];
18610
+ }
18611
+ }
18612
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), focusNode, pointer);
18599
18613
  }
18600
18614
  var currentElem = this.parent.inputElement.querySelector('.currentStartMark');
18601
18615
  if (!isNullOrUndefined(currentElem)) {
@@ -20656,6 +20670,7 @@ var FullScreen = /** @__PURE__ @class */ (function () {
20656
20670
  _this.parent.toolbarModule.addFixedTBarClass();
20657
20671
  }
20658
20672
  }
20673
+ _this.parent.refreshUI();
20659
20674
  _this.parent.trigger(actionComplete, { requestType: 'Minimize', targetItem: 'Minimize', args: event });
20660
20675
  }
20661
20676
  });