@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.
@@ -5706,9 +5706,8 @@ class ToolbarRenderer {
5706
5706
  cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
5707
5707
  created: () => {
5708
5708
  const value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
5709
- colorPicker.setProperties({ value: value });
5710
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5711
- colorPicker.value = value;
5709
+ const cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5710
+ colorPicker.setProperties({ value: value, cssClass: cssClass });
5712
5711
  },
5713
5712
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
5714
5713
  modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),
@@ -8953,7 +8952,7 @@ class Count {
8953
8952
  }
8954
8953
  appendCount() {
8955
8954
  const htmlText = this.parent.editorMode === 'Markdown' ? this.editPanel.value :
8956
- (this.parent.getText().replace(/(\r\n|\n|\r|\t)/gm, ''));
8955
+ (isNullOrUndefined(this.parent.getText()) ? '' : (this.parent.getText().replace(/(\r\n|\n|\r|\t)/gm, '')));
8957
8956
  if (this.parent.editorMode !== 'Markdown' && htmlText.indexOf('\u200B') !== -1) {
8958
8957
  this.htmlLength = htmlText.replace(/\u200B/g, '').length;
8959
8958
  }
@@ -20165,12 +20164,13 @@ class MsWordPaste {
20165
20164
  this.filterStyles(elm, wordPasteStyleConfig);
20166
20165
  let resultElem;
20167
20166
  let fromClass = false;
20167
+ const regex = /^(p|div|li)\.(1|10|11)$/;
20168
20168
  for (let i = 0; i < keys.length; i++) {
20169
20169
  if (keys[i].split('.')[0] === '') {
20170
20170
  resultElem = elm.getElementsByClassName(keys[i].split('.')[1]);
20171
20171
  fromClass = true;
20172
20172
  }
20173
- else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') >= 0) {
20173
+ else if ((keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') >= 0) || (regex.test(keys[i]))) {
20174
20174
  continue;
20175
20175
  }
20176
20176
  else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') < 0) {
@@ -37191,7 +37191,7 @@ let RichTextEditor = class RichTextEditor extends Component {
37191
37191
  }
37192
37192
  }
37193
37193
  this.removeSelectionClassStates(valueElementWrapper);
37194
- return valueElementWrapper.innerHTML;
37194
+ return (this.editorMode === 'Markdown') ? valueElementWrapper.innerHTML.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&') : valueElementWrapper.innerHTML;
37195
37195
  }
37196
37196
  updateStatus(e) {
37197
37197
  if (!isNullOrUndefined(e.html) || !isNullOrUndefined(e.markdown)) {