@syncfusion/ej2-richtexteditor 24.1.45 → 24.1.46

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 : 24.1.45
3
+ * version : 24.1.46
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
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-richtexteditor@*",
3
- "_id": "@syncfusion/ej2-richtexteditor@24.1.43",
3
+ "_id": "@syncfusion/ej2-richtexteditor@24.1.45",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-+v4KcCDrS7HCpJjJiYqnP8fdE0l8pUBtuFwUsAU0Tb3PuQIStWzNZX8Lbb3DykBpC5HFmYBsC3HdpO7EnX3huA==",
5
+ "_integrity": "sha512-639ZpTHnu5BdfPiBTllfJndDTien1yXWHPyQDGWulZXC92dAMtipXgiuEcsVLtVVJv0FbVgg5X9zX4T8PBq/4Q==",
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.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-24.1.43.tgz",
29
- "_shasum": "5e476e162aba6dd6e3cbfe2141a16a9ccc59e91c",
28
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-24.1.45.tgz",
29
+ "_shasum": "1fe5762cdca0998b044c81caa60c22dd0e47df75",
30
30
  "_spec": "@syncfusion/ej2-richtexteditor@*",
31
31
  "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
32
32
  "author": {
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "bundleDependencies": false,
39
39
  "dependencies": {
40
- "@syncfusion/ej2-base": "~24.1.42",
41
- "@syncfusion/ej2-buttons": "~24.1.45",
40
+ "@syncfusion/ej2-base": "~24.1.46",
41
+ "@syncfusion/ej2-buttons": "~24.1.46",
42
42
  "@syncfusion/ej2-filemanager": "~24.1.45",
43
43
  "@syncfusion/ej2-inputs": "~24.1.45",
44
- "@syncfusion/ej2-navigations": "~24.1.41",
45
- "@syncfusion/ej2-popups": "~24.1.44",
46
- "@syncfusion/ej2-splitbuttons": "~24.1.45"
44
+ "@syncfusion/ej2-navigations": "~24.1.46",
45
+ "@syncfusion/ej2-popups": "~24.1.46",
46
+ "@syncfusion/ej2-splitbuttons": "~24.1.46"
47
47
  },
48
48
  "deprecated": false,
49
49
  "description": "Essential JS 2 RichTextEditor component",
@@ -69,6 +69,6 @@
69
69
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
70
70
  },
71
71
  "typings": "index.d.ts",
72
- "version": "24.1.45",
72
+ "version": "24.1.46",
73
73
  "sideEffects": false
74
74
  }
