@syncfusion/ej2-richtexteditor 20.4.38 → 20.4.40

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.
@@ -4738,7 +4738,10 @@ class Toolbar$2 {
4738
4738
  * @deprecated
4739
4739
  */
4740
4740
  updateItem(args) {
4741
- const item = this.tools[args.updateItem.toLocaleLowerCase()];
4741
+ let item = this.tools[args.updateItem.toLocaleLowerCase()];
4742
+ if (this.parent.locale !== 'en-US') {
4743
+ item.tooltip = getTooltipText(args.updateItem.toLocaleLowerCase(), this.locator);
4744
+ }
4742
4745
  const trgItem = this.tools[args.targetItem.toLocaleLowerCase()];
4743
4746
  const index = getTBarItemsIndex(getCollection(trgItem.subCommand), args.baseToolbar.toolbarObj.items)[0];
4744
4747
  if (!isNullOrUndefined(index)) {
@@ -18507,22 +18510,32 @@ class HtmlEditor {
18507
18510
  }
18508
18511
  const previousLength = this.parent.inputElement.innerHTML.length;
18509
18512
  const currentLength = this.parent.inputElement.innerHTML.replace(regEx, '').length;
18513
+ let focusNode = range.startContainer;
18510
18514
  if (previousLength > currentLength) {
18511
18515
  let currentChild = this.parent.inputElement.firstChild;
18512
18516
  while (!isNullOrUndefined(currentChild) && currentChild.textContent.replace(regEx, '').trim().length > 0) {
18513
18517
  currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
18514
18518
  currentChild = currentChild.nextElementSibling;
18515
18519
  }
18516
- if (this.parent.inputElement.querySelector('.currentStartMark').childNodes.length > 1) {
18517
- const currentChild = this.parent.inputElement.querySelector('.currentStartMark').childNodes;
18518
- for (let i = 0; i < currentChild.length; i++) {
18519
- if (currentChild[i].nodeName === '#text' && currentChild[i].textContent.length === 0) {
18520
- detach(currentChild[i]);
18520
+ const currentChildNode = this.parent.inputElement.querySelector('.currentStartMark').childNodes;
18521
+ if (currentChildNode.length > 1) {
18522
+ for (let i = 0; i < currentChildNode.length; i++) {
18523
+ if (currentChildNode[i].nodeName === '#text' && currentChildNode[i].textContent.length === 0) {
18524
+ detach(currentChildNode[i]);
18521
18525
  i--;
18522
18526
  }
18527
+ if (focusNode.textContent.replace(regEx, '') === currentChildNode[i].textContent) {
18528
+ pointer = focusNode.textContent.length > 1 ? focusNode.textContent.length - 1 : focusNode.textContent.length;
18529
+ focusNode = currentChildNode[i];
18530
+ }
18523
18531
  }
18524
18532
  }
18525
- this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.parent.inputElement.querySelector('.currentStartMark').childNodes[0], pointer);
18533
+ else if (currentChildNode.length === 1) {
18534
+ if (focusNode.textContent.replace(regEx, '') === currentChildNode[0].textContent) {
18535
+ focusNode = currentChildNode[0];
18536
+ }
18537
+ }
18538
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), focusNode, pointer);
18526
18539
  }
18527
18540
  const currentElem = this.parent.inputElement.querySelector('.currentStartMark');
18528
18541
  if (!isNullOrUndefined(currentElem)) {
@@ -20569,6 +20582,7 @@ class FullScreen {
20569
20582
  this.parent.toolbarModule.addFixedTBarClass();
20570
20583
  }
20571
20584
  }
20585
+ this.parent.refreshUI();
20572
20586
  this.parent.trigger(actionComplete, { requestType: 'Minimize', targetItem: 'Minimize', args: event });
20573
20587
  }
20574
20588
  });