@syncfusion/ej2-richtexteditor 25.2.4 → 25.2.6

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +34 -2
  2. package/dist/ej2-richtexteditor.min.js +2 -2
  3. package/dist/ej2-richtexteditor.umd.min.js +2 -2
  4. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-richtexteditor.es2015.js +362 -130
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +360 -127
  8. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  9. package/dist/global/ej2-richtexteditor.min.js +2 -2
  10. package/dist/global/ej2-richtexteditor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/common/interface.d.ts +14 -0
  14. package/src/common/util.js +4 -1
  15. package/src/editor-manager/base/editor-manager.js +5 -3
  16. package/src/editor-manager/plugin/alignments.js +3 -0
  17. package/src/editor-manager/plugin/dom-node.d.ts +20 -0
  18. package/src/editor-manager/plugin/dom-node.js +104 -1
  19. package/src/editor-manager/plugin/formats.js +1 -1
  20. package/src/editor-manager/plugin/indents.js +3 -0
  21. package/src/editor-manager/plugin/lists.d.ts +0 -1
  22. package/src/editor-manager/plugin/lists.js +55 -78
  23. package/src/editor-manager/plugin/ms-word-clean-up.js +1 -1
  24. package/src/rich-text-editor/actions/enter-key.d.ts +5 -0
  25. package/src/rich-text-editor/actions/enter-key.js +98 -13
  26. package/src/rich-text-editor/actions/full-screen.js +0 -6
  27. package/src/rich-text-editor/actions/html-editor.d.ts +1 -0
  28. package/src/rich-text-editor/actions/html-editor.js +63 -10
  29. package/src/rich-text-editor/actions/paste-clean-up.js +2 -1
  30. package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
  31. package/src/rich-text-editor/base/rich-text-editor.js +12 -1
  32. package/src/rich-text-editor/renderer/image-module.js +3 -3
  33. package/src/rich-text-editor/renderer/toolbar-renderer.js +7 -9
