@syncfusion/ej2-richtexteditor 27.1.48 → 27.1.50
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/dist/ej2-richtexteditor.min.js +10 -0
- 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 +28 -9
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +28 -9
- 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 +13 -14
- package/src/editor-manager/plugin/clearformat.js +13 -6
- package/src/editor-manager/plugin/inserthtml.js +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +8 -0
- package/src/rich-text-editor/base/rich-text-editor.js +5 -1
- package/src/rich-text-editor/formatter/formatter.js +1 -1
- package/src/rich-text-editor/models/default-locale.js +1 -1
- package/styles/bootstrap-dark-lite.css +20 -0
- package/styles/bootstrap-dark.css +20 -0
- package/styles/bootstrap-lite.css +20 -0
- package/styles/bootstrap.css +20 -0
- package/styles/bootstrap4-lite.css +20 -0
- package/styles/bootstrap4.css +20 -0
- package/styles/bootstrap5-dark-lite.css +20 -0
- package/styles/bootstrap5-dark.css +20 -0
- package/styles/bootstrap5-lite.css +20 -0
- package/styles/bootstrap5.3-lite.css +26 -0
- package/styles/bootstrap5.3.css +26 -0
- package/styles/bootstrap5.css +20 -0
- package/styles/fabric-dark-lite.css +20 -0
- package/styles/fabric-dark.css +20 -0
- package/styles/fabric-lite.css +20 -0
- package/styles/fabric.css +20 -0
- package/styles/fluent-dark-lite.css +20 -0
- package/styles/fluent-dark.css +20 -0
- package/styles/fluent-lite.css +20 -0
- package/styles/fluent.css +20 -0
- package/styles/fluent2-lite.css +20 -0
- package/styles/fluent2.css +20 -0
- package/styles/highcontrast-light-lite.css +20 -0
- package/styles/highcontrast-light.css +20 -0
- package/styles/highcontrast-lite.css +20 -0
- package/styles/highcontrast.css +20 -0
- package/styles/material-dark-lite.css +20 -0
- package/styles/material-dark.css +20 -0
- package/styles/material-lite.css +20 -0
- package/styles/material.css +20 -0
- package/styles/material3-dark-lite.css +20 -0
- package/styles/material3-dark.css +20 -0
- package/styles/material3-lite.css +20 -0
- package/styles/material3.css +20 -0
- package/styles/rich-text-editor/_layout.scss +17 -1
- package/styles/rich-text-editor/_theme.scss +24 -6
- package/styles/rich-text-editor/bootstrap-dark.css +20 -0
- package/styles/rich-text-editor/bootstrap.css +20 -0
- package/styles/rich-text-editor/bootstrap4.css +20 -0
- package/styles/rich-text-editor/bootstrap5-dark.css +20 -0
- package/styles/rich-text-editor/bootstrap5.3.css +26 -0
- package/styles/rich-text-editor/bootstrap5.css +20 -0
- package/styles/rich-text-editor/fabric-dark.css +20 -0
- package/styles/rich-text-editor/fabric.css +20 -0
- package/styles/rich-text-editor/fluent-dark.css +20 -0
- package/styles/rich-text-editor/fluent.css +20 -0
- package/styles/rich-text-editor/fluent2.css +20 -0
- package/styles/rich-text-editor/highcontrast-light.css +20 -0
- package/styles/rich-text-editor/highcontrast.css +20 -0
- package/styles/rich-text-editor/material-dark.css +20 -0
- package/styles/rich-text-editor/material.css +20 -0
- package/styles/rich-text-editor/material3-dark.css +20 -0
- package/styles/rich-text-editor/material3.css +20 -0
- package/styles/rich-text-editor/tailwind-dark.css +20 -0
- package/styles/rich-text-editor/tailwind.css +20 -0
- package/styles/tailwind-dark-lite.css +20 -0
- package/styles/tailwind-dark.css +20 -0
- package/styles/tailwind-lite.css +20 -0
- package/styles/tailwind.css +20 -0
|
@@ -2984,7 +2984,7 @@ var toolsLocale = {
|
|
|
2984
2984
|
'remove': 'remove',
|
|
2985
2985
|
'insertlink': 'insertLink',
|
|
2986
2986
|
'display': 'display',
|
|
2987
|
-
'alttext': '
|
|
2987
|
+
'alttext': 'imageAlternateText',
|
|
2988
2988
|
'dimension': 'dimension',
|
|
2989
2989
|
'fullscreen': 'fullscreen',
|
|
2990
2990
|
'maximize': 'maximize',
|
|
@@ -18683,7 +18683,7 @@ var Formatter = /** @__PURE__ @class */ (function () {
|
|
|
18683
18683
|
}
|
|
18684
18684
|
self.isBlur = false;
|
|
18685
18685
|
var quickToolbarAction = !isNullOrUndefined(event) && !isNullOrUndefined(event.target) && (!isNullOrUndefined(closest(event.target, '.e-rte-elements.e-dropdown-popup.e-rte-dropdown-popup.e-quick-dropdown.e-popup-open')) || !isNullOrUndefined(closest(event.target, '.e-rte-elements.e-rte-quick-popup.e-popup-open')));
|
|
18686
|
-
if (isNullOrUndefined(saveSelection) || (!quickToolbarAction && (isNullOrUndefined(closest(saveSelection.range.startContainer.parentElement, '.e-img-caption')) ? true : !(closest(saveSelection.range.startContainer.parentElement, '.e-img-caption').getAttribute('contenteditable') === 'false')))) {
|
|
18686
|
+
if (isNullOrUndefined(saveSelection) || (!quickToolbarAction && (isNullOrUndefined(closest(saveSelection.range.startContainer.parentElement, '.e-img-caption')) ? true : !(closest(saveSelection.range.startContainer.parentElement, '.e-img-caption').getAttribute('contenteditable') === 'false'))) && !(Browser.userAgent.indexOf('Firefox') !== -1)) {
|
|
18687
18687
|
self.contentModule.getEditPanel().focus();
|
|
18688
18688
|
}
|
|
18689
18689
|
if (self.editorMode === 'HTML' && !isKeyboardVideoInsert) {
|
|
@@ -24432,7 +24432,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24432
24432
|
if (blockNode.nodeName === 'BODY' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
24433
24433
|
blockNode = range.startContainer;
|
|
24434
24434
|
}
|
|
24435
|
-
if (blockNode.closest('LI') && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
24435
|
+
if (blockNode.closest('LI') && editNode.contains(blockNode.closest('LI')) && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
24436
24436
|
((node).firstElementChild.tagName === 'OL' || node.firstElementChild.tagName === 'UL')) {
|
|
24437
24437
|
var liNode = void 0;
|
|
24438
24438
|
while (node.firstElementChild.lastElementChild && node.firstElementChild.lastElementChild.tagName === 'LI') {
|
|
@@ -28454,9 +28454,13 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
28454
28454
|
nodeSelection.setSelectionText(docElement, parentNodes[index1], parentNodes[index1], 0, parentNodes[index1].childNodes.length);
|
|
28455
28455
|
InsertMethods.unwrap(nodeCutter.GetSpliceNode(nodeSelection.getRange(docElement), parentNodes[index1].parentNode));
|
|
28456
28456
|
}
|
|
28457
|
+
var blockquoteNode = closest(parentNodes[index1], 'blockquote');
|
|
28458
|
+
if (parentNodes[index1].nodeName.toLocaleLowerCase() !== 'blockquote' && !isNullOrUndefined(blockquoteNode) && blockquoteNode.textContent === parentNodes[index1].textContent) {
|
|
28459
|
+
var blockNodes = this.removeParent([blockquoteNode]);
|
|
28460
|
+
this.unWrap(docElement, blockNodes, nodeCutter, nodeSelection);
|
|
28461
|
+
}
|
|
28457
28462
|
if (parentNodes[index1].nodeName.toLocaleLowerCase() !== 'p') {
|
|
28458
28463
|
if (this.NONVALID_PARENT_TAGS.indexOf(parentNodes[index1].nodeName.toLowerCase()) < 0
|
|
28459
|
-
&& parentNodes[index1].parentNode.nodeName.toLocaleLowerCase() !== 'p'
|
|
28460
28464
|
&& !((parentNodes[index1].nodeName.toLocaleLowerCase() === 'blockquote'
|
|
28461
28465
|
|| parentNodes[index1].nodeName.toLocaleLowerCase() === 'li')
|
|
28462
28466
|
&& this.IGNORE_PARENT_TAGS.indexOf(parentNodes[index1].childNodes[0].nodeName.toLocaleLowerCase()) > -1)
|
|
@@ -28480,13 +28484,16 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
28480
28484
|
this.unWrap(docElement, blockNodes, nodeCutter, nodeSelection);
|
|
28481
28485
|
}
|
|
28482
28486
|
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
28483
|
-
childNodes[index2].
|
|
28484
|
-
|
|
28487
|
+
childNodes[index2].nodeName.toLocaleLowerCase() === 'p') {
|
|
28488
|
+
if (childNodes[index2].parentNode.nodeName.toLocaleLowerCase() === 'p') {
|
|
28489
|
+
InsertMethods.unwrap(childNodes[index2].parentNode);
|
|
28490
|
+
}
|
|
28491
|
+
InsertMethods.Wrap(childNodes[index2], docElement.createElement(this.defaultTag));
|
|
28485
28492
|
InsertMethods.unwrap(childNodes[index2]);
|
|
28486
28493
|
}
|
|
28487
28494
|
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
28488
|
-
childNodes[index2].nodeName.toLocaleLowerCase() ===
|
|
28489
|
-
|
|
28495
|
+
childNodes[index2].parentNode.nodeName.toLocaleLowerCase() ===
|
|
28496
|
+
childNodes[index2].nodeName.toLocaleLowerCase()) {
|
|
28490
28497
|
InsertMethods.unwrap(childNodes[index2]);
|
|
28491
28498
|
}
|
|
28492
28499
|
}
|
|
@@ -29863,6 +29870,14 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
29863
29870
|
for (var i = 0; i < listIgnoreTag.length; i++) {
|
|
29864
29871
|
listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g, ''));
|
|
29865
29872
|
}
|
|
29873
|
+
var listOrderCleanup = firstChild.querySelector('span[style*="mso-list"]');
|
|
29874
|
+
if (listOrderCleanup) {
|
|
29875
|
+
var style = listOrderCleanup.getAttribute('style');
|
|
29876
|
+
if (style) {
|
|
29877
|
+
style = style.replace(/\s*:\s*/g, ':');
|
|
29878
|
+
listOrderCleanup.setAttribute('style', style);
|
|
29879
|
+
}
|
|
29880
|
+
}
|
|
29866
29881
|
var listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
|
|
29867
29882
|
if (!isNullOrUndefined(listOrder)) {
|
|
29868
29883
|
this.listContents.push(listOrder.textContent.trim());
|
|
@@ -37646,8 +37661,12 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
37646
37661
|
RichTextEditor.prototype.keyDown = function (e) {
|
|
37647
37662
|
if (this.inputElement.classList.contains('e-mention')) {
|
|
37648
37663
|
var mentionPopup = this.inputElement.ownerDocument.getElementById(this.inputElement.id + '_popup');
|
|
37664
|
+
var slashMenuPopup = this.inputElement.ownerDocument.getElementById(this.inputElement.id + '_slash_menu_popup');
|
|
37649
37665
|
var mentionKeys = mentionRestrictKeys;
|
|
37650
|
-
|
|
37666
|
+
var isMentionKeys = mentionKeys.indexOf(e.key) !== -1;
|
|
37667
|
+
var isMentionPopupOpen = mentionPopup && mentionPopup.classList.contains('e-popup-open');
|
|
37668
|
+
var isSlashMenuPopupOpen = slashMenuPopup && slashMenuPopup.classList.contains('e-popup-open');
|
|
37669
|
+
if (isMentionKeys && (isMentionPopupOpen || isSlashMenuPopupOpen)) {
|
|
37651
37670
|
return;
|
|
37652
37671
|
}
|
|
37653
37672
|
}
|