@syncfusion/ej2-richtexteditor 26.1.42 → 26.2.5

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.1.42
3
+ * version : 26.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -0,0 +1 @@
1
+ hotfix/26.1.35_Vol2
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-richtexteditor@*",
3
- "_id": "@syncfusion/ej2-richtexteditor@26.1.41",
3
+ "_id": "@syncfusion/ej2-richtexteditor@26.2.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Ei7JWoJPmb2CEUXhrNtZtNR2E5JUlNKwRaZLAgdFyQb9jz+kRqHCsFYCwaEQyJZY7GYKRlYE0MOxVyITi5ETVw==",
5
+ "_integrity": "sha512-zIes3XuylYyCd+vFECdIDftW6gnGOsdvC5SSd4O1ZmrfqxHRwucGB3oJ9iv/sMPyHfsvNiIkaODKd7Uz5R3F+g==",
6
6
  "_location": "/@syncfusion/ej2-richtexteditor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -25,8 +25,8 @@
25
25
  "/@syncfusion/ej2-react-richtexteditor",
26
26
  "/@syncfusion/ej2-vue-richtexteditor"
27
27
  ],
28
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.1.41.tgz",
29
- "_shasum": "2e0f1e3dbbedf137a93f185cb21172b4b8b35d82",
28
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.2.4.tgz",
29
+ "_shasum": "2e04b0ac18e0cceadfd79a51cab13cad5d590238",
30
30
  "_spec": "@syncfusion/ej2-richtexteditor@*",
31
31
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
32
32
  "author": {
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "bundleDependencies": false,
39
39
  "dependencies": {
40
- "@syncfusion/ej2-base": "~26.1.42",
41
- "@syncfusion/ej2-buttons": "~26.1.40",
42
- "@syncfusion/ej2-filemanager": "~26.1.41",
43
- "@syncfusion/ej2-inputs": "~26.1.42",
44
- "@syncfusion/ej2-navigations": "~26.1.41",
45
- "@syncfusion/ej2-popups": "~26.1.42",
46
- "@syncfusion/ej2-splitbuttons": "~26.1.35"
40
+ "@syncfusion/ej2-base": "~26.2.5",
41
+ "@syncfusion/ej2-buttons": "~26.2.5",
42
+ "@syncfusion/ej2-filemanager": "~26.2.5",
43
+ "@syncfusion/ej2-inputs": "~26.2.5",
44
+ "@syncfusion/ej2-navigations": "~26.2.5",
45
+ "@syncfusion/ej2-popups": "~26.2.5",
46
+ "@syncfusion/ej2-splitbuttons": "~26.2.5"
47
47
  },
48
48
  "deprecated": false,
49
49
  "description": "Essential JS 2 RichTextEditor component",
@@ -79,6 +79,6 @@
79
79
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
80
80
  },
81
81
  "typings": "index.d.ts",
82
- "version": "26.1.42",
82
+ "version": "26.2.5",
83
83
  "sideEffects": false
84
84
  }