@@ -39,16 +39,18 @@ var EnterKeyAction = /** @class */ (function () {
39
39
  this.getRangeNode();
40
40
  var isTableEnter = true;
41
41
  this.formatTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'];
42
- var isCursorAtTableEnd = this.range.collapsed && (this.range.startContainer.nodeType === 1) &&
43
- this.range.startContainer.isContentEditable &&
44
- this.range.startContainer.childNodes[this.range.startOffset - 1] &&
45
- this.range.startContainer.childNodes[this.range.startOffset - 1].nodeName === 'TABLE';
46
- var isCursorAtTableStart = this.range.collapsed && (this.range.startContainer.nodeType === 1) &&
47
- this.range.startContainer.isContentEditable && this.range.startContainer.childNodes[this.range.startOffset] &&
48
- this.range.startContainer.childNodes[this.range.startOffset].nodeName === 'TABLE';
49
- if (isCursorAtTableEnd || isCursorAtTableStart) {
50
- this.handleCursorAtTableSide(e, isCursorAtTableStart, isCursorAtTableEnd);
51
- return;
42
+ var tableImagCursor = this.processedTableImageCursor();
43
+ if (tableImagCursor.start || tableImagCursor.end) {
44
+ if (tableImagCursor.startName === 'TABLE' || tableImagCursor.endName === 'TABLE') { // Default browser action prevented and hanled manually.
45
+ this.handleCursorAtTableSide(e, tableImagCursor.start, tableImagCursor.end);
46
+ return;
47
+ }
48
+ }
49
+ if (tableImagCursor.start || tableImagCursor.end || this.range.startContainer.nodeName === 'IMG') {
50
+ if (this.parent.enterKey === 'BR' && (tableImagCursor.startName === 'IMG' || tableImagCursor.endName === 'IMG' || this.range.startContainer.nodeName === 'IMG')) { // Default browser action prevented and hanled manually.
51
+ this.handleEnterKeyAtImageSide(e, tableImagCursor.start, tableImagCursor.end);
52
+ return;
53
+ }
52
54
  }
53
55
  if (!isNOU(this.startNode.closest('TABLE')) && !isNOU(this.endNode.closest('TABLE'))) {
54
56
  isTableEnter = false;
@@ -417,7 +419,6 @@ var EnterKeyAction = /** @class */ (function () {
417
419
  var outerBRElem = _this.parent.createElement('br');
418
420
  if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
419
421
  !isNOU(currentParent.previousSibling) && currentParent.previousSibling.nodeName === 'BR' && currentParent.nodeName !== 'P' && currentParent.nodeName !== 'DIV') {
420
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
421
422
  newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, false).cloneNode(true);
422
423
  _this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
423
424
  _this.insertFocusContent();
@@ -447,7 +448,7 @@ var EnterKeyAction = /** @class */ (function () {
447
448
  }
448
449
  e.args.preventDefault();
449
450
  }
450
- _this.parent.trigger(events.actionComplete, { requestType: shiftKey_1 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
451
+ _this.triggerActionComplete(e, shiftKey_1);
451
452
  }
452
453
  });
453
454
  }
@@ -517,6 +518,9 @@ var EnterKeyAction = /** @class */ (function () {
517
518
  }
518
519
  return insertElem;
519
520
  };
521
+ EnterKeyAction.prototype.triggerActionComplete = function (e, shiftKey) {
522
+ this.parent.trigger(events.actionComplete, { requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
523
+ };
520
524
  EnterKeyAction.prototype.handleCursorAtTableSide = function (e, isStart, isEnd) {
521
525
  var _this = this;
522
526
  if (this.parent.enterKey !== 'BR') {
@@ -547,11 +551,92 @@ var EnterKeyAction = /** @class */ (function () {
547
551
  }
548
552
  _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement, 0);
549
553
  e.args.preventDefault();
550
- _this.parent.trigger(events.actionComplete, { requestType: shiftKey_2 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
554
+ _this.triggerActionComplete(e, shiftKey_2);
551
555
  }
552
556
  });
553
557
  }
554
558
  };
559
+ EnterKeyAction.prototype.handleEnterKeyAtImageSide = function (e, isStart, isEnd) {
560
+ var _this = this;
561
+ var actionBeginArgs = {
562
+ cancel: false,
563
+ name: events.actionBegin,
564
+ requestType: e.args.shiftKey ? 'ShiftEnterAction' : 'EnterAction',
565
+ originalEvent: e.args
566
+ };
567
+ var directRange = false;
568
+ if (this.range.startContainer.nodeName === 'IMG' && this.range.startOffset === 0) {
569
+ directRange = true;
570
+ }
571
+ this.parent.trigger(events.actionBegin, actionBeginArgs, function (actionBeginArgs) {
572
+ if (!actionBeginArgs.cancel) {
573
+ if (_this.parent.enterKey === 'BR') {
574
+ var newElement = _this.parent.createElement('BR');
575
+ var imageElement = void 0;
576
+ if (directRange) {
577
+ imageElement = _this.range.startContainer;
578
+ imageElement.parentElement.insertBefore(newElement, imageElement);
579
+ _this.parent.formatter.editorManager.nodeSelection.
580
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
581
+ }
582
+ if (isStart) {
583
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset];
584
+ imageElement.parentElement.insertBefore(newElement, imageElement);
585
+ _this.parent.formatter.editorManager.nodeSelection.
586
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
587
+ }
588
+ if (isEnd) {
589
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset - 1];
590
+ if (!isNOU(imageElement.nextSibling)) {
591
+ imageElement.parentElement.insertBefore(newElement, imageElement.nextSibling);
592
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement.nextSibling, 0);
593
+ }
594
+ else if (isNOU(imageElement.nextSibling)) {
595
+ imageElement.parentElement.appendChild(newElement);
596
+ var brElement = _this.parent.createElement('BR');
597
+ imageElement.parentElement.appendChild(brElement);
598
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), brElement, 0);
599
+ }
600
+ }
601
+ e.args.preventDefault();
602
+ _this.triggerActionComplete(e, e.args.shiftKey);
603
+ }
604
+ }
605
+ });
606
+ };
607
+ EnterKeyAction.prototype.isTableOrImageStart = function () {
608
+ var customHandlerElements = ['IMG', 'TABLE'];
609
+ var startContainer = this.range.startContainer;
610
+ var startOffset = this.range.startOffset;
611
+ var isCursorAtStart = this.range.collapsed && (startContainer.nodeType === 1) &&
612
+ startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
613
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
614
+ if (isCursorAtStart) {
615
+ return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
616
+ }
617
+ else {
618
+ return { start: false, startNodeName: '' };
619
+ }
620
+ };
621
+ EnterKeyAction.prototype.isTableOrImageEnd = function () {
622
+ var customHandlerElements = ['IMG', 'TABLE'];
623
+ var startContainer = this.range.startContainer;
624
+ var startOffset = this.range.startOffset;
625
+ var isCursorAtEnd = this.range.collapsed && (startContainer.nodeType === 1) &&
626
+ startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
627
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
628
+ if (isCursorAtEnd) {
629
+ return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
630
+ }
631
+ else {
632
+ return { end: false, endNodeName: '' };
633
+ }
634
+ };
635
+ EnterKeyAction.prototype.processedTableImageCursor = function () {
636
+ var _a = this.isTableOrImageStart(), start = _a.start, startNodeName = _a.startNodeName;
637
+ var _b = this.isTableOrImageEnd(), end = _b.end, endNodeName = _b.endNodeName;
638
+ return { start: start, startName: startNodeName, end: end, endName: endNodeName };
639
+ };
555
640
  return EnterKeyAction;
