@syncfusion/ej2-richtexteditor 28.1.37 → 28.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.
@@ -28597,6 +28597,7 @@ class SelectionCommands {
28597
28597
  }
28598
28598
  else {
28599
28599
  InsertMethods.unwrap(cursorFormat);
28600
+ domSelection.setCursorPoint(docElement, cursorNode, 0);
28600
28601
  }
28601
28602
  }
28602
28603
  else {
@@ -33921,6 +33922,7 @@ class PasteCleanup {
33921
33922
  const isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
33922
33923
  !isNullOrUndefined(tempDivElem.querySelector('table'));
33923
33924
  const imgElements = tempDivElem.querySelectorAll('img');
33925
+ const base = this.parent.contentModule.getDocument().location.origin;
33924
33926
  imgElements.forEach((imgElement) => {
33925
33927
  let imageFileFormat;
33926
33928
  const imgElementSrc = imgElement.getAttribute('src');
@@ -33929,7 +33931,9 @@ class PasteCleanup {
33929
33931
  imageFileFormat = imgElementSrc.split(';')[0].split('/')[1];
33930
33932
  }
33931
33933
  else {
33932
- imageFileFormat = imgElementSrc.split('.').pop().toLowerCase();
33934
+ const parsedUrl = imgElementSrc.indexOf('http') > -1 ? new URL(imgElementSrc) : new URL(imgElementSrc, base);
33935
+ const path = parsedUrl.pathname;
33936
+ imageFileFormat = path.split('.').pop().toLowerCase();
33933
33937
  }
33934
33938
  if (!isNullOrUndefined(imageFileFormat) &&
33935
33939
  allowedTypes.every((type) => imageFileFormat !== type.substring(1).toLowerCase()) &&