@syncfusion/ej2-richtexteditor 23.1.44 → 23.2.4

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.
@@ -2903,7 +2903,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
2903
2903
  const formatItems$$1 = e.parent.format.types;
2904
2904
  const formatContent = isNullOrUndefined(e.parent.format.default) ? formatItems$$1[0].text :
2905
2905
  e.parent.format.default;
2906
- result = getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
2906
+ result = value === 'empty' ? '' : getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
2907
2907
  dropDown.formatDropDown.content = ('<span style="display: inline-flex;' +
2908
2908
  'width:' + e.parent.format.width + '" >' +
2909
2909
  '<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
@@ -2929,7 +2929,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
2929
2929
  break;
2930
2930
  }
2931
2931
  const fontNameItems = e.parent.fontFamily.items;
2932
- result = getDropDownValue(fontNameItems, value, 'value', 'text');
2932
+ result = value === 'empty' ? '' : getDropDownValue(fontNameItems, value, 'value', 'text');
2933
2933
  const fontNameContent = isNullOrUndefined(e.parent.fontFamily.default) ? fontNameItems[0].text :
2934
2934
  e.parent.fontFamily.default;
2935
2935
  const name = (isNullOrUndefined(result) ? fontNameContent : result);
@@ -2948,7 +2948,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
2948
2948
  const fontSizeItems = e.parent.fontSize.items;
2949
2949
  const fontSizeContent = isNullOrUndefined(e.parent.fontSize.default) ? fontSizeItems[1].text :
2950
2950
  e.parent.fontSize.default;
2951
- result = getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
2951
+ result = value === 'empty' ? '' : getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
2952
2952
  dropDown.fontSizeDropDown.content = ('<span style="display: inline-flex;' +
2953
2953
  'width:' + e.parent.fontSize.width + '" >' +
2954
2954
  '<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
@@ -16391,7 +16391,14 @@ class SelectionCommands {
16391
16391
  }
16392
16392
  const formatNodeStyles = formatNode.getAttribute('style');
16393
16393
  const formatNodeTagName = formatNode.tagName;
16394
- const child = InsertMethods.unwrap(formatNode);
16394
+ let child;
16395
+ if (formatNodeTagName === 'A' && format === 'underline') {
16396
+ formatNode.style.textDecoration = 'none';
16397
+ child = [formatNode];
16398
+ }
16399
+ else {
16400
+ child = InsertMethods.unwrap(formatNode);
16401
+ }
16395
16402
  if (child[0] && !isFontStyle) {
16396
16403
  let nodeTraverse = child[index] ? child[index] : child[0];
16397
16404
  const textNode = nodeTraverse;
@@ -18493,12 +18500,18 @@ class ToolbarStatus {
18493
18500
  if ((index === 0 && formatCollection.fontcolor) || !formatCollection.fontcolor) {
18494
18501
  nodeCollection.fontcolor = formatCollection.fontcolor;
18495
18502
  }
18496
- if ((index === 0 && formatCollection.fontname) || !formatCollection.fontname) {
18503
+ if (index === 0 && formatCollection.fontname) {
18497
18504
  nodeCollection.fontname = formatCollection.fontname;
18498
18505
  }
18499
- if ((index === 0 && formatCollection.fontsize) || !formatCollection.fontsize) {
18506
+ else {
18507
+ nodeCollection.fontname = formatCollection.fontname === nodeCollection.fontname ? formatCollection.fontname : 'empty';
18508
+ }
18509
+ if (index === 0 && formatCollection.fontsize) {
18500
18510
  nodeCollection.fontsize = formatCollection.fontsize;
18501
18511
  }
18512
+ else {
18513
+ nodeCollection.fontsize = formatCollection.fontsize === nodeCollection.fontsize ? formatCollection.fontsize : 'empty';
18514
+ }
18502
18515
  if ((index === 0 && formatCollection.backgroundcolor) || !formatCollection.backgroundcolor) {
18503
18516
  nodeCollection.backgroundcolor = formatCollection.backgroundcolor;
18504
18517
  }
@@ -18511,9 +18524,12 @@ class ToolbarStatus {
18511
18524
  if ((index === 0 && formatCollection.alignments) || !formatCollection.alignments) {
18512
18525
  nodeCollection.alignments = formatCollection.alignments;
18513
18526
  }
18514
- if ((index === 0 && formatCollection.formats) || !formatCollection.formats) {
18527
+ if (index === 0 && formatCollection.formats) {
18515
18528
  nodeCollection.formats = formatCollection.formats;
18516
18529
  }
18530
+ else {
18531
+ nodeCollection.formats = formatCollection.formats === nodeCollection.formats ? formatCollection.formats : 'empty';
18532
+ }
18517
18533
  if ((index === 0 && formatCollection.createlink) || !formatCollection.createlink) {
18518
18534
  nodeCollection.createlink = formatCollection.createlink;
18519
18535
  }