@syncfusion/ej2-richtexteditor 28.1.35 → 28.1.36

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,12 +1,3 @@
1
- /*!
2
- * filename: index.d.ts
3
- * version : 28.1.35
4
- * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
- * Use of this code is subject to the terms of our license.
6
- * A copy of the current license can be obtained at any time by e-mailing
7
- * licensing@syncfusion.com. Any infringement will be prosecuted under
8
- * applicable laws.
9
- */
10
1
  import * as _richtexteditor from '@syncfusion/ej2-richtexteditor';
11
2
 
12
3
  export declare namespace ej {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-richtexteditor@*",
3
- "_id": "@syncfusion/ej2-richtexteditor@28.1.33",
3
+ "_id": "@syncfusion/ej2-richtexteditor@28.1.35",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-mN8hCtAtiPeUGZN481HxaYB228o+dOiXbBwRvDW5japhkE024Fi6ME8iHvMA/5h3jOE4XRLyY8tyQRaSh4nSmQ==",
5
+ "_integrity": "sha512-XvS4tdC4fw6B2RrZWOcdktXuzzA+1XNL32OGM1vKqgvcAte4gUtd264fj3Je7wpBZuDMIousyIwqzwc4rNiXhg==",
6
6
  "_location": "/@syncfusion/ej2-richtexteditor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,15 +18,14 @@
18
18
  },
19
19
  "_requiredBy": [
20
20
  "/",
21
- "/@syncfusion/ej2",
22
21
  "/@syncfusion/ej2-angular-richtexteditor",
23
22
  "/@syncfusion/ej2-gantt",
24
23
  "/@syncfusion/ej2-inplace-editor",
25
24
  "/@syncfusion/ej2-react-richtexteditor",
26
25
  "/@syncfusion/ej2-vue-richtexteditor"
27
26
  ],
28
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-28.1.33.tgz",
29
- "_shasum": "7608c2be43136ca949e6695ab69389e4efe07873",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-28.1.35.tgz",
28
+ "_shasum": "17c9393fda07e06cd70a77fac38a567ea35ca990",
30
29
  "_spec": "@syncfusion/ej2-richtexteditor@*",
31
30
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
32
31
  "author": {
@@ -38,11 +37,11 @@
38
37
  "bundleDependencies": false,
39
38
  "dependencies": {
40
39
  "@syncfusion/ej2-base": "~28.1.33",
41
- "@syncfusion/ej2-buttons": "~28.1.33",
42
- "@syncfusion/ej2-dropdowns": "~28.1.35",
43
- "@syncfusion/ej2-filemanager": "~28.1.33",
40
+ "@syncfusion/ej2-buttons": "~28.1.36",
41
+ "@syncfusion/ej2-dropdowns": "~28.1.36",
42
+ "@syncfusion/ej2-filemanager": "~28.1.36",
44
43
  "@syncfusion/ej2-inputs": "~28.1.33",
45
- "@syncfusion/ej2-navigations": "~28.1.35",
44
+ "@syncfusion/ej2-navigations": "~28.1.36",
46
45
  "@syncfusion/ej2-popups": "~28.1.33",
47
46
  "@syncfusion/ej2-splitbuttons": "~28.1.33"
48
47
  },
@@ -80,6 +79,6 @@
80
79
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
81
80
  },
82
81
  "typings": "index.d.ts",
83
- "version": "28.1.35",
82
+ "version": "28.1.36",
84
83
  "sideEffects": false
85
84
  }
