@syncfusion/ej2-richtexteditor 23.1.44 → 23.2.5

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.
@@ -2897,7 +2897,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
2897
2897
  var formatItems$$1 = e.parent.format.types;
2898
2898
  var formatContent = isNullOrUndefined(e.parent.format.default) ? formatItems$$1[0].text :
2899
2899
  e.parent.format.default;
2900
- result = getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
2900
+ result = value === 'empty' ? '' : getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
2901
2901
  dropDown.formatDropDown.content = ('<span style="display: inline-flex;' +
2902
2902
  'width:' + e.parent.format.width + '" >' +
2903
2903
  '<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
@@ -2923,7 +2923,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
2923
2923
  break;
2924
2924
  }
2925
2925
  var fontNameItems = e.parent.fontFamily.items;
2926
- result = getDropDownValue(fontNameItems, value, 'value', 'text');
2926
+ result = value === 'empty' ? '' : getDropDownValue(fontNameItems, value, 'value', 'text');
2927
2927
  var fontNameContent = isNullOrUndefined(e.parent.fontFamily.default) ? fontNameItems[0].text :
2928
2928
  e.parent.fontFamily.default;
2929
2929
  var name_1 = (isNullOrUndefined(result) ? fontNameContent : result);
@@ -2942,7 +2942,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
2942
2942
  var fontSizeItems = e.parent.fontSize.items;
2943
2943
  var fontSizeContent = isNullOrUndefined(e.parent.fontSize.default) ? fontSizeItems[1].text :
2944
2944
  e.parent.fontSize.default;
2945
- result = getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
2945
+ result = value === 'empty' ? '' : getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
2946
2946
  dropDown.fontSizeDropDown.content = ('<span style="display: inline-flex;' +
2947
2947
  'width:' + e.parent.fontSize.width + '" >' +
2948
2948
  '<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
@@ -16508,7 +16508,14 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16508
16508
  }
16509
16509
  var formatNodeStyles = formatNode.getAttribute('style');
16510
16510
  var formatNodeTagName = formatNode.tagName;
16511
- var child = InsertMethods.unwrap(formatNode);
16511
+ var child;
16512
+ if (formatNodeTagName === 'A' && format === 'underline') {
16513
+ formatNode.style.textDecoration = 'none';
16514
+ child = [formatNode];
16515
+ }
16516
+ else {
16517
+ child = InsertMethods.unwrap(formatNode);
16518
+ }
16512
16519
  if (child[0] && !isFontStyle) {
16513
16520
  var nodeTraverse = child[index] ? child[index] : child[0];
16514
16521
  var textNode = nodeTraverse;
@@ -18623,12 +18630,18 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
18623
18630
  if ((index === 0 && formatCollection.fontcolor) || !formatCollection.fontcolor) {
18624
18631
  nodeCollection.fontcolor = formatCollection.fontcolor;
18625
18632
  }
18626
- if ((index === 0 && formatCollection.fontname) || !formatCollection.fontname) {
18633
+ if (index === 0 && formatCollection.fontname) {
18627
18634
  nodeCollection.fontname = formatCollection.fontname;
18628
18635
  }
18629
- if ((index === 0 && formatCollection.fontsize) || !formatCollection.fontsize) {
18636
+ else {
18637
+ nodeCollection.fontname = formatCollection.fontname === nodeCollection.fontname ? formatCollection.fontname : 'empty';
18638
+ }
18639
+ if (index === 0 && formatCollection.fontsize) {
18630
18640
  nodeCollection.fontsize = formatCollection.fontsize;
18631
18641
  }
18642
+ else {
18643
+ nodeCollection.fontsize = formatCollection.fontsize === nodeCollection.fontsize ? formatCollection.fontsize : 'empty';
18644
+ }
18632
18645
  if ((index === 0 && formatCollection.backgroundcolor) || !formatCollection.backgroundcolor) {
18633
18646
  nodeCollection.backgroundcolor = formatCollection.backgroundcolor;
18634
18647
  }
@@ -18641,9 +18654,12 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
18641
18654
  if ((index === 0 && formatCollection.alignments) || !formatCollection.alignments) {
18642
18655
  nodeCollection.alignments = formatCollection.alignments;
18643
18656
  }
18644
- if ((index === 0 && formatCollection.formats) || !formatCollection.formats) {
18657
+ if (index === 0 && formatCollection.formats) {
18645
18658
  nodeCollection.formats = formatCollection.formats;
18646
18659
  }
18660
+ else {
18661
+ nodeCollection.formats = formatCollection.formats === nodeCollection.formats ? formatCollection.formats : 'empty';
18662
+ }
18647
18663
  if ((index === 0 && formatCollection.createlink) || !formatCollection.createlink) {
18648
18664
  nodeCollection.createlink = formatCollection.createlink;
18649
18665
  }
@@ -34209,7 +34225,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34209
34225
  trg.setAttribute('tabindex', '-1');
34210
34226
  }
34211
34227
  }
34212
- else if (closest(trg, '[aria-owns="' + this.getID() + '"]')) {
34228
+ else if (closest(trg, '[aria-owns="' + this.getID() + '"]') || closest(trg, '.' + CLS_RTE_ELEMENTS)) {
34213
34229
  this.isBlur = false;
34214
34230
  }
34215
34231
  else {