@syncfusion/ej2-richtexteditor 20.4.52 → 20.4.53

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 : 20.4.52
3
+ * version : 20.4.53
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@20.4.51",
3
+ "_id": "@syncfusion/ej2-richtexteditor@20.4.52",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-KrCoVlwCvqCiQPFS/bTRaCsH8WAyiBTtWkbBRRLLxCXtjyUKz8X3XIOcSmekQFzmMGcvwXHPwqTfKUMBQs+mAQ==",
5
+ "_integrity": "sha512-Mg2VkXybrYH8X66JfToNaI+wM7pqjImBAkkKYRLG1Cix+N24h0/dlXUJR3/OusAtfmYwseTA/cF6y1Jp0CD3Aw==",
6
6
  "_location": "/@syncfusion/ej2-richtexteditor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -26,8 +26,8 @@
26
26
  "/@syncfusion/ej2-react-richtexteditor",
27
27
  "/@syncfusion/ej2-vue-richtexteditor"
28
28
  ],
29
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.4.51.tgz",
30
- "_shasum": "5a1cdfcc714424ed059b501d2c0eaa46d0b2c172",
29
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.4.52.tgz",
30
+ "_shasum": "ad7fd58a9318984a86fe76d55bf24343fddec291",
31
31
  "_spec": "@syncfusion/ej2-richtexteditor@*",
32
32
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
33
33
  "author": {
@@ -39,11 +39,11 @@
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
41
  "@syncfusion/ej2-base": "~20.4.51",
42
- "@syncfusion/ej2-buttons": "~20.4.50",
43
- "@syncfusion/ej2-filemanager": "~20.4.51",
42
+ "@syncfusion/ej2-buttons": "~20.4.53",
43
+ "@syncfusion/ej2-filemanager": "~20.4.53",
44
44
  "@syncfusion/ej2-inputs": "~20.4.52",
45
- "@syncfusion/ej2-navigations": "~20.4.52",
46
- "@syncfusion/ej2-popups": "~20.4.52",
45
+ "@syncfusion/ej2-navigations": "~20.4.53",
46
+ "@syncfusion/ej2-popups": "~20.4.53",
47
47
  "@syncfusion/ej2-splitbuttons": "~20.4.50"
48
48
  },
49
49
  "deprecated": false,
@@ -70,6 +70,6 @@
70
70
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
71
71
  },
72
72
  "typings": "index.d.ts",
73
- "version": "20.4.52",
73
+ "version": "20.4.53",
74
74
  "sideEffects": false
75
75
  }
