@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
|
@@ -2991,7 +2991,7 @@ let toolsLocale = {
|
|
|
2991
2991
|
'remove': 'remove',
|
|
2992
2992
|
'insertlink': 'insertLink',
|
|
2993
2993
|
'display': 'display',
|
|
2994
|
-
'alttext': '
|
|
2994
|
+
'alttext': 'imageAlternateText',
|
|
2995
2995
|
'dimension': 'dimension',
|
|
2996
2996
|
'fullscreen': 'fullscreen',
|
|
2997
2997
|
'maximize': 'maximize',
|
|
@@ -18641,7 +18641,7 @@ class Formatter {
|
|
|
18641
18641
|
}
|
|
18642
18642
|
self.isBlur = false;
|
|
18643
18643
|
const 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')));
|
|
18644
|
-
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')))) {
|
|
18644
|
+
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)) {
|
|
18645
18645
|
self.contentModule.getEditPanel().focus();
|
|
18646
18646
|
}
|
|
18647
18647
|
if (self.editorMode === 'HTML' && !isKeyboardVideoInsert) {
|
|
@@ -24351,7 +24351,7 @@ class InsertHtml {
|
|
|
24351
24351
|
if (blockNode.nodeName === 'BODY' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
24352
24352
|
blockNode = range.startContainer;
|
|
24353
24353
|
}
|
|
24354
|
-
if (blockNode.closest('LI') && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
24354
|
+
if (blockNode.closest('LI') && editNode.contains(blockNode.closest('LI')) && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
24355
24355
|
((node).firstElementChild.tagName === 'OL' || node.firstElementChild.tagName === 'UL')) {
|
|
24356
24356
|
let liNode;
|
|
24357
24357
|
while (node.firstElementChild.lastElementChild && node.firstElementChild.lastElementChild.tagName === 'LI') {
|
|
@@ -28352,9 +28352,13 @@ class ClearFormat$1 {
|
|
|
28352
28352
|
nodeSelection.setSelectionText(docElement, parentNodes[index1], parentNodes[index1], 0, parentNodes[index1].childNodes.length);
|
|
28353
28353
|
InsertMethods.unwrap(nodeCutter.GetSpliceNode(nodeSelection.getRange(docElement), parentNodes[index1].parentNode));
|
|
28354
28354
|
}
|
|
28355
|
+
const blockquoteNode = closest(parentNodes[index1], 'blockquote');
|
|
28356
|
+
if (parentNodes[index1].nodeName.toLocaleLowerCase() !== 'blockquote' && !isNullOrUndefined(blockquoteNode) && blockquoteNode.textContent === parentNodes[index1].textContent) {
|
|
28357
|
+
const blockNodes = this.removeParent([blockquoteNode]);
|
|
28358
|
+
this.unWrap(docElement, blockNodes, nodeCutter, nodeSelection);
|
|
28359
|
+
}
|
|
28355
28360
|
if (parentNodes[index1].nodeName.toLocaleLowerCase() !== 'p') {
|
|
28356
28361
|
if (this.NONVALID_PARENT_TAGS.indexOf(parentNodes[index1].nodeName.toLowerCase()) < 0
|
|
28357
|
-
&& parentNodes[index1].parentNode.nodeName.toLocaleLowerCase() !== 'p'
|
|
28358
28362
|
&& !((parentNodes[index1].nodeName.toLocaleLowerCase() === 'blockquote'
|
|
28359
28363
|
|| parentNodes[index1].nodeName.toLocaleLowerCase() === 'li')
|
|
28360
28364
|
&& this.IGNORE_PARENT_TAGS.indexOf(parentNodes[index1].childNodes[0].nodeName.toLocaleLowerCase()) > -1)
|
|
@@ -28378,13 +28382,16 @@ class ClearFormat$1 {
|
|
|
28378
28382
|
this.unWrap(docElement, blockNodes, nodeCutter, nodeSelection);
|
|
28379
28383
|
}
|
|
28380
28384
|
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
28381
|
-
childNodes[index2].
|
|
28382
|
-
|
|
28385
|
+
childNodes[index2].nodeName.toLocaleLowerCase() === 'p') {
|
|
28386
|
+
if (childNodes[index2].parentNode.nodeName.toLocaleLowerCase() === 'p') {
|
|
28387
|
+
InsertMethods.unwrap(childNodes[index2].parentNode);
|
|
28388
|
+
}
|
|
28389
|
+
InsertMethods.Wrap(childNodes[index2], docElement.createElement(this.defaultTag));
|
|
28383
28390
|
InsertMethods.unwrap(childNodes[index2]);
|
|
28384
28391
|
}
|
|
28385
28392
|
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
28386
|
-
childNodes[index2].nodeName.toLocaleLowerCase() ===
|
|
28387
|
-
|
|
28393
|
+
childNodes[index2].parentNode.nodeName.toLocaleLowerCase() ===
|
|
28394
|
+
childNodes[index2].nodeName.toLocaleLowerCase()) {
|
|
28388
28395
|
InsertMethods.unwrap(childNodes[index2]);
|
|
28389
28396
|
}
|
|
28390
28397
|
}
|
|
@@ -29757,6 +29764,14 @@ class MsWordPaste {
|
|
|
29757
29764
|
for (let i = 0; i < listIgnoreTag.length; i++) {
|
|
29758
29765
|
listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g, ''));
|
|
29759
29766
|
}
|
|
29767
|
+
const listOrderCleanup = firstChild.querySelector('span[style*="mso-list"]');
|
|
29768
|
+
if (listOrderCleanup) {
|
|
29769
|
+
let style = listOrderCleanup.getAttribute('style');
|
|
29770
|
+
if (style) {
|
|
29771
|
+
style = style.replace(/\s*:\s*/g, ':');
|
|
29772
|
+
listOrderCleanup.setAttribute('style', style);
|
|
29773
|
+
}
|
|
29774
|
+
}
|
|
29760
29775
|
const listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
|
|
29761
29776
|
if (!isNullOrUndefined(listOrder)) {
|
|
29762
29777
|
this.listContents.push(listOrder.textContent.trim());
|
|
@@ -37293,8 +37308,12 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
37293
37308
|
keyDown(e) {
|
|
37294
37309
|
if (this.inputElement.classList.contains('e-mention')) {
|
|
37295
37310
|
const mentionPopup = this.inputElement.ownerDocument.getElementById(this.inputElement.id + '_popup');
|
|
37311
|
+
const slashMenuPopup = this.inputElement.ownerDocument.getElementById(this.inputElement.id + '_slash_menu_popup');
|
|
37296
37312
|
const mentionKeys = mentionRestrictKeys;
|
|
37297
|
-
|
|
37313
|
+
const isMentionKeys = mentionKeys.indexOf(e.key) !== -1;
|
|
37314
|
+
const isMentionPopupOpen = mentionPopup && mentionPopup.classList.contains('e-popup-open');
|
|
37315
|
+
const isSlashMenuPopupOpen = slashMenuPopup && slashMenuPopup.classList.contains('e-popup-open');
|
|
37316
|
+
if (isMentionKeys && (isMentionPopupOpen || isSlashMenuPopupOpen)) {
|
|
37298
37317
|
return;
|
|
37299
37318
|
}
|
|
37300
37319
|
}
|