@syncfusion/ej2-richtexteditor 21.2.10 → 22.1.34
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.
- package/.eslintrc.json +1 -0
- package/CHANGELOG.md +18 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +1558 -186
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +1571 -189
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/common/config.js +2 -2
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/interface.d.ts +2 -2
- package/src/common/util.js +2 -0
- package/src/editor-manager/base/editor-manager.d.ts +4 -3
- package/src/editor-manager/base/editor-manager.js +6 -1
- package/src/editor-manager/base/interface.d.ts +44 -9
- package/src/editor-manager/plugin/clearformat.d.ts +1 -0
- package/src/editor-manager/plugin/clearformat.js +1 -0
- package/src/editor-manager/plugin/dom-node.js +10 -6
- package/src/editor-manager/plugin/emoji-picker-action.d.ts +8 -0
- package/src/editor-manager/plugin/emoji-picker-action.js +62 -0
- package/src/editor-manager/plugin/format-painter-actions.d.ts +19 -36
- package/src/editor-manager/plugin/format-painter-actions.js +224 -81
- package/src/editor-manager/plugin/inserthtml.js +6 -1
- package/src/editor-manager/plugin/link.js +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +3 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +40 -7
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -1
- package/src/editor-manager/plugin/selection-commands.js +48 -23
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +6 -0
- package/src/editor-manager/plugin/undo.d.ts +1 -0
- package/src/editor-manager/plugin/undo.js +26 -5
- package/src/editor-manager/plugin.d.ts +1 -0
- package/src/editor-manager/plugin.js +1 -0
- package/src/global.js +1 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.js +8 -1
- package/src/rich-text-editor/actions/base-toolbar.js +3 -2
- package/src/rich-text-editor/actions/emoji-picker.d.ts +48 -0
- package/src/rich-text-editor/actions/emoji-picker.js +778 -0
- package/src/rich-text-editor/actions/enter-key.js +2 -2
- package/src/rich-text-editor/actions/execute-command-callback.js +3 -1
- package/src/rich-text-editor/actions/file-manager.js +1 -0
- package/src/rich-text-editor/actions/format-painter.d.ts +2 -2
- package/src/rich-text-editor/actions/format-painter.js +11 -9
- package/src/rich-text-editor/actions/full-screen.js +6 -0
- package/src/rich-text-editor/actions/html-editor.js +11 -2
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -0
- package/src/rich-text-editor/actions/resize.js +1 -1
- package/src/rich-text-editor/actions.d.ts +1 -0
- package/src/rich-text-editor/actions.js +1 -0
- package/src/rich-text-editor/base/constant.d.ts +10 -0
- package/src/rich-text-editor/base/constant.js +10 -0
- package/src/rich-text-editor/base/enum.d.ts +0 -4
- package/src/rich-text-editor/base/interface.d.ts +44 -6
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +13 -7
- package/src/rich-text-editor/base/rich-text-editor.d.ts +27 -7
- package/src/rich-text-editor/base/rich-text-editor.js +42 -12
- package/src/rich-text-editor/base/util.js +2 -2
- package/src/rich-text-editor/formatter/formatter.js +7 -5
- package/src/rich-text-editor/models/default-locale.js +14 -2
- package/src/rich-text-editor/models/items.d.ts +2 -1
- package/src/rich-text-editor/models/items.js +188 -1
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +212 -9
- package/src/rich-text-editor/models/toolbar-settings.d.ts +209 -11
- package/src/rich-text-editor/models/toolbar-settings.js +23 -6
- package/src/rich-text-editor/renderer/audio-module.js +3 -3
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +11 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +7 -2
- package/src/rich-text-editor/renderer/video-module.js +14 -9
- package/styles/bootstrap-dark.css +299 -137
- package/styles/bootstrap.css +305 -140
- package/styles/bootstrap4.css +304 -133
- package/styles/bootstrap5-dark.css +310 -165
- package/styles/bootstrap5.css +310 -165
- package/styles/fabric-dark.css +297 -136
- package/styles/fabric.css +294 -133
- package/styles/fluent-dark.css +311 -170
- package/styles/fluent.css +311 -170
- package/styles/highcontrast-light.css +289 -128
- package/styles/highcontrast.css +296 -135
- package/styles/material-dark.css +295 -129
- package/styles/material.css +300 -134
- package/styles/material3-dark.css +3082 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +3138 -0
- package/styles/material3.scss +3 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +54 -12
- package/styles/rich-text-editor/_bootstrap-definition.scss +57 -13
- package/styles/rich-text-editor/_bootstrap4-definition.scss +50 -7
- package/styles/rich-text-editor/_bootstrap5-definition.scss +56 -13
- package/styles/rich-text-editor/_fabric-dark-definition.scss +53 -10
- package/styles/rich-text-editor/_fabric-definition.scss +52 -9
- package/styles/rich-text-editor/_fluent-definition.scss +56 -15
- package/styles/rich-text-editor/_fusionnew-definition.scss +46 -4
- package/styles/rich-text-editor/_highcontrast-definition.scss +52 -9
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +48 -5
- package/styles/rich-text-editor/_layout.scss +280 -68
- package/styles/rich-text-editor/_material-dark-definition.scss +48 -5
- package/styles/rich-text-editor/_material-definition.scss +50 -6
- package/styles/rich-text-editor/_material3-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_material3-definition.scss +262 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +63 -23
- package/styles/rich-text-editor/_theme.scss +103 -19
- package/styles/rich-text-editor/bootstrap-dark.css +299 -137
- package/styles/rich-text-editor/bootstrap.css +305 -140
- package/styles/rich-text-editor/bootstrap4.css +304 -133
- package/styles/rich-text-editor/bootstrap5-dark.css +310 -165
- package/styles/rich-text-editor/bootstrap5.css +310 -165
- package/styles/rich-text-editor/fabric-dark.css +297 -136
- package/styles/rich-text-editor/fabric.css +294 -133
- package/styles/rich-text-editor/fluent-dark.css +311 -170
- package/styles/rich-text-editor/fluent.css +311 -170
- package/styles/rich-text-editor/highcontrast-light.css +289 -128
- package/styles/rich-text-editor/highcontrast.css +296 -135
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +1 -1
- package/styles/rich-text-editor/icons/_bootstrap.scss +1 -1
- package/styles/rich-text-editor/icons/_bootstrap4.scss +1 -1
- package/styles/rich-text-editor/icons/_bootstrap5.scss +1 -1
- package/styles/rich-text-editor/icons/_fabric-dark.scss +1 -1
- package/styles/rich-text-editor/icons/_fabric.scss +1 -1
- package/styles/rich-text-editor/icons/_fluent.scss +1 -1
- package/styles/rich-text-editor/icons/_fusionnew.scss +1 -1
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +1 -1
- package/styles/rich-text-editor/icons/_highcontrast.scss +1 -1
- package/styles/rich-text-editor/icons/_material-dark.scss +1 -1
- package/styles/rich-text-editor/icons/_material.scss +1 -1
- package/styles/rich-text-editor/icons/_material3-dark.scss +1 -0
- package/styles/rich-text-editor/icons/_material3.scss +1 -1
- package/styles/rich-text-editor/icons/_tailwind.scss +1 -1
- package/styles/rich-text-editor/material-dark.css +295 -129
- package/styles/rich-text-editor/material.css +300 -134
- package/styles/rich-text-editor/material3-dark.css +3082 -0
- package/styles/rich-text-editor/material3-dark.scss +5 -0
- package/styles/rich-text-editor/material3.css +3138 -0
- package/styles/rich-text-editor/material3.scss +5 -0
- package/styles/rich-text-editor/tailwind-dark.css +313 -157
- package/styles/rich-text-editor/tailwind.css +313 -157
- package/styles/tailwind-dark.css +313 -157
- package/styles/tailwind.css +313 -157
|
@@ -465,8 +465,10 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
465
465
|
while (currentFormatNode) {
|
|
466
466
|
var isSameTextContent = currentFormatNode.parentElement.textContent.trim()
|
|
467
467
|
=== nodes[index].textContent.trim();
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
var parent_1 = currentFormatNode.parentElement;
|
|
469
|
+
if (!domNode.isBlockNode(parent_1) && isSameTextContent &&
|
|
470
|
+
!(parent_1.nodeName === 'SPAN' && parent_1.classList.contains('e-img-inner'))) {
|
|
471
|
+
currentFormatNode = parent_1;
|
|
470
472
|
}
|
|
471
473
|
else {
|
|
472
474
|
break;
|
|
@@ -647,33 +649,19 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
647
649
|
};
|
|
648
650
|
// Below function is used to insert the element created by the format painter plugin.
|
|
649
651
|
SelectionCommands.insertFormatPainterElem = function (nodes, index, range, nodeCutter, painterValues, domNode) {
|
|
650
|
-
var parent = nodes[index].parentElement
|
|
652
|
+
var parent = !domNode.isBlockNode(nodes[index].parentElement) ?
|
|
653
|
+
nodes[index].parentElement : nodes[index];
|
|
651
654
|
if (!domNode.isBlockNode(parent)) {
|
|
652
|
-
// The below code is used to remove the already present inline style from the text node.
|
|
653
655
|
while (parent.textContent.trim() === parent.parentElement.textContent.trim() && !domNode.isBlockNode(parent.parentElement)) {
|
|
654
656
|
parent = parent.parentElement;
|
|
655
657
|
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
if (childELemList[i].textContent.trim() === nodes[i].textContent.trim()) {
|
|
661
|
-
parent.parentNode.insertBefore(childELemList[i], parent);
|
|
662
|
-
break;
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
var blockChildNodes = parent.parentElement.childNodes;
|
|
666
|
-
for (var k = 0; k < blockChildNodes.length; k++) {
|
|
667
|
-
if (blockChildNodes[k].textContent.trim() === '' || blockChildNodes[k].textContent.length === 0) {
|
|
668
|
-
detach(blockChildNodes[k]);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
else {
|
|
673
|
-
InsertMethods.unwrap(parent);
|
|
674
|
-
}
|
|
658
|
+
}
|
|
659
|
+
// The below code is used to remove the already present inline style from the text node.
|
|
660
|
+
if (!isNOU(parent) && parent.nodeType === 1 && !(parent.classList.contains('e-rte-img-caption') || parent.classList.contains('e-img-inner'))) {
|
|
661
|
+
this.formatPainterCleanup(index, nodes, parent, range, nodeCutter, domNode);
|
|
675
662
|
}
|
|
676
663
|
var elem = painterValues.element;
|
|
664
|
+
// The below code is used to apply the inline format copied.
|
|
677
665
|
if (!isNOU(elem)) {
|
|
678
666
|
// Step 1: Cloning the element that is created by format painter.
|
|
679
667
|
// Step 2: Finding the last child of the nested elememt using the paintervalues.lastchild nodename
|
|
@@ -698,6 +686,43 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
698
686
|
}
|
|
699
687
|
return nodes[index];
|
|
700
688
|
};
|
|
689
|
+
SelectionCommands.formatPainterCleanup = function (index, nodes, parent, range, nodeCutter, domNode) {
|
|
690
|
+
var INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
691
|
+
if (index === 0 && parent.textContent.trim() !== nodes[index].textContent.trim()) {
|
|
692
|
+
nodeCutter.SplitNode(range, parent, true);
|
|
693
|
+
var childELemList = nodes[index].parentElement.childNodes;
|
|
694
|
+
for (var i = 0; i < childELemList.length; i++) {
|
|
695
|
+
if (childELemList[i].textContent.trim() === nodes[i].textContent.trim()) {
|
|
696
|
+
parent.parentNode.insertBefore(childELemList[i], parent);
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
var blockChildNodes = parent.parentElement.childNodes;
|
|
701
|
+
for (var k = 0; k < blockChildNodes.length; k++) {
|
|
702
|
+
if (blockChildNodes[k].textContent.trim() === '' || blockChildNodes[k].textContent.length === 0) {
|
|
703
|
+
detach(blockChildNodes[k]);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
else if (parent.textContent.trim() !== nodes[index].textContent.trim()) {
|
|
708
|
+
parent.parentElement.insertBefore(nodes[index], parent);
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
while (!isNOU(parent) && parent.nodeType !== 3 && !domNode.isBlockNode(parent)) {
|
|
712
|
+
var temp = void 0;
|
|
713
|
+
for (var i = 0; i < parent.childNodes.length; i++) {
|
|
714
|
+
var currentChild = parent.childNodes[i];
|
|
715
|
+
if (currentChild.textContent.trim().length !== 0 && currentChild.nodeType !== 3) {
|
|
716
|
+
temp = parent.childNodes[i];
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
if (INVALID_TAGS.indexOf(parent.tagName) === -1) {
|
|
720
|
+
InsertMethods.unwrap(parent);
|
|
721
|
+
}
|
|
722
|
+
parent = temp;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
};
|
|
701
726
|
SelectionCommands.enterAction = 'P';
|
|
702
727
|
return SelectionCommands;
|
|
703
728
|
}());
|
|
@@ -525,10 +525,10 @@ var TableCommand = /** @class */ (function () {
|
|
|
525
525
|
this.updateRowSpanStyle(minMaxIndexes.startRow, minMaxIndexes.endRow, this.getCorrespondingColumns());
|
|
526
526
|
this.updateColSpanStyle(minMaxIndexes.startColumn, minMaxIndexes.endColumn, this.getCorrespondingColumns());
|
|
527
527
|
e.item.selection.setSelectionText(this.parent.currentDocument, e.item.selection.range.startContainer, e.item.selection.range.startContainer, 0, 0);
|
|
528
|
-
if (this.parent.nodeSelection
|
|
528
|
+
if (this.parent.nodeSelection && firstCell) {
|
|
529
529
|
this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
|
|
530
530
|
// eslint-disable-next-line
|
|
531
|
-
|
|
531
|
+
firstCell, 0);
|
|
532
532
|
}
|
|
533
533
|
if (e.callBack) {
|
|
534
534
|
e.callBack({
|
|
@@ -323,6 +323,9 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
323
323
|
else if (list === 'none') {
|
|
324
324
|
return 'None';
|
|
325
325
|
}
|
|
326
|
+
else if (this.isOrderedList(node)) {
|
|
327
|
+
return true;
|
|
328
|
+
}
|
|
326
329
|
else {
|
|
327
330
|
return null;
|
|
328
331
|
}
|
|
@@ -341,6 +344,9 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
341
344
|
else if (list === 'disc') {
|
|
342
345
|
return 'Disc';
|
|
343
346
|
}
|
|
347
|
+
else if (this.isUnorderedList(node)) {
|
|
348
|
+
return true;
|
|
349
|
+
}
|
|
344
350
|
else {
|
|
345
351
|
return null;
|
|
346
352
|
}
|
|
@@ -85,6 +85,19 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
85
85
|
this.saveData(e);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
+
UndoRedoManager.prototype.getTextContentFromFragment = function (fragment) {
|
|
89
|
+
var textContent = '';
|
|
90
|
+
for (var i = 0; i < fragment.childNodes.length; i++) {
|
|
91
|
+
var childNode = fragment.childNodes[i];
|
|
92
|
+
if (childNode.nodeType === Node.TEXT_NODE) {
|
|
93
|
+
textContent += childNode.textContent;
|
|
94
|
+
}
|
|
95
|
+
else if (childNode.nodeType === Node.ELEMENT_NODE) {
|
|
96
|
+
textContent += this.getTextContentFromFragment(childNode);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return textContent;
|
|
100
|
+
};
|
|
88
101
|
/**
|
|
89
102
|
* RTE collection stored html format.
|
|
90
103
|
*
|
|
@@ -107,8 +120,12 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
107
120
|
}
|
|
108
121
|
range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
109
122
|
var save = new NodeSelection().save(range, this.parent.currentDocument);
|
|
110
|
-
var
|
|
111
|
-
var
|
|
123
|
+
var clonedElement = this.parent.editableElement.cloneNode(true);
|
|
124
|
+
var fragment = document.createDocumentFragment();
|
|
125
|
+
while (clonedElement.firstChild) {
|
|
126
|
+
fragment.appendChild(clonedElement.firstChild);
|
|
127
|
+
}
|
|
128
|
+
var changEle = { text: fragment, range: save };
|
|
112
129
|
if (this.undoRedoStack.length >= this.steps) {
|
|
113
130
|
this.undoRedoStack = this.undoRedoStack.slice(0, this.steps + 1);
|
|
114
131
|
}
|
|
@@ -116,7 +133,8 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
116
133
|
&& (this.undoRedoStack[this.undoRedoStack.length - 1].range.startOffset === save.range.startOffset) &&
|
|
117
134
|
(this.undoRedoStack[this.undoRedoStack.length - 1].range.endOffset === save.range.endOffset) &&
|
|
118
135
|
(this.undoRedoStack[this.undoRedoStack.length - 1].range.range.startContainer === save.range.startContainer) &&
|
|
119
|
-
(this.undoRedoStack[this.undoRedoStack.length - 1].text.trim() ===
|
|
136
|
+
(this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length - 1].text).trim() ===
|
|
137
|
+
this.getTextContentFromFragment(changEle.text).trim())) {
|
|
120
138
|
return;
|
|
121
139
|
}
|
|
122
140
|
this.undoRedoStack.push(changEle);
|
|
@@ -142,7 +160,8 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
142
160
|
if (this.steps > 0) {
|
|
143
161
|
var range = this.undoRedoStack[this.steps - 1].range;
|
|
144
162
|
var removedContent = this.undoRedoStack[this.steps - 1].text;
|
|
145
|
-
this.parent.editableElement.innerHTML =
|
|
163
|
+
this.parent.editableElement.innerHTML = '';
|
|
164
|
+
this.parent.editableElement.appendChild(removedContent.cloneNode(true));
|
|
146
165
|
this.parent.editableElement.focus();
|
|
147
166
|
if (isIDevice()) {
|
|
148
167
|
setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
@@ -172,7 +191,9 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
172
191
|
UndoRedoManager.prototype.redo = function (e) {
|
|
173
192
|
if (this.undoRedoStack[this.steps + 1] != null) {
|
|
174
193
|
var range = this.undoRedoStack[this.steps + 1].range;
|
|
175
|
-
|
|
194
|
+
var addedContent = this.undoRedoStack[this.steps + 1].text;
|
|
195
|
+
this.parent.editableElement.innerHTML = '';
|
|
196
|
+
this.parent.editableElement.appendChild(addedContent.cloneNode(true));
|
|
176
197
|
this.parent.editableElement.focus();
|
|
177
198
|
if (isIDevice()) {
|
|
178
199
|
setEditFrameFocus(this.parent.editableElement, e.selector);
|
package/src/global.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as index from './index';
|
|
2
|
-
index.RichTextEditor.Inject(index.Toolbar, index.Link, index.Image, index.Audio, index.Video, index.Count, index.QuickToolbar, index.HtmlEditor, index.MarkdownEditor, index.Table, index.PasteCleanup, index.Resize, index.FileManager, index.FormatPainter);
|
|
2
|
+
index.RichTextEditor.Inject(index.Toolbar, index.Link, index.Image, index.Audio, index.Video, index.Count, index.QuickToolbar, index.HtmlEditor, index.MarkdownEditor, index.Table, index.PasteCleanup, index.Resize, index.FileManager, index.FormatPainter, index.EmojiPicker);
|
|
3
3
|
export * from './index';
|
|
@@ -183,7 +183,8 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
183
183
|
*/
|
|
184
184
|
BaseQuickToolbar.prototype.showPopup = function (x, y, target) {
|
|
185
185
|
var _this = this;
|
|
186
|
-
var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target,
|
|
186
|
+
var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target,
|
|
187
|
+
positionX: x, positionY: y };
|
|
187
188
|
this.parent.trigger(events.beforeQuickToolbarOpen, eventArgs, function (beforeQuickToolbarArgs) {
|
|
188
189
|
if (!beforeQuickToolbarArgs.cancel) {
|
|
189
190
|
var editPanelTop = void 0;
|
|
@@ -219,6 +220,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
219
220
|
if (_this.parent.showTooltip) {
|
|
220
221
|
_this.tooltip = new Tooltip({
|
|
221
222
|
target: '#' + _this.element.id + ' [title]',
|
|
223
|
+
openDelay: 400,
|
|
222
224
|
showTipPointer: true
|
|
223
225
|
});
|
|
224
226
|
_this.tooltip.appendTo(_this.element);
|
|
@@ -299,6 +301,11 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
299
301
|
}
|
|
300
302
|
this.tooltip.destroy();
|
|
301
303
|
}
|
|
304
|
+
else {
|
|
305
|
+
if (!isNullOrUndefined(this.tooltip)) {
|
|
306
|
+
this.tooltip.destroy();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
302
309
|
if (!isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
303
310
|
if (isNullOrUndefined(viewSourcePanel) || viewSourcePanel.style.display === 'none') {
|
|
304
311
|
this.parent.enableToolbarItem(this.parent.toolbarSettings.items);
|
|
@@ -154,8 +154,9 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
154
154
|
_this.parent.formatter.saveData();
|
|
155
155
|
}
|
|
156
156
|
callback_1.call(_this);
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
var currentContentElem = _this.parent.createElement('div');
|
|
158
|
+
currentContentElem.appendChild(_this.parent.formatter.getUndoRedoStack()[_this.parent.formatter.getUndoRedoStack().length - 1].text);
|
|
159
|
+
if (currentContentElem.innerHTML.trim() === _this.parent.inputElement.innerHTML.trim()) {
|
|
159
160
|
return;
|
|
160
161
|
}
|
|
161
162
|
if (proxy_1.undo) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IRichTextEditor } from '../base/interface';
|
|
2
|
+
import { ServiceLocator } from '../services/service-locator';
|
|
3
|
+
import { RendererFactory } from '../services/renderer-factory';
|
|
4
|
+
import { Popup } from '@syncfusion/ej2-popups';
|
|
5
|
+
import { BaseToolbar } from './base-toolbar';
|
|
6
|
+
export declare class EmojiPicker {
|
|
7
|
+
protected parent: IRichTextEditor;
|
|
8
|
+
protected locator: ServiceLocator;
|
|
9
|
+
protected renderFactory: RendererFactory;
|
|
10
|
+
baseToolbar: BaseToolbar;
|
|
11
|
+
popupObj: Popup;
|
|
12
|
+
private popDiv;
|
|
13
|
+
private save;
|
|
14
|
+
private clickEvent;
|
|
15
|
+
private divElement;
|
|
16
|
+
private i10n;
|
|
17
|
+
constructor(parent?: IRichTextEditor, serviceLocator?: ServiceLocator);
|
|
18
|
+
/**
|
|
19
|
+
* Destroys the Count.
|
|
20
|
+
*
|
|
21
|
+
* @function destroy
|
|
22
|
+
* @returns {void}
|
|
23
|
+
* @hidden
|
|
24
|
+
|
|
25
|
+
*/
|
|
26
|
+
destroy(): void;
|
|
27
|
+
protected addEventListener(): void;
|
|
28
|
+
private toolbarClick;
|
|
29
|
+
private buttoncode;
|
|
30
|
+
private docClick;
|
|
31
|
+
private scrollEvent;
|
|
32
|
+
private contentscroll;
|
|
33
|
+
private emojiToolbarClick;
|
|
34
|
+
private onKeyDown;
|
|
35
|
+
private filterKeyHandler;
|
|
36
|
+
private searchFilter;
|
|
37
|
+
private emojiBtnClick;
|
|
38
|
+
private onkeyPress;
|
|
39
|
+
private onkeyUp;
|
|
40
|
+
private getCoordinates;
|
|
41
|
+
protected removeEventListener(): void;
|
|
42
|
+
/**
|
|
43
|
+
* For internal use only - Get the module name.
|
|
44
|
+
*
|
|
45
|
+
* @returns {string} - returns the string value
|
|
46
|
+
*/
|
|
47
|
+
private getModuleName;
|
|
48
|
+
}
|