@@ -16,7 +16,7 @@ export declare function setEditFrameFocus(editableElement: Element, selector: st
16
16
  * @returns {void}
17
17
  * @hidden
18
18
  */
19
- export declare function updateTextNode(value: string): string;
19
+ export declare function updateTextNode(value: string, enterAction?: string): string;
20
20
  /**
21
21
  * @param {Node} startChildNodes - specifies the node
22
22
  * @returns {void}
@@ -37,7 +37,7 @@ export function setEditFrameFocus(editableElement, selector) {
37
37
  * @returns {void}
38
38
  * @hidden
39
39
  */
40
- export function updateTextNode(value) {
40
+ export function updateTextNode(value, enterAction) {
41
41
  var tempNode = document.createElement('div');
42
42
  tempNode.innerHTML = value;
43
43
  tempNode.setAttribute('class', 'tempDiv');
@@ -52,15 +52,23 @@ export function updateTextNode(value) {
52
52
  (tempNode.firstChild.textContent.indexOf('\n') < 0 || tempNode.firstChild.textContent.trim() !== '')) ||
53
53
  inlineNode.indexOf(tempNode.firstChild.nodeName.toLocaleLowerCase()) >= 0) {
54
54
  if (!isPreviousInlineElem) {
55
- paraElm = createElement('p');
56
- resultElm.appendChild(paraElm);
57
- paraElm.appendChild(tempNode.firstChild);
55
+ if (enterAction === 'BR') {
56
+ resultElm.appendChild(tempNode.firstChild);
57
+ previousParent = resultElm;
58
+ }
59
+ else {
60
+ paraElm = createElement('p');
61
+ resultElm.appendChild(paraElm);
62
+ paraElm.appendChild(tempNode.firstChild);
63
+ previousParent = paraElm;
64
+ isPreviousInlineElem = true;
65
+ }
58
66
  }
59
67
  else {
60
68
  previousParent.appendChild(tempNode.firstChild);
69
+ previousParent = paraElm;
70
+ isPreviousInlineElem = true;
61
71
  }
62
- previousParent = paraElm;
63
- isPreviousInlineElem = true;
64
72
  }
65
73
  else if (tempNode.firstChild.nodeName === '#text' && (tempNode.firstChild.textContent === '\n' ||
66
74
  (tempNode.firstChild.textContent.indexOf('\n') >= 0 && tempNode.firstChild.textContent.trim() === ''))) {
@@ -188,7 +188,7 @@ var EditorManager = /** @class */ (function () {
188
188
  this.observer.notify(CONSTANT.SELECTION_TYPE, { subCommand: value, event: event, callBack: callBack, value: text, selector: selector, enterAction: enterAction });
189
189
  break;
190
190
  case 'inserthtml':
191
- this.observer.notify(CONSTANT.INSERTHTML_TYPE, { subCommand: value, callBack: callBack, value: text });
191
+ this.observer.notify(CONSTANT.INSERTHTML_TYPE, { subCommand: value, callBack: callBack, value: text, enterAction: enterAction });
192
192
  break;
193
193
  case 'inserttext':
194
194
  this.observer.notify(CONSTANT.INSERT_TEXT_TYPE, { subCommand: value, callBack: callBack, value: text });
@@ -22,7 +22,7 @@ var InsertHtmlExec = /** @class */ (function () {
22
22
  this.parent.observer.on(CONSTANT.INSERTHTML_TYPE, this.applyHtml, this);
23
23
  };
24
24
  InsertHtmlExec.prototype.applyHtml = function (e) {
25
- InsertHtml.Insert(this.parent.currentDocument, e.value, this.parent.editableElement, true);
25
+ InsertHtml.Insert(this.parent.currentDocument, e.value, this.parent.editableElement, true, e.enterAction);
26
26
  if (e.subCommand === 'pasteCleanup') {
27
27
  var pastedElements = this.parent.editableElement.querySelectorAll('.pasteContent_RTE');
28
28
  var allPastedElements = [].slice.call(pastedElements);
@@ -13,7 +13,7 @@ export declare class InsertHtml {
13
13
  */
14
14
  static inlineNode: string[];
15
15
  static contentsDeleted: boolean;
16
- static Insert(docElement: Document, insertNode: Node | string, editNode?: Element, isExternal?: boolean): void;
16
+ static Insert(docElement: Document, insertNode: Node | string, editNode?: Element, isExternal?: boolean, enterAction?: string): void;
17
17
  private static pasteInsertHTML;
18
18
  private static placeCursorEnd;
19
19
  private static getNodeCollection;
@@ -13,7 +13,7 @@ import { updateTextNode } from './../../common/util';
13
13
  var InsertHtml = /** @class */ (function () {
14
14
  function InsertHtml() {
15
15
  }
16
- InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal) {
16
+ InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal, enterAction) {
17
17
  var node;
18
18
  if (typeof insertNode === 'string') {
19
19
  var divNode = document.createElement('div');
@@ -35,7 +35,8 @@ var InsertHtml = /** @class */ (function () {
35
35
  var nodeCutter = new NodeCutter();
36
36
  var range = nodeSelection.getRange(docElement);
37
37
  if (range.startContainer === editNode && range.startContainer === range.endContainer && range.startOffset === 0 &&
38
- range.startOffset === range.endOffset && editNode.textContent.length === 0 && editNode.children[0].tagName === 'P') {
38
+ range.startOffset === range.endOffset && editNode.textContent.length === 0 &&
39
+ (editNode.children[0].tagName === 'P' || (editNode.children[0].tagName === 'BR'))) {
39
40
  nodeSelection.setSelectionText(docElement, range.startContainer.children[0], range.startContainer.children[0], 0, 0);
40
41
  range = nodeSelection.getRange(docElement);
41
42
  }
@@ -52,7 +53,7 @@ var InsertHtml = /** @class */ (function () {
52
53
  var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
53
54
  if (isExternal || (!isNOU(node) && !isNOU(node.classList) &&
54
55
  node.classList.contains('pasteContent'))) {
55
- this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode);
56
+ this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
56
57
  return;
57
58
  }
58
59
  if (editNode !== range.startContainer && ((!isCollapsed && !(closestParentNode.nodeType === Node.ELEMENT_NODE &&
@@ -166,7 +167,7 @@ var InsertHtml = /** @class */ (function () {
166
167
  }
167
168
  }
168
169
  };
169
- InsertHtml.pasteInsertHTML = function (nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode) {
170
+ InsertHtml.pasteInsertHTML = function (nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction) {
170
171
  var isCursor = range.startOffset === range.endOffset &&
171
172
  range.startContainer === range.endContainer;
172
173
  if (isCursor && range.startContainer === editNode && editNode.textContent === '') {
@@ -276,7 +277,12 @@ var InsertHtml = /** @class */ (function () {
276
277
  var firstParaElm = createElement('p');
277
278
  node.parentElement.insertBefore(firstParaElm, node);
278
279
  }
279
- node.previousElementSibling.appendChild(node.firstChild);
280
+ if (node.previousElementSibling.nodeName === 'BR') {
281
+ node.parentElement.insertBefore(node.firstChild, node);
282
+ }
283
+ else {
284
+ node.previousElementSibling.appendChild(node.firstChild);
285
+ }
280
286
  }
281
287
  else {
282
288
  lastSelectionNode = node.firstChild;
@@ -308,7 +314,7 @@ var InsertHtml = /** @class */ (function () {
308
314
  this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
309
315
  }
310
316
  else {
311
- this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode);
317
+ this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction);
312
318
  }
313
319
  };
314
320
  InsertHtml.placeCursorEnd = function (lastSelectionNode, node, nodeSelection, docElement, editNode) {
@@ -423,9 +429,9 @@ var InsertHtml = /** @class */ (function () {
423
429
  }
424
430
  }
425
431
  };
426
- InsertHtml.cursorPos = function (lastSelectionNode, node, nodeSelection, docElement, editNode) {
432
+ InsertHtml.cursorPos = function (lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction) {
427
433
  lastSelectionNode.classList.add('lastNode');
428
- editNode.innerHTML = updateTextNode(editNode.innerHTML);
434
+ editNode.innerHTML = updateTextNode(editNode.innerHTML, enterAction);
429
435
  lastSelectionNode = editNode.querySelector('.lastNode');
430
436
  if (!isNOU(lastSelectionNode)) {
431
437
  this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
@@ -374,6 +374,29 @@ var MsWordPaste = /** @class */ (function () {
374
374
  }
375
375
  fromClass = false;
376
376
  }
377
+ var listClass = ['MsoListParagraphCxSpFirst', 'MsoListParagraphCxSpMiddle', 'MsoListParagraphCxSpLast'];
378
+ for (var i = 0; i < listClass.length; i++) {
379
+ if (keys.indexOf('li.' + listClass[i]) > -1) {
380
+ var olULElems = elm.querySelectorAll('ol.' + listClass[i] + ', ul.' + listClass[i]);
381
+ for (var j = 0; j < olULElems.length; j++) {
382
+ var styleProperty = olULElems[j].getAttribute('style');
383
+ if (!isNOU(styleProperty) && styleProperty.trim() !== '' && olULElems[j].style.marginLeft !== '') {
384
+ var valueSplit = values[keys.indexOf('li.' + listClass[i])].split(';');
385
+ for (var k = 0; k < valueSplit.length; k++) {
386
+ if ('margin-left'.indexOf(valueSplit[k].split(':')[0]) >= 0) {
387
+ if (!isNOU(valueSplit[k].split(':')[1]) &&
388
+ valueSplit[k].split(':')[1].indexOf('in') >= 0 &&
389
+ olULElems[j].style.marginLeft.indexOf('in') >= 0) {
390
+ var classStyle = parseFloat(valueSplit[k].split(':')[1].split('in')[0]);
391
+ var inlineStyle = parseFloat(olULElems[j].style.marginLeft.split('in')[0]);
392
+ olULElems[j].style.marginLeft = (inlineStyle - classStyle) + 'in';
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }
377
400
  }
378
401
  };
379
402
  MsWordPaste.prototype.filterStyles = function (elm, wordPasteStyleConfig) {
@@ -495,12 +518,13 @@ var MsWordPaste = /** @class */ (function () {
495
518
  var type = void 0;
496
519
  var listStyleType = void 0;
497
520
  var startAttr = void 0;
521
+ var styleMarginLeft = void 0;
498
522
  if (!isNOU(this.listContents[0])) {
499
523
  type = this.listContents[0].trim().length > 1 ? 'ol' : 'ul';
500
524
  listStyleType = this.getlistStyleType(this.listContents[0], type);
501
- if (type === 'ol' && listNodes[i - 1] === null) {
525
+ if (type === 'ol' && (i === 0 || listNodes[i - 1] === null)) {
502
526
  var startString = this.listContents[0].split('.')[0];
503
- var listTypes = ['A', 'a', 'I', 'i', 'α', '1'];
527
+ var listTypes = ['A', 'a', 'I', 'i', 'α', '1', '1-']; // Add '1-' for rare list type.
504
528
  if (listTypes.indexOf(startString) === -1) {
505
529
  if (listStyleType === 'decimal') {
506
530
  // Bug in getlistStyleType() list style stype is returned as decimal for nested list with start attribute
@@ -508,9 +532,15 @@ var MsWordPaste = /** @class */ (function () {
508
532
  startAttr = parseInt(startString);
509
533
  }
510
534
  }
511
- else if (listStyleType === 'upper-alpha' || listStyleType === 'lower-alpha') {
512
- startAttr = parseInt(startString.toLowerCase()) - 96;
535
+ else if (listStyleType === 'upper-alpha') {
536
+ startAttr = (startString.split('.')[0].charCodeAt(0) - 64);
513
537
  }
538
+ else if (listStyleType === 'lower-alpha') {
539
+ startAttr = (startString.split('.')[0].charCodeAt(0) - 96);
540
+ }
541
+ }
542
+ if (listNodes[i].style.marginLeft !== '') {
543
+ styleMarginLeft = listNodes[i].style.marginLeft;
514
544
  }
515
545
  }
516
546
  var tempNode = [];
@@ -529,7 +559,7 @@ var MsWordPaste = /** @class */ (function () {
529
559
  }
530
560
  }
531
561
  collection.push({ listType: type, content: tempNode, nestedLevel: level, class: currentClassName,
532
- listStyle: currentListStyle, listStyleTypeName: listStyleType, start: startAttr });
562
+ listStyle: currentListStyle, listStyleTypeName: listStyleType, start: startAttr, styleMarginLeft: styleMarginLeft });
533
563
  }
534
564
  }
535
565
  stNode = listNodes.shift();
@@ -555,23 +585,30 @@ var MsWordPaste = /** @class */ (function () {
555
585
  };
556
586
  MsWordPaste.prototype.getlistStyleType = function (listContent, type) {
557
587
  var currentListClass;
588
+ var upperRomanNumber = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX',
589
+ 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX'];
590
+ var lowerRomanNumber = ['i', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix',
591
+ 'x', 'xi', 'xii', 'xiii', 'xiv', 'xv', 'xvi', 'xvii', 'xviii', 'xix', 'xx'];
592
+ var lowerGreekNumber = ['α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ',
593
+ 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω'];
558
594
  if (type === 'ol') {
559
- switch (listContent.split('.')[0]) {
560
- case 'A':
561
- currentListClass = 'upper-alpha';
562
- break;
563
- case 'a':
564
- currentListClass = 'lower-alpha';
565
- break;
566
- case 'I':
595
+ var charCode = listContent.split('.')[0].charCodeAt(0);
596
+ switch (true) {
597
+ case upperRomanNumber.indexOf(listContent.split('.')[0]) > -1:
567
598
  currentListClass = 'upper-roman';
568
599
  break;
569
- case 'i':
600
+ case lowerRomanNumber.indexOf(listContent.split('.')[0]) > -1:
570
601
  currentListClass = 'lower-roman';
571
602
  break;
572
- case 'α':
603
+ case lowerGreekNumber.indexOf(listContent.split('.')[0]) > -1:
573
604
  currentListClass = 'lower-greek';
574
605
  break;
606
+ case (charCode > 64 && charCode < 91):
607
+ currentListClass = 'upper-alpha';
608
+ break;
609
+ case (charCode > 96 && charCode < 123):
610
+ currentListClass = 'lower-alpha';
611
+ break;
575
612
  default:
576
613
  currentListClass = 'decimal';
577
614
  break;
@@ -603,11 +640,12 @@ var MsWordPaste = /** @class */ (function () {
603
640
  var pElement = createElement('p');
604
641
  pElement.innerHTML = collection[index].content.join(' ');
605
642
  if ((collection[index].nestedLevel === 1) && listCount === 0 && collection[index].content) {
606
- root.appendChild(temp = createElement(collection[index].listType));
643
+ root.appendChild(temp = createElement(collection[index].listType, { className: collection[index].class }));
607
644
  prevList = createElement('li');
608
645
  prevList.appendChild(pElement);
609
646
  temp.appendChild(prevList);
610
647
  temp.setAttribute('level', collection[index].nestedLevel.toString());
648
+ temp.style.marginLeft = collection[index].styleMarginLeft;
611
649
  temp.style.listStyleType = collection[index].listStyleTypeName;
612
650
  }
613
651
  else if (collection[index].nestedLevel === pLevel) {
@@ -123,7 +123,16 @@ var EnterKeyAction = /** @class */ (function () {
123
123
  _this.parent.tableModule.removeResizeElement();
124
124
  }
125
125
  if (!(_this.parent.inputElement.childNodes.length === 1 && _this.parent.inputElement.childNodes[0].nodeName === 'TABLE')) {
126
- _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), _this.range.startContainer.childNodes[_this.range.startOffset], 0);
126
+ if (isNOU(_this.range.startContainer.childNodes[_this.range.startOffset])) {
127
+ var currentLastElem = _this.range.startContainer.childNodes[_this.range.startOffset - 1];
128
+ while (currentLastElem.lastChild !== null && currentLastElem.nodeName !== '#text') {
129
+ currentLastElem = currentLastElem.lastChild;
130
+ }
131
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), currentLastElem, (currentLastElem.nodeName === 'BR' ? 0 : currentLastElem.textContent.length));
132
+ }
133
+ else {
134
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), _this.range.startContainer.childNodes[_this.range.startOffset], 0);
135
+ }
127
136
  }
128
137
  _this.getRangeNode();
129
138
  }
@@ -346,11 +355,13 @@ var EnterKeyAction = /** @class */ (function () {
346
355
  }
347
356
  var isLastNodeLength = _this.range.startContainer === currentParentLastChild ?
348
357
  _this.range.startContainer.textContent.length : currentParent.textContent.length;
358
+ var isImageElement = (_this.range.startContainer.nodeName === 'IMG' || (_this.range.startContainer.childNodes.length > 0
359
+ && _this.range.startContainer.childNodes[_this.range.startOffset].nodeName === 'IMG'));
349
360
  if (currentParent !== _this.parent.inputElement &&
350
361
  _this.parent.formatter.editorManager.domNode.isBlockNode(currentParent) &&
351
362
  _this.range.startOffset === _this.range.endOffset &&
352
363
  (_this.range.startOffset === isLastNodeLength ||
353
- (currentParent.textContent.trim().length === 0 && currentParent.lastChild.nodeName === 'IMG'))) {
364
+ (currentParent.textContent.trim().length === 0 && isImageElement))) {
354
365
  var focusBRElem = _this.parent.createElement('br');
355
366
  if (_this.range.startOffset === 0 && _this.range.startContainer.nodeName === 'TABLE') {
356
367
  _this.range.startContainer.parentElement.insertBefore(focusBRElem, _this.range.startContainer);
@@ -359,10 +370,11 @@ var EnterKeyAction = /** @class */ (function () {
359
370
  if (currentParentLastChild.nodeName === 'BR' && currentParent.textContent.length === 0) {
360
371
  _this.parent.formatter.editorManager.domNode.insertAfter(focusBRElem, currentParentLastChild);
361
372
  }
362
- else if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
363
- currentParent.lastChild && currentParent.lastChild.nodeName === 'IMG') {
364
- currentParentLastChild.parentElement.insertBefore(focusBRElem, currentParentLastChild);
365
- focusBRElem = currentParentLastChild;
373
+ else if (_this.range.startOffset === 0 && _this.range.endOffset === 0 && isImageElement) {
374
+ var imageElement = _this.range.startContainer.nodeName === 'IMG' ? _this.range.startContainer :
375
+ _this.range.startContainer.childNodes[_this.range.startOffset];
376
+ currentParent.insertBefore(focusBRElem, imageElement);
377
+ focusBRElem = imageElement;
366
378
  }
367
379
  else {
368
380
  var lineBreakBRElem = _this.parent.createElement('br');
@@ -651,7 +651,7 @@ var PasteCleanup = /** @class */ (function () {
651
651
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
652
652
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
653
653
  _this.parent.formatter.onSuccess(_this.parent, args);
654
- }, clipBoardElem);
654
+ }, clipBoardElem, null, null, this.parent.enterKey);
655
655
  this.removeTempClass();
656
656
  this.parent.notify(events.toolbarRefresh, {});
657
657
  this.imgUploading(this.parent.inputElement);
@@ -721,7 +721,7 @@ var PasteCleanup = /** @class */ (function () {
721
721
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
722
722
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
723
723
  _this.parent.formatter.onSuccess(_this.parent, args);
724
- }, clipBoardElem);
724
+ }, clipBoardElem, null, null, this.parent.enterKey);
725
725
  this.removeTempClass();
726
726
  }
727
727
  else {
@@ -250,10 +250,17 @@ var QuickToolbar = /** @class */ (function () {
250
250
  };
251
251
  QuickToolbar.prototype.keyUpHandler = function (e) {
252
252
  if (this.parent.inlineMode.enable && !Browser.isDevice) {
253
+ var args = e.args;
253
254
  if (this.parent.inlineMode.onSelection) {
255
+ if (this.parent.getSelection().length > 0) {
256
+ if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
257
+ args.keyCode === 35 || args.keyCode === 36 || args.keyCode === 37 || args.keyCode === 38 ||
258
+ args.keyCode === 39 || args.keyCode === 40))) {
259
+ this.showInlineQTBar(this.offsetX, this.offsetY, args.target);
260
+ }
261
+ }
254
262
  return;
255
263
  }
256
- var args = e.args;
257
264
  this.deBounce(this.offsetX, this.offsetY, args.target);
258
265
  }
259
266
  };
@@ -557,6 +557,11 @@ var Toolbar = /** @class */ (function () {
557
557
  Toolbar.prototype.toolbarClickHandler = function (e) {
558
558
  var trg = closest(e.originalEvent.target, '.e-hor-nav');
559
559
  if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNOU(trg)) {
560
+ var extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
561
+ if (!isNOU(extendedTbar)) {
562
+ setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
563
+ setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
564
+ }
560
565
  if (!trg.classList.contains('e-nav-active')) {
561
566
  removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
562
567
  this.parent.setContentHeight('toolbar', false);
@@ -628,15 +628,16 @@ var RichTextEditor = /** @class */ (function (_super) {
628
628
  var currentEndContainer = range.endContainer;
629
629
  var currentStartOffset = range.startOffset;
630
630
  var isSameContainer = currentStartContainer === currentEndContainer ? true : false;
631
- var currentEndOffset = currentEndContainer.textContent.length;
632
631
  var endNode = range.endContainer.nodeName === '#text' ? range.endContainer.parentElement :
633
632
  range.endContainer;
634
633
  var closestLI = closest(endNode, 'LI');
634
+ var isDetached = false;
635
635
  if (!isNOU(closestLI) && endNode.textContent.length === range.endOffset &&
636
636
  !range.collapsed && isNOU(endNode.nextElementSibling)) {
637
637
  for (var i = 0; i < closestLI.childNodes.length; i++) {
638
638
  if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
639
639
  detach(closestLI.childNodes[i]);
640
+ isDetached = true;
640
641
  i--;
641
642
  }
642
643
  }
@@ -644,7 +645,11 @@ var RichTextEditor = /** @class */ (function (_super) {
644
645
  while (currentLastElem.lastChild !== null && currentLastElem.nodeName !== '#text') {
645
646
  currentLastElem = currentLastElem.lastChild;
646
647
  }
647
- this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), isSameContainer ? currentStartContainer : (currentLastElem.nodeName === 'BR' && !isNOU(currentLastElem.previousSibling) ? currentLastElem.previousSibling : currentStartContainer), currentEndContainer, currentStartOffset, (currentLastElem.nodeName === 'BR' ? 0 : currentEndOffset));
648
+ if (isDetached) {
649
+ var currentLast = currentLastElem.nodeName === 'BR' && !isNOU(currentLastElem.previousSibling) ?
650
+ currentLastElem.previousSibling : currentLastElem;
651
+ this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), isSameContainer ? currentLast : currentStartContainer, currentLast, currentStartOffset, (currentLast.nodeName === 'BR' ? 0 : currentLast.textContent.length));
652
+ }
648
653
  }
649
654
  };
650
655
  /**
@@ -1 +0,0 @@
1
- []
Binary file
Binary file