@syncfusion/ej2-richtexteditor 26.2.9 → 26.2.10

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.
@@ -32030,9 +32030,7 @@ class PasteCleanup {
32030
32030
  dropArea: this.parent.inputElement,
32031
32031
  allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
32032
32032
  success: (e) => {
32033
- this.popupCloseTime = setTimeout(() => {
32034
- this.popupClose(this.popupObj, this.uploadObj, imgElem, e);
32035
- }, 900);
32033
+ this.popupClose(this.popupObj, this.uploadObj, imgElem, e);
32036
32034
  },
32037
32035
  uploading: (e) => {
32038
32036
  if (!this.parent.isServerRendered) {
@@ -32113,30 +32111,31 @@ class PasteCleanup {
32113
32111
  this.parent.inputElement.contentEditable = 'true';
32114
32112
  e.element = imgElem;
32115
32113
  e.detectImageSource = ImageInputSource.Pasted;
32116
- uploadObj.filesData.forEach((element) => {
32117
- if (element.statusCode === '2') {
32118
- this.parent.trigger(imageUploadSuccess, e, (e) => {
32119
- if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
32120
- const url = this.parent.insertImageSettings.path + e.file.name;
32121
- imgElem.src = url;
32122
- imgElem.setAttribute('alt', e.file.name);
32123
- }
32124
- });
32125
- }
32126
- else if (element.statusCode === '5') {
32127
- this.parent.trigger(imageRemoving, e, (e) => {
32128
- if (!isNullOrUndefined(e.element.src)) {
32129
- e.element.src = '';
32130
- }
32131
- });
32132
- }
32133
- });
32134
- popupObj.close();
32135
- imgElem.style.opacity = '1';
32136
- if (uploadObj && document.body.contains(uploadObj.element)) {
32137
- uploadObj.destroy();
32114
+ const element = e.file;
32115
+ if (element.statusCode === '2') {
32116
+ this.parent.trigger(imageUploadSuccess, e, (e) => {
32117
+ if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
32118
+ const url = this.parent.insertImageSettings.path + e.file.name;
32119
+ imgElem.src = url;
32120
+ imgElem.setAttribute('alt', e.file.name);
32121
+ }
32122
+ });
32138
32123
  }
32139
- this.toolbarEnableDisable(false);
32124
+ else if (element.statusCode === '5') {
32125
+ this.parent.trigger(imageRemoving, e, (e) => {
32126
+ if (!isNullOrUndefined(e.element.src)) {
32127
+ e.element.src = '';
32128
+ }
32129
+ });
32130
+ }
32131
+ this.popupCloseTime = setTimeout(function () {
32132
+ popupObj.close();
32133
+ imgElem.style.opacity = '1';
32134
+ this.toolbarEnableDisable(false);
32135
+ if (uploadObj && document.body.contains(uploadObj.element)) {
32136
+ uploadObj.destroy();
32137
+ }
32138
+ }.bind(this), 1500);
32140
32139
  }
32141
32140
  refreshPopup(imageElement, popupObj) {
32142
32141
  const imgPosition = this.parent.iframeSettings.enable ? this.parent.element.offsetTop +