@@ -230,6 +230,9 @@ var LinkCommand = /** @class */ (function () {
230
230
  if (!isNOU(e.item.target)) {
231
231
  anchorEle.setAttribute('target', e.item.target);
232
232
  }
233
+ if (!isNOU(e.item.ariaLabel)) {
234
+ anchorEle.setAttribute('aria-label', e.item.ariaLabel);
235
+ }
233
236
  return anchorEle;
234
237
  };
235
238
  LinkCommand.prototype.getSelectionNodes = function (nodeCollection) {
@@ -171,7 +171,7 @@ var NodeCutter = /** @class */ (function () {
171
171
  if ((indexes.indexOf(range.startOffset) >= 0)
172
172
  || ((indexes.indexOf(range.startOffset - 1) >= 0) && (range.startOffset !== 1
173
173
  || (range.startOffset === 1 && new RegExp('\\s').test(str[0])))
174
- || (((indexes[indexes.length - 1] - 1) === range.startOffset) && !new RegExp('\\s').test(str[0])))) {
174
+ || (((indexes[indexes.length - 1] - 1) === range.startOffset) && range.endOffset !== (str.length - 1) && !new RegExp('\\s').test(str[0])))) {
175
175
  cursorRange = range;
176
176
  this.position = 1;
177
177
  }
@@ -233,7 +233,7 @@ var HtmlEditor = /** @class */ (function () {
233
233
  else {
234
234
  this.parent.notify(events.enterHandler, { args: e.args });
235
235
  var newRange = this.parent.getRange();
236
- if (!isNOU(newRange.startContainer) && newRange.startContainer === this.parent.inputElement.lastChild && newRange.startContainer.nodeName !== '#text') {
236
+ if (!isNOU(newRange.startContainer) && newRange.startContainer === this.parent.inputElement.lastChild && newRange.startContainer.nodeName !== '#text' && this.parent.height !== 'auto') {
237
237
  newRange.startContainer.scrollIntoView({ block: "end", inline: "nearest" });
238
238
  }
239
239
  }
@@ -554,7 +554,7 @@ var HtmlEditor = /** @class */ (function () {
554
554
  for (var j = 0; j < splitTextContent.length; j++) {
555
555
  if (splitTextContent[j].match(httpRegex) || splitTextContent[j].match(wwwRegex)) {
556
556
  resultSplitContent += '<a class="e-rte-anchor" href="' + splitTextContent[j] +
557
- '" title="' + splitTextContent[j] + '"target="_blank">' + splitTextContent[j] + ' </a>';
557
+ '" title="' + splitTextContent[j] + '" target="_blank"' + ' aria-label="' + this.parent.serviceLocator.getService('rteLocale').getConstant("linkAriaLabel") + '">' + splitTextContent[j] + ' </a>';
558
558
  }
559
559
  else {
560
560
  resultSplitContent += splitTextContent[j] + ' ';
@@ -690,7 +690,7 @@ var PasteCleanup = /** @class */ (function () {
690
690
  }
691
691
  }
692
692
  this.parent.trigger(events.afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, function (updatedArgs) { value = updatedArgs.value; });
693
- clipBoardElem.innerHTML = value;
693
+ clipBoardElem.innerHTML = this.parent.addAnchorAriaLabel(value);
694
694
  clipBoardElem = this.addTableClass(clipBoardElem);
695
695
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
696
696
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
@@ -64,7 +64,7 @@ var Toolbar = /** @class */ (function () {
64
64
  return;
65
65
  }
66
66
  else {
67
- if (this.parent.toolbarSettings.enableFloating && !this.parent.inlineMode.enable) {
67
+ if (!this.parent.inlineMode.enable) {
68
68
  this.tbWrapper = this.parent.createElement('div', {
69
69
  id: this.parent.getID() + '_toolbar_wrapper',
70
70
  innerHTML: this.tbElement.outerHTML,
@@ -196,6 +196,7 @@ export interface IRichTextEditor extends Component<HTMLElement> {
196
196
  currentTarget: HTMLElement;
197
197
  focusIn(): void;
198
198
  showEmojiPicker?(x?: number, y?: number): void;
199
+ addAnchorAriaLabel?(value: string): string;
199
200
  }
200
201
  /**
201
202
 
@@ -1543,6 +1543,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
1543
1543
  private updateValueOnIdle;
1544
1544
  private updateIntervalValue;
1545
1545
  private cleanupResizeElements;
1546
+ addAnchorAriaLabel(value: string): string;
1546
1547
  private removeResizeElement;
1547
1548
  private updateStatus;
1548
1549
  private onDocumentClick;
@@ -551,6 +551,7 @@ var RichTextEditor = /** @class */ (function (_super) {
551
551
 
552
552
  */
553
553
  RichTextEditor.prototype.render = function () {
554
+ this.value = (!(this.editorMode === 'Markdown') && !isNOU(this.value)) ? this.addAnchorAriaLabel(this.value) : this.value;
554
555
  if (this.value && !this.valueTemplate) {
555
556
  this.setProperties({ value: this.serializeValue(this.value) }, true);
556
557
  }
@@ -2229,6 +2230,17 @@ var RichTextEditor = /** @class */ (function (_super) {
2229
2230
  var value = this.removeResizeElement(args.value);
2230
2231
  args.callBack(value);
2231
2232
  };
2233
+ RichTextEditor.prototype.addAnchorAriaLabel = function (value) {
2234
+ var valueElementWrapper = document.createElement("div");
2235
+ valueElementWrapper.innerHTML = value;
2236
+ var item = valueElementWrapper.querySelectorAll("a");
2237
+ if (item.length > 0) {
2238
+ for (var i = 0; i < item.length; i++) {
2239
+ (item[i].hasAttribute("target") && item[i].getAttribute("target") === '_blank') ? item[i].setAttribute("aria-label", this.serviceLocator.getService('rteLocale').getConstant("linkAriaLabel")) : item[i];
2240
+ }
2241
+ }
2242
+ return valueElementWrapper.innerHTML;
2243
+ };
2232
2244
  RichTextEditor.prototype.removeResizeElement = function (value) {
2233
2245
  var valueElementWrapper = document.createElement("div");
2234
2246
  valueElementWrapper.innerHTML = value;
@@ -243,7 +243,7 @@ var ToolbarRenderer = /** @class */ (function () {
243
243
  }
244
244
  }
245
245
  //Formats preselect
246
- if (args.items[0].command === 'Formats') {
246
+ if (args.items[0].command === 'Formats' || args.items[0].command === 'Font') {
247
247
  for (var index = 0; index < args.element.childNodes.length; index++) {
248
248
  var divNode = _this.parent.createElement('div');
249
249
  divNode.innerHTML = dropDown.content.trim();