@@ -190,6 +190,7 @@ var LinkCommand = /** @class */ (function () {
190
190
  if (child && child.length === 1) {
191
191
  e.item.selection.startContainer = e.item.selection.getNodeArray(child[child.length - 1], true);
192
192
  e.item.selection.endContainer = e.item.selection.startContainer;
193
+ e.item.selection.endOffset = child[child.length - 1].textContent.length;
193
194
  }
194
195
  e.item.selection = this.parent.domNode.saveMarker(e.item.selection);
195
196
  }
@@ -189,7 +189,8 @@ var MsWordPaste = /** @class */ (function () {
189
189
  imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
190
190
  imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0 &&
191
191
  imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0 &&
192
- imgElem[i].getAttribute('v:shapes').indexOf('img1') < 0) {
192
+ imgElem[i].getAttribute('v:shapes').indexOf('img1') < 0 &&
193
+ imgElem[i].getAttribute('v:shapes').indexOf('Immagine') < 0) {
193
194
  imgElem[i].classList.add('e-rte-image-unsupported');
194
195
  }
195
196
  imgElem[i].removeAttribute('v:shapes');
@@ -203,7 +204,8 @@ var MsWordPaste = /** @class */ (function () {
203
204
  if (imgElem.length > 0) {
204
205
  for (var i = 0; i < imgElem.length; i++) {
205
206
  imgSrc.push(imgElem[i].getAttribute('src'));
206
- imgName.push(imgElem[i].getAttribute('src').split('/')[imgElem[i].getAttribute('src').split('/').length - 1].split('.')[0]);
207
+ var imageName = imgElem[i].getAttribute('src').split('/')[imgElem[i].getAttribute('src').split('/').length - 1].split('.')[0] + i;
208
+ imgName.push(imageName);
207
209
  }
208
210
  var hexValue = this.hexConversion(rtfData);
209
211
  for (var i = 0; i < hexValue.length; i++) {
@@ -173,7 +173,14 @@ var EnterKeyAction = /** @class */ (function () {
173
173
  var isMediaNode = false; // To check the image audio and video node cases
174
174
  var isFocusedFirst = false;
175
175
  var parentElement = _this.range.startContainer.parentElement;
176
- var isPreWrapApplied = parentElement ? _this.parent.contentModule.getDocument().defaultView.getComputedStyle(parentElement, null).getPropertyValue('white-space') === 'pre-wrap' : false;
176
+ var isPreWrapApplied = false;
177
+ var isTextWrapApplied = false;
178
+ if (parentElement) {
179
+ // eslint-disable-next-line max-len
180
+ var computedStyle = _this.parent.contentModule.getDocument().defaultView.getComputedStyle(parentElement);
181
+ isPreWrapApplied = computedStyle.getPropertyValue('white-space') === 'pre-wrap';
182
+ isTextWrapApplied = computedStyle.getPropertyValue('text-wrap') === 'nowrap';
183
+ }
177
184
  if (_this.range.startOffset !== 0 && _this.range.endOffset !== 0 &&
178
185
  _this.range.startContainer === _this.range.endContainer && !(!isNOU(nearBlockNode.childNodes[0])
179
186
  && (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
@@ -183,9 +190,9 @@ var EnterKeyAction = /** @class */ (function () {
183
190
  var isSplitTextEmpty = splitFirstText.trim().length === 0;
184
191
  var hasContentAfterCursor = startNodeText.slice(_this.range.startOffset).trim().length !== 0;
185
192
  var isCursorAtStartNonPreWrap = lastCharBeforeCursor !== 160
186
- && isSplitTextEmpty && !isPreWrapApplied;
193
+ && isSplitTextEmpty && !isPreWrapApplied && !isTextWrapApplied;
187
194
  var isCursorAtStartPreWrapWithContent = lastCharBeforeCursor === 32
188
- && isPreWrapApplied && isSplitTextEmpty && hasContentAfterCursor;
195
+ && (isPreWrapApplied || isTextWrapApplied) && isSplitTextEmpty && hasContentAfterCursor;
189
196
  if (isCursorAtStartNonPreWrap || isCursorAtStartPreWrapWithContent) {
190
197
  isFocusedFirst = true;
191
198
  }
@@ -476,8 +476,20 @@ var PasteCleanup = /** @class */ (function () {
476
476
  this.parent.trigger(events.imageUploadSuccess, e, function (e) {
477
477
  if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
478
478
  var url = _this.parent.insertImageSettings.path + e.file.name;
479
- imgElem.src = url;
480
- imgElem.setAttribute('alt', e.file.name);
479
+ if (!_this.parent.inputElement.contains(imgElem)) {
480
+ var imgHtmlElems = _this.parent.inputElement.querySelectorAll('#' + imgElem.id);
481
+ for (var i = 0; i < imgHtmlElems.length; i++) {
482
+ var imgHtmlElem = imgHtmlElems[i];
483
+ if (imgHtmlElem && imgHtmlElem.style && imgHtmlElem.style.opacity === '0.5') {
484
+ imgHtmlElem.src = url;
485
+ imgHtmlElem.setAttribute('alt', e.file.name);
486
+ }
487
+ }
488
+ }
489
+ else {
490
+ imgElem.src = url;
491
+ imgElem.setAttribute('alt', e.file.name);
492
+ }
481
493
  }
482
494
  });
483
495
  }
@@ -490,7 +502,18 @@ var PasteCleanup = /** @class */ (function () {
490
502
  }
491
503
  this.popupCloseTime = setTimeout(function () {
492
504
  popupObj.close();
493
- imgElem.style.opacity = '1';
505
+ if (!_this.parent.inputElement.contains(imgElem)) {
506
+ var imgHtmlElems = _this.parent.inputElement.querySelectorAll('#' + imgElem.id);
507
+ for (var i = 0; i < imgHtmlElems.length; i++) {
508
+ var imgHtmlElem = imgHtmlElems[i];
509
+ if (imgHtmlElem && imgHtmlElem.style && imgHtmlElem.style.opacity === '0.5') {
510
+ imgHtmlElem.style.opacity = '1';
511
+ }
512
+ }
513
+ }
514
+ else {
515
+ imgElem.style.opacity = '1';
516
+ }
494
517
  _this.toolbarEnableDisable(false);
495
518
  if (uploadObj && document.body.contains(uploadObj.element)) {
496
519
  uploadObj.destroy();
@@ -649,11 +649,10 @@ var ToolbarRenderer = /** @class */ (function () {
649
649
  enableRtl: this.parent.enableRtl,
650
650
  inline: true,
651
651
  value: null,
652
- cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
652
+ cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass,
653
653
  created: function () {
654
654
  var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
655
- var cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
656
- colorPicker.setProperties({ value: value, cssClass: cssClass });
655
+ colorPicker.setProperties({ value: value });
657
656
  },
658
657
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
659
658
  modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),