@syncfusion/ej2-richtexteditor 26.2.12 → 26.2.14

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.2.12
3
+ * version : 26.2.14
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@26.2.11",
3
+ "_id": "@syncfusion/ej2-richtexteditor@26.2.13",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-eEt5sO65WJ4Axop/d0LfbXRfzr5arMSVZFOTtjeXr5/BTeYQieIH3REXHnX+Ac7aZi9mG4djFKIOaaKQSAuBjw==",
5
+ "_integrity": "sha512-9M61vrzUB13cc0RIjxvNJ8ySTS66GLCUWdTfpH2imDmL5hrqMikxUDxMo+fzjNaQrn7Q0tnX/+vmElWrecYqOA==",
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.2.11.tgz",
29
- "_shasum": "edf3a8f08beeaafbdcca3a0d4ffad5f7cb427bfd",
28
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.2.13.tgz",
29
+ "_shasum": "c8cddfb903023fb62cc638be3a727ebc2862e7c0",
30
30
  "_spec": "@syncfusion/ej2-richtexteditor@*",
31
31
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
32
32
  "author": {
@@ -40,7 +40,7 @@
40
40
  "@syncfusion/ej2-base": "~26.2.10",
41
41
  "@syncfusion/ej2-buttons": "~26.2.10",
42
42
  "@syncfusion/ej2-filemanager": "~26.2.11",
43
- "@syncfusion/ej2-inputs": "~26.2.11",
43
+ "@syncfusion/ej2-inputs": "~26.2.14",
44
44
  "@syncfusion/ej2-navigations": "~26.2.12",
45
45
  "@syncfusion/ej2-popups": "~26.2.11",
46
46
  "@syncfusion/ej2-splitbuttons": "~26.2.10"
@@ -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.2.12",
82
+ "version": "26.2.14",
83
83
  "sideEffects": false
84
84
  }