556
641
  }());
557
642
  export { EnterKeyAction };
@@ -25,9 +25,6 @@ var FullScreen = /** @class */ (function () {
25
25
  && !isNOU(this.parent.quickToolbarModule)) {
26
26
  this.parent.quickToolbarModule.hideQuickToolbars();
27
27
  }
28
- if (this.parent.showTooltip && !isNOU(document.querySelector('.e-tooltip-wrap'))) {
29
- this.parent.notify(events.destroyTooltip, { args: event });
30
- }
31
28
  this.scrollableParent = getScrollableParent(this.parent.element);
32
29
  if (!this.parent.element.classList.contains(classes.CLS_FULL_SCREEN)) {
33
30
  var evenArgs = {
@@ -80,9 +77,6 @@ var FullScreen = /** @class */ (function () {
80
77
  && !isNOU(this.parent.quickToolbarModule)) {
81
78
  this.parent.quickToolbarModule.hideQuickToolbars();
82
79
  }
83
- if (this.parent.showTooltip && !isNOU(document.querySelector('.e-tooltip-wrap'))) {
84
- this.parent.notify(events.destroyTooltip, { args: event });
85
- }
86
80
  if (this.parent.element.classList.contains(classes.CLS_FULL_SCREEN)) {
87
81
  var evenArgs = {
88
82
  cancel: false,
@@ -106,4 +106,5 @@ export declare class HtmlEditor {
106
106
  * @hidden
107
107
  */
108
108
  private getSelectedHtml;
109
+ private marginTabAdd;
109
110
  }
@@ -287,25 +287,54 @@ var HtmlEditor = /** @class */ (function () {
287
287
  this.deleteCleanup(e, currentRange);
288
288
  }
289
289
  if (args.keyCode === 9 && this.parent.enableTabKey) {
290
+ this.parent.formatter.saveData(e);
290
291
  if (!isNOU(args.target) && isNullOrUndefined(closest(args.target, '.e-rte-toolbar'))) {
291
292
  var range = this.nodeSelectionObj.getRange(this.contentRenderer.getDocument());
292
293
  var parentNode = this.nodeSelectionObj.getParentNodeCollection(range);
293
294
  if (!((parentNode[0].nodeName === 'LI' || closest(parentNode[0], 'li') ||
294
- closest(parentNode[0], 'table')) && range.startOffset === 0)) {
295
+ closest(parentNode[0], 'table')))) {
295
296
  args.preventDefault();
296
- if (!args.shiftKey) {
297
- InsertHtml.Insert(this.contentRenderer.getDocument(), '    ');
298
- this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
297
+ var selection = this.contentRenderer.getDocument().getSelection().getRangeAt(0);
298
+ var alignmentNodes = this.parent.formatter.editorManager.domNode.blockNodes();
299
+ if (this.parent.enterKey === 'BR') {
300
+ if (selection.startOffset !== selection.endOffset && selection.startOffset === 0) {
301
+ var save = this.nodeSelectionObj.save(range, this.contentRenderer.getDocument());
302
+ this.parent.formatter.editorManager.domNode.setMarker(save);
303
+ alignmentNodes = this.parent.formatter.editorManager.domNode.blockNodes();
304
+ this.parent.formatter.editorManager.domNode.convertToBlockNodes(alignmentNodes, false);
305
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
306
+ save = this.parent.formatter.editorManager.domNode.saveMarker(save);
307
+ save.restore();
308
+ }
309
+ else {
310
+ InsertHtml.Insert(this.contentRenderer.getDocument(), '    ');
311
+ this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
312
+ }
299
313
  }
300
- else if (this.rangeCollection.length > 0 &&
301
- this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
302
- var textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
303
- this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
304
- InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
305
- this.rangeCollection.pop();
314
+ else {
315
+ if (!args.shiftKey) {
316
+ if (selection.startOffset !== selection.endOffset && selection.startOffset === 0) {
317
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
318
+ }
319
+ else {
320
+ InsertHtml.Insert(this.contentRenderer.getDocument(), '    ');
321
+ this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
322
+ }
323
+ }
324
+ else if (this.rangeCollection.length > 0 &&
325
+ this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
326
+ var textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
327
+ this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
328
+ InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
329
+ this.rangeCollection.pop();
330
+ }
331
+ else {
332
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
333
+ }
306
334
  }
307
335
  }
308
336
  }
337
+ this.parent.formatter.saveData(e);
309
338
  }
310
339
  if (e.args.action === 'space' ||
311
340
  e.args.action === 'enter' ||
@@ -968,6 +997,30 @@ var HtmlEditor = /** @class */ (function () {
968
997
  HtmlEditor.prototype.getSelectedHtml = function (e) {
969
998
  e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString());
970
999
  };
1000
+ HtmlEditor.prototype.marginTabAdd = function (val, alignmentNodes) {
1001
+ for (var index = 0; index < alignmentNodes.length; index++) {
1002
+ var element = alignmentNodes[index];
1003
+ if (element.closest('li')) {
1004
+ continue;
1005
+ }
1006
+ if (element.style.marginLeft) {
1007
+ var count = parseInt(element.style.marginLeft, 10);
1008
+ if (val) {
1009
+ count -= 20;
1010
+ }
1011
+ else {
1012
+ count += 20;
1013
+ }
1014
+ element.style.marginLeft = count.toString() + 'px';
1015
+ if (element.style.marginLeft === '0px') {
1016
+ element.removeAttribute('style');
1017
+ }
1018
+ }
1019
+ else if (!val) {
1020
+ element.style.marginLeft = '20px';
1021
+ }
1022
+ }
1023
+ };
971
1024
  return HtmlEditor;
972
1025
  }());
973
1026
  export { HtmlEditor };
@@ -674,7 +674,8 @@ var PasteCleanup = /** @class */ (function () {
674
674
  clipBoardElem = this.allowedStyle(clipBoardElem);
675
675
  }
676
676
  this.saveSelection.restore();
677
- clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
677
+ var newText = clipBoardElem.innerHTML.split("&").join("&amp;");
678
+ clipBoardElem.innerHTML = this.sanitizeHelper(newText);
678
679
  var allImg = clipBoardElem.querySelectorAll('img');
679
680
  for (var i = 0; i < allImg.length; i++) {
680
681
  if (!isNOU(allImg[i].getAttribute('src'))) {
@@ -1330,6 +1330,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
1330
1330
  updateValueData(): void;
1331
1331
  private removeSheets;
1332
1332
  private updatePanelValue;
1333
+ private listOrderCorrection;
1333
1334
  private setHeight;
1334
1335
  /**
1335
1336
  * setPlaceHolder method
@@ -1425,7 +1425,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1425
1425
  }
1426
1426
  };
1427
1427
  RichTextEditor.prototype.updatePanelValue = function () {
1428
- var value = this.value;
1428
+ var value = this.listOrderCorrection(this.value);
1429
1429
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
1430
1430
  var getTextArea = this.element.querySelector('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA);
1431
1431
  if (value) {
@@ -1469,6 +1469,17 @@ var RichTextEditor = /** @class */ (function (_super) {
1469
1469
  this.countModule.refresh();
1470
1470
  }
1471
1471
  };
1472
+ RichTextEditor.prototype.listOrderCorrection = function (value) {
1473
+ var valueElementWrapper = this.createElement('div');
1474
+ valueElementWrapper.innerHTML = value;
1475
+ var listElements = valueElementWrapper.querySelectorAll('UL, OL');
1476
+ for (var i = 0; i < listElements.length; i++) {
1477
+ if (!isNOU(listElements[i]) && !isNOU(listElements[i].parentElement) && !isNOU(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
1478
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
1479
+ }
1480
+ }
1481
+ return valueElementWrapper.innerHTML;
1482
+ };
1472
1483
  RichTextEditor.prototype.setHeight = function (height) {
1473
1484
  if (height !== 'auto') {
1474
1485
  this.element.style.height = formatUnit(height);
@@ -624,13 +624,13 @@ var Image = /** @class */ (function () {
624
624
  selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
625
625
  if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
626
626
  (!isNOU(selectParentEle[0]) && selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
627
- var prev = selectParentEle[0].parentElement.childNodes[0];
628
627
  if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
629
628
  this.removeResizeEle();
630
629
  }
631
- this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), prev, prev, prev.textContent.length, prev.textContent.length);
632
630
  removeClass([selectParentEle[0]], 'e-img-focus');
633
- this.quickToolObj.imageQTBar.hidePopup();
631
+ if (this.quickToolObj && this.quickToolObj.imageQTBar) {
632
+ this.quickToolObj.imageQTBar.hidePopup();
633
+ }
634
634
  }
635
635
  }
636
636
  if (originalEvent.ctrlKey && (originalEvent.keyCode === 89 || originalEvent.keyCode === 90)) {
@@ -462,8 +462,6 @@ var ToolbarRenderer = /** @class */ (function () {
462
462
  target: colorPicker.element.parentElement, cssClass: css,
463
463
  enablePersistence: this.parent.enablePersistence, enableRtl: this.parent.enableRtl,
464
464
  beforeOpen: function (dropDownArgs) {
465
- colorPicker.inline = true;
466
- colorPicker.dataBind();
467
465
  if (proxy.parent.readonly || !proxy.parent.enabled) {
468
466
  dropDownArgs.cancel = true;
469
467
  return;
@@ -602,14 +600,18 @@ var ToolbarRenderer = /** @class */ (function () {
602
600
  var colorPicker = new ColorPicker({
603
601
  enablePersistence: this.parent.enablePersistence,
604
602
  enableRtl: this.parent.enableRtl,
605
- inline: false,
606
- value: '#fff',
603
+ inline: true,
604
+ value: null,
605
+ cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
607
606
  created: function () {
608
607
  var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
609
- colorPicker.setProperties({ value: value });
608
+ colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
609
+ colorPicker.value = value;
610
610
  },
611
611
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
612
612
  modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),
613
+ presetColors: (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode : this.parent.fontColor.colorCode,
614
+ columns: (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns,
613
615
  beforeTileRender: function (args) {
614
616
  args.element.classList.add(CLS_COLOR_PALETTE);
615
617
  args.element.classList.add(CLS_CUSTOM_TILE);
@@ -654,10 +656,6 @@ var ToolbarRenderer = /** @class */ (function () {
654
656
  }
655
657
  });
656
658
  colorPicker.isStringTemplate = true;
657
- colorPicker.columns = (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns;
658
- colorPicker.presetColors = (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode :
659
- this.parent.fontColor.colorCode;
660
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
661
659
  colorPicker.createElement = this.parent.createElement;
662
660
  colorPicker.appendTo(document.getElementById(args.target));
663
661
  return colorPicker;