@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.
@@ -21969,8 +21969,6 @@ class Lists {
21969
21969
  this.saveSelection = this.parent.nodeSelection.save(range, this.parent.currentDocument);
21970
21970
  }
21971
21971
  let blockNodes;
21972
- const startOffset = range.startOffset;
21973
- const endOffset = range.endOffset;
21974
21972
  const startNode = this.parent.domNode.getSelectedNode(range.startContainer, range.startOffset);
21975
21973
  const endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
21976
21974
  if ((startNode === endNode && (startNode.nodeName === 'BR' || startNode.nodeName === '#text') &&
@@ -23039,7 +23037,7 @@ class Formats {
23039
23037
  }
23040
23038
  else {
23041
23039
  const nodeCutter = new NodeCutter();
23042
- const newElem = nodeCutter.SplitNode(range, startParent.parentElement, false).cloneNode(true);
23040
+ nodeCutter.SplitNode(range, startParent.parentElement, false).cloneNode(true);
23043
23041
  this.paraFocus(startParent.parentElement === this.parent.editableElement ?
23044
23042
  startParent : startParent.parentElement);
23045
23043
  }
@@ -23690,7 +23688,8 @@ class InsertHtml {
23690
23688
  preNode.parentNode.replaceChild(fragment, preNode);
23691
23689
  }
23692
23690
  else {
23693
- const startContainerParent = editNode === range.startContainer ? range.startContainer : range.startContainer.parentNode;
23691
+ const startContainerParent = editNode === range.startContainer ? range.startContainer
23692
+ : range.startContainer.parentNode;
23694
23693
  // Get the index of the start container among its siblings
23695
23694
  const startIndex = Array.prototype.indexOf.call(startContainerParent.childNodes, (Browser.userAgent.indexOf('Firefox') !== -1 && editNode === range.startContainer) ? range.startContainer.firstChild : range.startContainer);
23696
23695
  range.deleteContents();
@@ -30688,6 +30687,7 @@ class HtmlEditor {
30688
30687
  this.xhtmlValidation = new XhtmlValidation(parent);
30689
30688
  this.addEventListener();
30690
30689
  this.isDestroyed = false;
30690
+ this.isCopyAll = false;
30691
30691
  }
30692
30692
  /**
30693
30693
  * Destroys the Markdown.
@@ -30706,6 +30706,7 @@ class HtmlEditor {
30706
30706
  this.clickTimeout = null;
30707
30707
  }
30708
30708
  this.removeEventListener();
30709
+ this.isCopyAll = null;
30709
30710
  this.locator = null;
30710
30711
  this.contentRenderer = null;
30711
30712
  this.renderFactory = null;
@@ -30888,6 +30889,9 @@ class HtmlEditor {
30888
30889
  mentionStartNode.textContent.charCodeAt(0) === 8203 &&
30889
30890
  !isNullOrUndefined(mentionStartNode.previousSibling) && mentionStartNode.previousSibling.contentEditable === 'false';
30890
30891
  }
30892
+ if (this.isCopyAll) {
30893
+ return;
30894
+ }
30891
30895
  let pointer;
30892
30896
  let isRootParent = false;
30893
30897
  if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey && !isEmptyNode && !isMention) {
@@ -30983,6 +30987,12 @@ class HtmlEditor {
30983
30987
  }
30984
30988
  }
30985
30989
  onKeyDown(e) {
30990
+ if (e.args.ctrlKey && e.args.keyCode === 65) {
30991
+ this.isCopyAll = true;
30992
+ }
30993
+ else {
30994
+ this.isCopyAll = false;
30995
+ }
30986
30996
  let currentRange;
30987
30997
  const args = e.args;
30988
30998
  if (this.parent.inputElement.querySelectorAll('.e-cell-select').length > 1 && (args.keyCode === 8 || args.keyCode === 32 || args.keyCode === 13)) {
@@ -31177,6 +31187,10 @@ class HtmlEditor {
31177
31187
  else {
31178
31188
  this.oldRangeElement = this.rangeElement.previousElementSibling;
31179
31189
  }
31190
+ const findBlockElement = this.parent.formatter.editorManager.domNode.blockNodes();
31191
+ if (!isNullOrUndefined(findBlockElement[0]) && currentRange.collapsed && currentRange.startOffset === 0 && currentRange.endOffset === 0 && findBlockElement[0].style.marginLeft !== '') {
31192
+ findBlockElement[0].style.marginLeft = (parseInt(findBlockElement[0].style.marginLeft, 10) <= 20) ? '' : (parseInt(findBlockElement[0].style.marginLeft, 10) - 20 + 'px');
31193
+ }
31180
31194
  if (isNullOrUndefined(this.oldRangeElement)) {
31181
31195
  return;
31182
31196
  }
@@ -35772,7 +35786,7 @@ class EnterKeyAction {
35772
35786
  this.range.insertNode(brElm);
35773
35787
  }
35774
35788
  }
35775
- if (isEmptyBrInserted || (!isNullOrUndefined(brElm.nextElementSibling) && brElm.nextElementSibling.tagName === 'BR') || (!isNullOrUndefined(brElm.nextSibling) && brElm.nextSibling.textContent.length > 0)) {
35789
+ if (isEmptyBrInserted || (!isNullOrUndefined(brElm.nextElementSibling) && brElm.nextElementSibling.tagName === 'BR') || (!isNullOrUndefined(brElm.nextSibling) && (brElm.nextSibling.textContent.length > 0 || (brElm.nextSibling.nodeName === '#text' && brElm.nextSibling.textContent.trim().length === 0 && !isNullOrUndefined(brElm.nextSibling.nextSibling) && brElm.nextSibling.nextSibling.textContent.trim().length > 0)))) {
35776
35790
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), !isNullOrUndefined(brElm.nextSibling) && isFocusTextNode ? brElm.nextSibling : brElm, 0);
35777
35791
  isEmptyBrInserted = false;
35778
35792
  }