@@ -114,7 +114,7 @@ var Formats = /** @class */ (function () {
114
114
  }
115
115
  else {
116
116
  var nodeCutter = new NodeCutter();
117
- var newElem = nodeCutter.SplitNode(range, startParent.parentElement, false).cloneNode(true);
117
+ nodeCutter.SplitNode(range, startParent.parentElement, false).cloneNode(true);
118
118
  this.paraFocus(startParent.parentElement === this.parent.editableElement ?
119
119
  startParent : startParent.parentElement);
120
120
  }
@@ -257,7 +257,8 @@ var InsertHtml = /** @class */ (function () {
257
257
  preNode.parentNode.replaceChild(fragment, preNode);
258
258
  }
259
259
  else {
260
- var startContainerParent = editNode === range.startContainer ? range.startContainer : range.startContainer.parentNode;
260
+ var startContainerParent = editNode === range.startContainer ? range.startContainer
261
+ : range.startContainer.parentNode;
261
262
  // Get the index of the start container among its siblings
262
263
  var startIndex = Array.prototype.indexOf.call(startContainerParent.childNodes, (Browser.userAgent.indexOf('Firefox') !== -1 && editNode === range.startContainer) ? range.startContainer.firstChild : range.startContainer);
263
264
  range.deleteContents();
@@ -335,8 +335,6 @@ var Lists = /** @class */ (function () {
335
335
  this.saveSelection = this.parent.nodeSelection.save(range, this.parent.currentDocument);
336
336
  }
337
337
  var blockNodes = void 0;
338
- var startOffset = range.startOffset;
339
- var endOffset = range.endOffset;
340
338
  var startNode = this.parent.domNode.getSelectedNode(range.startContainer, range.startOffset);
341
339
  var endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
342
340
  if ((startNode === endNode && (startNode.nodeName === 'BR' || startNode.nodeName === '#text') &&
@@ -510,7 +510,7 @@ var EnterKeyAction = /** @class */ (function () {
510
510
  this.range.insertNode(brElm);
511
511
  }
512
512
  }
513
- if (isEmptyBrInserted || (!isNOU(brElm.nextElementSibling) && brElm.nextElementSibling.tagName === 'BR') || (!isNOU(brElm.nextSibling) && brElm.nextSibling.textContent.length > 0)) {
513
+ if (isEmptyBrInserted || (!isNOU(brElm.nextElementSibling) && brElm.nextElementSibling.tagName === 'BR') || (!isNOU(brElm.nextSibling) && (brElm.nextSibling.textContent.length > 0 || (brElm.nextSibling.nodeName === '#text' && brElm.nextSibling.textContent.trim().length === 0 && !isNOU(brElm.nextSibling.nextSibling) && brElm.nextSibling.nextSibling.textContent.trim().length > 0)))) {
514
514
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), !isNOU(brElm.nextSibling) && isFocusTextNode ? brElm.nextSibling : brElm, 0);
515
515
  isEmptyBrInserted = false;
516
516
  }
@@ -22,6 +22,7 @@ export declare class HtmlEditor {
22
22
  private saveSelection;
23
23
  xhtmlValidation: XhtmlValidation;
24
24
  private clickTimeout;
25
+ private isCopyAll;
25
26
  constructor(parent?: IRichTextEditor, serviceLocator?: ServiceLocator);
26
27
  /**
27
28
  * Destroys the Markdown.
@@ -27,6 +27,7 @@ var HtmlEditor = /** @class */ (function () {
27
27
  this.xhtmlValidation = new XhtmlValidation(parent);
28
28
  this.addEventListener();
29
29
  this.isDestroyed = false;
30
+ this.isCopyAll = false;
30
31
  }
31
32
  /**
32
33
  * Destroys the Markdown.
@@ -45,6 +46,7 @@ var HtmlEditor = /** @class */ (function () {
45
46
  this.clickTimeout = null;
46
47
  }
47
48
  this.removeEventListener();
49
+ this.isCopyAll = null;
48
50
  this.locator = null;
49
51
  this.contentRenderer = null;
50
52
  this.renderFactory = null;
@@ -233,6 +235,9 @@ var HtmlEditor = /** @class */ (function () {
233
235
  mentionStartNode.textContent.charCodeAt(0) === 8203 &&
234
236
  !isNOU(mentionStartNode.previousSibling) && mentionStartNode.previousSibling.contentEditable === 'false';
235
237
  }
238
+ if (this.isCopyAll) {
239
+ return;
240
+ }
236
241
  var pointer;
237
242
  var isRootParent = false;
238
243
  if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey && !isEmptyNode && !isMention) {
@@ -329,6 +334,12 @@ var HtmlEditor = /** @class */ (function () {
329
334
  };
330
335
  HtmlEditor.prototype.onKeyDown = function (e) {
331
336
  var _this = this;
337
+ if (e.args.ctrlKey && e.args.keyCode === 65) {
338
+ this.isCopyAll = true;
339
+ }
340
+ else {
341
+ this.isCopyAll = false;
342
+ }
332
343
  var currentRange;
333
344
  var args = e.args;
334
345
  if (this.parent.inputElement.querySelectorAll('.e-cell-select').length > 1 && (args.keyCode === 8 || args.keyCode === 32 || args.keyCode === 13)) {
@@ -523,6 +534,10 @@ var HtmlEditor = /** @class */ (function () {
523
534
  else {
524
535
  this.oldRangeElement = this.rangeElement.previousElementSibling;
525
536
  }
537
+ var findBlockElement = this.parent.formatter.editorManager.domNode.blockNodes();
538
+ if (!isNOU(findBlockElement[0]) && currentRange.collapsed && currentRange.startOffset === 0 && currentRange.endOffset === 0 && findBlockElement[0].style.marginLeft !== '') {
539
+ findBlockElement[0].style.marginLeft = (parseInt(findBlockElement[0].style.marginLeft, 10) <= 20) ? '' : (parseInt(findBlockElement[0].style.marginLeft, 10) - 20 + 'px');
540
+ }
526
541
  if (isNOU(this.oldRangeElement)) {
527
542
  return;
528
543
  }