@syncfusion/ej2-richtexteditor 24.1.41 → 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)))) {
@@ -21361,8 +21361,11 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
21361
21361
  tempDivElem.innerHTML = value;
21362
21362
  var isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
21363
21363
  !isNullOrUndefined(tempDivElem.querySelector('table'));
21364
- this.parent.trigger(cleanupResizeElements, { value: value }, function (args) {
21365
- value = args.value;
21364
+ this.parent.notify(cleanupResizeElements, {
21365
+ value: value,
21366
+ callBack: function (currentValue) {
21367
+ value = currentValue;
21368
+ }
21366
21369
  });
21367
21370
  if (this.parent.pasteCleanupSettings.prompt) {
21368
21371
  if (isValueNotEmpty) {
@@ -34532,7 +34535,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34532
34535
  };
34533
34536
  RichTextEditor.prototype.cleanupResizeElements = function (args) {
34534
34537
  var value = this.removeResizeElement(args.value);
34535
- return value;
34538
+ args.callBack(value);
34536
34539
  };
34537
34540
  RichTextEditor.prototype.removeResizeElement = function (value) {
34538
34541
  var valueElementWrapper = document.createElement("div");
@@ -34796,6 +34799,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34796
34799
  }
34797
34800
  EventHandler.add(this.inputElement, 'keyup', this.keyUp, this);
34798
34801
  EventHandler.add(this.inputElement, 'paste', this.onPaste, this);
34802
+ EventHandler.add(this.inputElement, 'content-changed', this.contentChanged, this);
34799
34803
  EventHandler.add(this.inputElement, Browser.touchEndEvent, debounce(this.mouseUp, 30), this);
34800
34804
  EventHandler.add(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler, this);
34801
34805
  this.wireContextEvent();
@@ -34858,6 +34862,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34858
34862
  }
34859
34863
  EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
34860
34864
  EventHandler.remove(this.inputElement, 'paste', this.onPaste);
34865
+ EventHandler.remove(this.inputElement, 'content-changed', this.contentChanged);
34861
34866
  EventHandler.remove(this.inputElement, Browser.touchEndEvent, debounce(this.mouseUp, 30));
34862
34867
  EventHandler.remove(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler);
34863
34868
  this.unWireContextEvent();