@@ -203,6 +203,7 @@ var InsertHtml = /** @class */ (function () {
203
203
  return null;
204
204
  };
205
205
  InsertHtml.pasteInsertHTML = function (nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction) {
206
+ var _this = this;
206
207
  var isCursor = range.startOffset === range.endOffset &&
207
208
  range.startContainer === range.endContainer;
208
209
  if (isCursor && range.startContainer === editNode && editNode.textContent === '') {
@@ -369,6 +370,17 @@ var InsertHtml = /** @class */ (function () {
369
370
  else {
370
371
  this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction);
371
372
  }
373
+ var spanAligns = editNode.querySelectorAll('span[style*="text-align"]');
374
+ if (spanAligns.length > 0) {
375
+ spanAligns.forEach(function (spanAlign) {
376
+ if (!isNOU(spanAlign)) {
377
+ var blockAlign = _this.getImmediateBlockNode(spanAlign, null);
378
+ if (blockAlign && blockAlign.textContent.trim() === spanAlign.textContent.trim()) {
379
+ blockAlign.style.textAlign = spanAlign.style.textAlign;
380
+ }
381
+ }
382
+ });
383
+ }
372
384
  };
373
385
  InsertHtml.placeCursorEnd = function (lastSelectionNode, node, nodeSelection, docElement, editNode) {
374
386
  lastSelectionNode = lastSelectionNode.nodeName === 'BR' ? (isNOU(lastSelectionNode.previousSibling) ? lastSelectionNode.parentNode
@@ -34,7 +34,6 @@ export declare class PasteCleanup {
34
34
  private destroy;
35
35
  private removeEventListener;
36
36
  private pasteClean;
37
- private fireFoxImageUpload;
38
37
  private splitBreakLine;
39
38
  private makeSpace;
40
39
  private imgUploading;
@@ -5,7 +5,6 @@ import { isNullOrUndefined as isNOU, isNullOrUndefined, detach, extend, addClass
5
5
  import { getUniqueID, Browser, closest } from '@syncfusion/ej2-base';
6
6
  import { CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT } from '../base/classes';
7
7
  import { CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT } from '../base/classes';
8
- import { CLS_RTE_IMAGE, CLS_IMGINLINE, CLS_IMGBREAK } from '../base/classes';
9
8
  import { pasteCleanupGroupingTags } from '../../common/config';
10
9
  import { NodeSelection } from '../../selection/selection';
11
10
  import * as EVENTS from './../../common/constant';
@@ -190,13 +189,6 @@ var PasteCleanup = /** @class */ (function () {
190
189
  e.args.preventDefault();
191
190
  this.pasteDialog(value, args, isClipboardHTMLDataNull);
192
191
  }
193
- else if (Browser.userAgent.indexOf('Firefox') !== -1 && isNOU(file)) {
194
- this.fireFoxImageUpload();
195
- }
196
- }
197
- else if (!isValueNotEmpty && !this.parent.pasteCleanupSettings.plainText &&
198
- Browser.userAgent.indexOf('Firefox') !== -1) {
199
- this.fireFoxImageUpload();
200
192
  }
201
193
  else if (this.parent.pasteCleanupSettings.plainText) {
202
194
  e.args.preventDefault();
@@ -212,33 +204,6 @@ var PasteCleanup = /** @class */ (function () {
212
204
  }
213
205
  }
214
206
  };
215
- PasteCleanup.prototype.fireFoxImageUpload = function () {
216
- var _this = this;
217
- this.fireFoxUploadTime = setTimeout(function () {
218
- if (Browser.userAgent.indexOf('Firefox') !== -1) {
219
- var currentFocusNode = _this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startContainer;
220
- if (currentFocusNode.nodeName !== '#text') {
221
- // eslint-disable-next-line
222
- currentFocusNode = currentFocusNode.childNodes[_this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startOffset];
223
- }
224
- if (currentFocusNode.previousSibling.nodeName === 'IMG') {
225
- if (!isNOU(currentFocusNode.previousSibling.getAttribute('src'))) {
226
- currentFocusNode.previousSibling.classList.add('pasteContent_Img');
227
- }
228
- currentFocusNode.previousSibling.classList.add(CLS_RTE_IMAGE);
229
- if (_this.parent.insertImageSettings.display === 'inline') {
230
- currentFocusNode.previousSibling.classList.add(CLS_IMGINLINE);
231
- }
232
- else {
233
- currentFocusNode.previousSibling.classList.add(CLS_IMGBREAK);
234
- }
235
- currentFocusNode.previousSibling.classList.add();
236
- _this.setImageProperties(currentFocusNode.previousSibling);
237
- }
238
- }
239
- _this.imgUploading(_this.parent.inputElement);
240
- }, 500);
241
- };
242
207
  PasteCleanup.prototype.splitBreakLine = function (value) {
243
208
  var enterSplitText = value.split('\n');
244
209
  var contentInnerElem = '';
@@ -452,11 +417,22 @@ var PasteCleanup = /** @class */ (function () {
452
417
  this.parent.inputElement.contentEditable = 'true';
453
418
  e.element = imgElem;
454
419
  e.detectImageSource = ImageInputSource.Pasted;
455
- this.parent.trigger(events.imageUploadSuccess, e, function (e) {
456
- if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
457
- var url = _this.parent.insertImageSettings.path + e.file.name;
458
- imgElem.src = url;
459
- imgElem.setAttribute('alt', e.file.name);
420
+ uploadObj.filesData.forEach(function (element) {
421
+ if (element.statusCode === '2') {
422
+ _this.parent.trigger(events.imageUploadSuccess, e, function (e) {
423
+ if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
424
+ var url = _this.parent.insertImageSettings.path + e.file.name;
425
+ imgElem.src = url;
426
+ imgElem.setAttribute('alt', e.file.name);
427
+ }
428
+ });
429
+ }
430
+ else if (element.statusCode === '5') {
431
+ _this.parent.trigger(events.imageRemoving, e, function (e) {
432
+ if (!isNullOrUndefined(e.element.src)) {
433
+ e.element.src = '';
434
+ }
435
+ });
460
436
  }
461
437
  });
462
438
  popupObj.close();
@@ -761,7 +761,7 @@ var RichTextEditor = /** @class */ (function (_super) {
761
761
  var preventingMention = false;
762
762
  if (this.editorMode === 'HTML') {
763
763
  var range = this.getRange();
764
- preventingMention = !isNOU(range.startContainer) && range.startContainer === range.endContainer && range.endContainer.childNodes.length > 1 && !isNOU(range.startContainer.childNodes[range.startOffset - 1]) && range.startContainer.childNodes[range.startOffset - 1].nodeName === '#text' && !isNOU(range.startContainer.childNodes[range.startOffset - 1].previousSibling) && range.startContainer.childNodes[range.startOffset - 1].textContent.charCodeAt(0) === 32 && range.startContainer.childNodes[1].previousSibling.classList.contains("e-mention-chip");
764
+ preventingMention = !isNOU(range.startContainer) && range.startContainer === range.endContainer && range.endContainer.childNodes.length > 1 && !isNOU(range.startContainer.childNodes[range.startOffset - 1]) && range.startContainer.childNodes[range.startOffset - 1].nodeName === '#text' && !isNOU(range.startContainer.childNodes[range.startOffset - 1].previousSibling) && range.startContainer.childNodes[range.startOffset - 1].textContent.charCodeAt(0) === 32 && range.startContainer.childNodes[range.startOffset - 1].previousSibling.classList.contains("e-mention-chip");
765
765
  }
766
766
  var keyboardEventAction = ['insert-link', 'format-copy', 'format-paste', 'insert-image', 'insert-table', 'insert-audio', 'insert-video'];
767
767
  if (keyboardEventAction.indexOf(e.action) === -1 &&
@@ -1788,6 +1788,7 @@ var Image = /** @class */ (function () {
1788
1788
  var altText;
1789
1789
  var selectArgs;
1790
1790
  var filesData;
1791
+ var previousURL = null;
1791
1792
  this.uploadObj = new Uploader({
1792
1793
  asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
1793
1794
  dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
@@ -1843,6 +1844,10 @@ var Image = /** @class */ (function () {
1843
1844
  _this.parent.trigger(events.imageUploadSuccess, e, function (e) {
1844
1845
  if (!isNOU(_this.parent.insertImageSettings.path)) {
1845
1846
  var url = _this.parent.insertImageSettings.path + e.file.name;
1847
+ // Update the URL of the previously uploaded image
1848
+ if (!isNOU(previousURL) && e.operation === 'upload') {
1849
+ proxy.imageRemovePost(previousURL);
1850
+ }
1846
1851
  // eslint-disable-next-line
1847
1852
  var value = { url: url, selection: save };
1848
1853
  proxy.uploadUrl = {
@@ -1856,6 +1861,7 @@ var Image = /** @class */ (function () {
1856
1861
  }
1857
1862
  };
1858
1863
  proxy.inputUrl.setAttribute('disabled', 'true');
1864
+ previousURL = url;
1859
1865
  }
1860
1866
  if (e.operation === 'upload' && !isNOU(_this.dialogObj)) {
1861
1867
  _this.dialogObj.getButtons(0).element.removeAttribute('disabled');
@@ -47,7 +47,7 @@
47
47
  --color-sf-flyout-bg-color-pressed: #e0e0e0;
48
48
  --color-sf-flyout-bg-color-selected: #ebebeb;
49
49
  --color-sf-flyout-bg-color-focus: #f5f5f5;
50
- --color-sf-overlay-bg-color: #000;
50
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
51
51
  --color-sf-table-bg-color-hover: #f5f5f5;
52
52
  --color-sf-table-bg-color-pressed: #e0e0e0;
53
53
  --color-sf-table-bg-color-selected: #ebf3fc;
@@ -369,7 +369,7 @@
369
369
  --color-sf-flyout-bg-color-pressed: var(--color-sf-black);
370
370
  --color-sf-flyout-bg-color-selected: #383838;
371
371
  --color-sf-flyout-bg-color-focus: var(--color-sf-flyout-bg-color-hover);
372
- --color-sf-overlay-bg-color: rgba($black, .4);
372
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
373
373
  --color-sf-table-bg-color-hover: #383838;
374
374
  --color-sf-table-bg-color-pressed: #2e2e2e;
375
375
  --color-sf-table-bg-color-selected: #082338;
@@ -711,9 +711,9 @@
711
711
  --color-sf-flyout-bg-color-pressed: var(--color-sf-content-bg-color-hover);
712
712
  --color-sf-flyout-bg-color-selected: var(--color-sf-content-bg-color-hover);
713
713
  --color-sf-flyout-bg-color-focus: var(--color-sf-content-bg-color-hover);
714
- --color-sf-overlay-bg-color: rgba($black, .4);
715
- --color-sf-table-bg-color-hover: var(--color-sf-black);
716
- --color-sf-table-bg-color-pressed: var(--color-sf-black);
714
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
715
+ --color-sf-table-bg-color-hover: #1a3bff;
716
+ --color-sf-table-bg-color-pressed: #1a3bff;
717
717
  --color-sf-table-bg-color-selected: #1a3bff;
718
718
  --color-sf-content-text-color: #fff;
719
719
  --color-sf-content-text-color-alt1: var(--color-sf-content-text-color);
@@ -732,12 +732,12 @@
732
732
  --color-sf-flyout-text-color-selected: var(--color-sf-content-text-color-hover);
733
733
  --color-sf-flyout-text-color-focus: var(--color-sf-content-text-color-hover);
734
734
  --color-sf-flyout-text-color-disabled: var(--color-sf-content-text-color-disabled);
735
- --color-sf-table-text-color-hover: var(--color-sf-content-text-color-hover);
736
- --color-sf-table-text-color-pressed: var(--color-sf-content-text-color-hover);
737
- --color-sf-table-text-color-selected: var(--color-sf-content-text-color-hover);
735
+ --color-sf-table-text-color-hover: #000;
736
+ --color-sf-table-text-color-pressed: #000;
737
+ --color-sf-table-text-color-selected: #000;
738
738
  --color-sf-icon-color: #fff;
739
- --color-sf-icon-color-hover: var(--color-sf-content-text-color-hover);
740
- --color-sf-icon-color-pressed: var(--color-sf-content-text-color-hover);
739
+ --color-sf-icon-color-hover: #000;
740
+ --color-sf-icon-color-pressed: #000;
741
741
  --color-sf-icon-color-disabled: var(--color-sf-content-text-color-disabled);
742
742
  --color-sf-border-light: #fff;
743
743
  --color-sf-border: var(--color-sf-border-light);
@@ -4613,7 +4613,7 @@ span.e-rte-videoboxmark {
4613
4613
  }
4614
4614
 
4615
4615
  .e-popup-overlay {
4616
- background-color: rgba(var(--color-sf-overlay-bg-color), 0.4);
4616
+ background-color: var(--color-sf-overlay-bg-color);
4617
4617
  }
4618
4618
 
4619
4619
  .e-rte-toolbar.e-extended-toolbar .e-toolbar-item.e-overlay .e-dropdown-btn {
@@ -47,7 +47,7 @@
47
47
  --color-sf-flyout-bg-color-pressed: #e0e0e0;
48
48
  --color-sf-flyout-bg-color-selected: #ebebeb;
49
49
  --color-sf-flyout-bg-color-focus: #f5f5f5;
50
- --color-sf-overlay-bg-color: #000;
50
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
51
51
  --color-sf-table-bg-color-hover: #f5f5f5;
52
52
  --color-sf-table-bg-color-pressed: #e0e0e0;
53
53
  --color-sf-table-bg-color-selected: #ebf3fc;
@@ -369,7 +369,7 @@
369
369
  --color-sf-flyout-bg-color-pressed: var(--color-sf-black);
370
370
  --color-sf-flyout-bg-color-selected: #383838;
371
371
  --color-sf-flyout-bg-color-focus: var(--color-sf-flyout-bg-color-hover);
372
- --color-sf-overlay-bg-color: rgba($black, .4);
372
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
373
373
  --color-sf-table-bg-color-hover: #383838;
374
374
  --color-sf-table-bg-color-pressed: #2e2e2e;
375
375
  --color-sf-table-bg-color-selected: #082338;
@@ -711,9 +711,9 @@
711
711
  --color-sf-flyout-bg-color-pressed: var(--color-sf-content-bg-color-hover);
712
712
  --color-sf-flyout-bg-color-selected: var(--color-sf-content-bg-color-hover);
713
713
  --color-sf-flyout-bg-color-focus: var(--color-sf-content-bg-color-hover);
714
- --color-sf-overlay-bg-color: rgba($black, .4);
715
- --color-sf-table-bg-color-hover: var(--color-sf-black);
716
- --color-sf-table-bg-color-pressed: var(--color-sf-black);
714
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
715
+ --color-sf-table-bg-color-hover: #1a3bff;
716
+ --color-sf-table-bg-color-pressed: #1a3bff;
717
717
  --color-sf-table-bg-color-selected: #1a3bff;
718
718
  --color-sf-content-text-color: #fff;
719
719
  --color-sf-content-text-color-alt1: var(--color-sf-content-text-color);
@@ -732,12 +732,12 @@
732
732
  --color-sf-flyout-text-color-selected: var(--color-sf-content-text-color-hover);
733
733
  --color-sf-flyout-text-color-focus: var(--color-sf-content-text-color-hover);
734
734
  --color-sf-flyout-text-color-disabled: var(--color-sf-content-text-color-disabled);
735
- --color-sf-table-text-color-hover: var(--color-sf-content-text-color-hover);
736
- --color-sf-table-text-color-pressed: var(--color-sf-content-text-color-hover);
737
- --color-sf-table-text-color-selected: var(--color-sf-content-text-color-hover);
735
+ --color-sf-table-text-color-hover: #000;
736
+ --color-sf-table-text-color-pressed: #000;
737
+ --color-sf-table-text-color-selected: #000;
738
738
  --color-sf-icon-color: #fff;
739
- --color-sf-icon-color-hover: var(--color-sf-content-text-color-hover);
740
- --color-sf-icon-color-pressed: var(--color-sf-content-text-color-hover);
739
+ --color-sf-icon-color-hover: #000;
740
+ --color-sf-icon-color-pressed: #000;
741
741
  --color-sf-icon-color-disabled: var(--color-sf-content-text-color-disabled);
742
742
  --color-sf-border-light: #fff;
743
743
  --color-sf-border: var(--color-sf-border-light);
@@ -4613,7 +4613,7 @@ span.e-rte-videoboxmark {
4613
4613
  }
4614
4614
 
4615
4615
  .e-popup-overlay {
4616
- background-color: rgba(var(--color-sf-overlay-bg-color), 0.4);
4616
+ background-color: var(--color-sf-overlay-bg-color);
4617
4617
  }
4618
4618
 
4619
4619
  .e-rte-toolbar.e-extended-toolbar .e-toolbar-item.e-overlay .e-dropdown-btn {