@syncfusion/ej2-richtexteditor 26.1.35 → 26.1.38

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.
@@ -5714,9 +5714,8 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5714
5714
  cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
5715
5715
  created: function () {
5716
5716
  var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
5717
- colorPicker.setProperties({ value: value });
5718
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5719
- colorPicker.value = value;
5717
+ var cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5718
+ colorPicker.setProperties({ value: value, cssClass: cssClass });
5720
5719
  },
5721
5720
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
5722
5721
  modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),
@@ -9012,7 +9011,7 @@ var Count = /** @__PURE__ @class */ (function () {
9012
9011
  };
9013
9012
  Count.prototype.appendCount = function () {
9014
9013
  var htmlText = this.parent.editorMode === 'Markdown' ? this.editPanel.value :
9015
- (this.parent.getText().replace(/(\r\n|\n|\r|\t)/gm, ''));
9014
+ (isNullOrUndefined(this.parent.getText()) ? '' : (this.parent.getText().replace(/(\r\n|\n|\r|\t)/gm, '')));
9016
9015
  if (this.parent.editorMode !== 'Markdown' && htmlText.indexOf('\u200B') !== -1) {
9017
9016
  this.htmlLength = htmlText.replace(/\u200B/g, '').length;
9018
9017
  }
@@ -20298,12 +20297,13 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
20298
20297
  this.filterStyles(elm, wordPasteStyleConfig);
20299
20298
  var resultElem = void 0;
20300
20299
  var fromClass = false;
20300
+ var regex = /^(p|div|li)\.(1|10|11)$/;
20301
20301
  for (var i = 0; i < keys.length; i++) {
20302
20302
  if (keys[i].split('.')[0] === '') {
20303
20303
  resultElem = elm.getElementsByClassName(keys[i].split('.')[1]);
20304
20304
  fromClass = true;
20305
20305
  }
20306
- else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') >= 0) {
20306
+ else if ((keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') >= 0) || (regex.test(keys[i]))) {
20307
20307
  continue;
20308
20308
  }
20309
20309
  else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') < 0) {
@@ -37506,7 +37506,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
37506
37506
  }
37507
37507
  }
37508
37508
  this.removeSelectionClassStates(valueElementWrapper);
37509
- return valueElementWrapper.innerHTML;
37509
+ return (this.editorMode === 'Markdown') ? valueElementWrapper.innerHTML.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&') : valueElementWrapper.innerHTML;
37510
37510
  };
37511
37511
  RichTextEditor.prototype.updateStatus = function (e) {
37512
37512
  if (!isNullOrUndefined(e.html) || !isNullOrUndefined(e.markdown)) {