@syncfusion/ej2-richtexteditor 24.1.43 → 24.1.45

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.
@@ -16489,8 +16489,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16489
16489
  cursorNodes[0].firstElementChild.tagName.toLowerCase() === 'br')) {
16490
16490
  cursorNodes[0].innerHTML = '';
16491
16491
  }
16492
- if (cursorNodes.length === 1 && range.startOffset === 0 && (cursorNodes[0].nodeName === 'BR' ||
16493
- cursorNodes[0].nextSibling.nodeName === 'BR')) {
16492
+ if (cursorNodes.length === 1 && range.startOffset === 0 && (cursorNodes[0].nodeName === 'BR' || (isNullOrUndefined(cursorNodes[0].nextSibling) ? false : cursorNodes[0].nextSibling.nodeName === 'BR'))) {
16494
16493
  detach(cursorNodes[0].nodeName === '#text' ? cursorNodes[0].nextSibling : cursorNodes[0]);
16495
16494
  }
16496
16495
  cursorNode = this.getInsertNode(docElement, range, format, value).firstChild;
@@ -18930,7 +18929,8 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
18930
18929
  // eslint-disable-next-line
18931
18930
  var pattern = new RegExp(name, 'i');
18932
18931
  if ((value.replace(/"/g, '').replace(/ /g, '').toLowerCase() === name.replace(/"/g, '').replace(/ /g, '').toLowerCase()) ||
18933
- (value.split(',')[0] && value.split(',')[0].search(pattern) > -1)) {
18932
+ (value.split(',')[0] && !isNullOrUndefined(value.split(',')[0].trim().match(pattern)) &&
18933
+ value.split(',')[0].trim() === value.split(',')[0].trim().match(pattern)[0])) {
18934
18934
  index = pos;
18935
18935
  }
18936
18936
  }) && (index !== null)))) {
@@ -34799,6 +34799,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34799
34799
  }
34800
34800
  EventHandler.add(this.inputElement, 'keyup', this.keyUp, this);
34801
34801
  EventHandler.add(this.inputElement, 'paste', this.onPaste, this);
34802
+ EventHandler.add(this.inputElement, 'content-changed', this.contentChanged, this);
34802
34803
  EventHandler.add(this.inputElement, Browser.touchEndEvent, debounce(this.mouseUp, 30), this);
34803
34804
  EventHandler.add(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler, this);
34804
34805
  this.wireContextEvent();
@@ -34861,6 +34862,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34861
34862
  }
34862
34863
  EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
34863
34864
  EventHandler.remove(this.inputElement, 'paste', this.onPaste);
34865
+ EventHandler.remove(this.inputElement, 'content-changed', this.contentChanged);
34864
34866
  EventHandler.remove(this.inputElement, Browser.touchEndEvent, debounce(this.mouseUp, 30));
34865
34867
  EventHandler.remove(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler);
34866
34868
  this.unWireContextEvent();