@syncfusion/ej2-richtexteditor 26.2.5 → 26.2.7
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 +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 +22 -5
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +22 -5
- 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 +8 -8
- package/src/editor-manager/plugin/lists.js +3 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +0 -1
- package/src/rich-text-editor/actions/html-editor.js +7 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +13 -2
|
@@ -5428,7 +5428,6 @@ class ToolbarRenderer {
|
|
|
5428
5428
|
if (this.parent.showTooltip && args.type === 'toolbar') {
|
|
5429
5429
|
this.tooltip = new Tooltip({
|
|
5430
5430
|
target: '#' + this.parent.getID() + '_toolbar_wrapper [title]',
|
|
5431
|
-
container: this.toolbarPanel,
|
|
5432
5431
|
showTipPointer: true,
|
|
5433
5432
|
openDelay: 400,
|
|
5434
5433
|
opensOn: 'Hover',
|
|
@@ -5440,6 +5439,11 @@ class ToolbarRenderer {
|
|
|
5440
5439
|
this.tooltip.appendTo(args.target.parentElement);
|
|
5441
5440
|
}
|
|
5442
5441
|
}
|
|
5442
|
+
tooltipBeforeOpen(args) {
|
|
5443
|
+
if (args.element) {
|
|
5444
|
+
args.element.setAttribute('data-rte-id', this.parent.getID());
|
|
5445
|
+
}
|
|
5446
|
+
}
|
|
5443
5447
|
/**
|
|
5444
5448
|
* renderDropDownButton method
|
|
5445
5449
|
*
|
|
@@ -5981,6 +5985,13 @@ class ToolbarRenderer {
|
|
|
5981
5985
|
}
|
|
5982
5986
|
if (this.tooltip && !this.tooltip.isDestroyed) {
|
|
5983
5987
|
this.tooltip.destroy();
|
|
5988
|
+
const tooltipElements = document.querySelectorAll('[data-rte-id="' + this.parent.getID() + '"]');
|
|
5989
|
+
for (let i = 0; i < tooltipElements.length; i++) {
|
|
5990
|
+
const tooltipEle = tooltipElements[i];
|
|
5991
|
+
if (this.parent.getID() === tooltipEle.getAttribute('data-rte-id')) {
|
|
5992
|
+
detach(tooltipEle);
|
|
5993
|
+
}
|
|
5994
|
+
}
|
|
5984
5995
|
}
|
|
5985
5996
|
this.unWireEvent();
|
|
5986
5997
|
this.mode = null;
|
|
@@ -16647,7 +16658,6 @@ class BaseQuickToolbar {
|
|
|
16647
16658
|
this.tooltip = new Tooltip({
|
|
16648
16659
|
target: '#' + this.element.id + ' [title]',
|
|
16649
16660
|
openDelay: 400,
|
|
16650
|
-
container: this.parent.rootContainer,
|
|
16651
16661
|
showTipPointer: true,
|
|
16652
16662
|
beforeRender: this.tooltipBeforeRender.bind(this),
|
|
16653
16663
|
windowCollision: true,
|
|
@@ -21930,12 +21940,12 @@ class Lists {
|
|
|
21930
21940
|
const commonAncestor = range.commonAncestorContainer;
|
|
21931
21941
|
const startEle = range.startContainer;
|
|
21932
21942
|
const endEle = range.endContainer;
|
|
21933
|
-
const startNode = startEle.nodeType === 3 ? startEle
|
|
21934
|
-
const endNode = endEle.nodeType === 3 ? endEle
|
|
21943
|
+
const startNode = startEle.nodeType === 3 ? this.domNode.blockParentNode(startEle) : startEle;
|
|
21944
|
+
const endNode = endEle.nodeType === 3 ? this.domNode.blockParentNode(endEle) : endEle;
|
|
21935
21945
|
if ((commonAncestor.nodeName === 'UL' || commonAncestor.nodeName === 'OL') && startNode !== endNode
|
|
21936
21946
|
&& (!isNullOrUndefined(closest(startNode, 'ul')) || !isNullOrUndefined(closest(startNode, 'ol')))
|
|
21937
21947
|
&& (!isNullOrUndefined(closest(endNode, 'ul')) || !isNullOrUndefined(closest(endNode, 'ol')))
|
|
21938
|
-
&& (commonAncestor.lastElementChild === closest(endNode, 'li')) && !range.collapsed) {
|
|
21948
|
+
&& ((commonAncestor.lastElementChild === closest(endNode, 'li') && commonAncestor.lastChild !== endNode)) && !range.collapsed) {
|
|
21939
21949
|
detach(commonAncestor);
|
|
21940
21950
|
}
|
|
21941
21951
|
this.removeList(range, e);
|
|
@@ -30795,6 +30805,13 @@ class HtmlEditor {
|
|
|
30795
30805
|
let isRootParent = false;
|
|
30796
30806
|
if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey && !isEmptyNode) {
|
|
30797
30807
|
pointer = range.startOffset;
|
|
30808
|
+
const container = range.startContainer;
|
|
30809
|
+
// Check if the container is a text node and contains a zero-width space
|
|
30810
|
+
if (container.nodeType === Node.TEXT_NODE && container.nodeValue.includes("\u200B")) {
|
|
30811
|
+
const beforeZeroWidthSpace = container.splitText(container.nodeValue.indexOf("\u200B"));
|
|
30812
|
+
beforeZeroWidthSpace.splitText(1); // The zero-width space is at the beginning of this node
|
|
30813
|
+
beforeZeroWidthSpace.parentNode.removeChild(beforeZeroWidthSpace);
|
|
30814
|
+
}
|
|
30798
30815
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
30799
30816
|
range.startContainer.nodeName === '#text' ? range.startContainer.parentElement !== this.parent.inputElement ? range.startContainer.parentElement.classList.add('currentStartMark')
|
|
30800
30817
|
: isRootParent = true : range.startContainer.classList.add('currentStartMark');
|