@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 26.2.
|
|
3
|
+
* version : 26.2.7
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@26.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@26.2.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-FH3/ajh5xDss4l/7hmKai/Zf8+vn0cuPbN//GiPILPfKwkCX7b4iUQDycSF3gFGiATUID48cMuWp4EfO629Ibg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
26
26
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
27
27
|
],
|
|
28
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.2.
|
|
29
|
-
"_shasum": "
|
|
28
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-26.2.5.tgz",
|
|
29
|
+
"_shasum": "f7cbd3a9c28d9420011a5af406c2a397639de4aa",
|
|
30
30
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
31
31
|
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
|
|
32
32
|
"author": {
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"bundleDependencies": false,
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@syncfusion/ej2-base": "~26.2.5",
|
|
41
|
-
"@syncfusion/ej2-buttons": "~26.2.
|
|
42
|
-
"@syncfusion/ej2-filemanager": "~26.2.
|
|
41
|
+
"@syncfusion/ej2-buttons": "~26.2.7",
|
|
42
|
+
"@syncfusion/ej2-filemanager": "~26.2.7",
|
|
43
43
|
"@syncfusion/ej2-inputs": "~26.2.5",
|
|
44
|
-
"@syncfusion/ej2-navigations": "~26.2.
|
|
44
|
+
"@syncfusion/ej2-navigations": "~26.2.7",
|
|
45
45
|
"@syncfusion/ej2-popups": "~26.2.5",
|
|
46
46
|
"@syncfusion/ej2-splitbuttons": "~26.2.5"
|
|
47
47
|
},
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
80
80
|
},
|
|
81
81
|
"typings": "index.d.ts",
|
|
82
|
-
"version": "26.2.
|
|
82
|
+
"version": "26.2.7",
|
|
83
83
|
"sideEffects": false
|
|
84
84
|
}
|
|
@@ -317,12 +317,12 @@ var Lists = /** @class */ (function () {
|
|
|
317
317
|
var commonAncestor = range.commonAncestorContainer;
|
|
318
318
|
var startEle = range.startContainer;
|
|
319
319
|
var endEle = range.endContainer;
|
|
320
|
-
var startNode = startEle.nodeType === 3 ? startEle
|
|
321
|
-
var endNode = endEle.nodeType === 3 ? endEle
|
|
320
|
+
var startNode = startEle.nodeType === 3 ? this.domNode.blockParentNode(startEle) : startEle;
|
|
321
|
+
var endNode = endEle.nodeType === 3 ? this.domNode.blockParentNode(endEle) : endEle;
|
|
322
322
|
if ((commonAncestor.nodeName === 'UL' || commonAncestor.nodeName === 'OL') && startNode !== endNode
|
|
323
323
|
&& (!isNullOrUndefined(closest(startNode, 'ul')) || !isNullOrUndefined(closest(startNode, 'ol')))
|
|
324
324
|
&& (!isNullOrUndefined(closest(endNode, 'ul')) || !isNullOrUndefined(closest(endNode, 'ol')))
|
|
325
|
-
&& (commonAncestor.lastElementChild === closest(endNode, 'li')) && !range.collapsed) {
|
|
325
|
+
&& ((commonAncestor.lastElementChild === closest(endNode, 'li') && commonAncestor.lastChild !== endNode)) && !range.collapsed) {
|
|
326
326
|
detach(commonAncestor);
|
|
327
327
|
}
|
|
328
328
|
this.removeList(range, e);
|
|
@@ -255,7 +255,6 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
255
255
|
_this.tooltip = new Tooltip({
|
|
256
256
|
target: '#' + _this.element.id + ' [title]',
|
|
257
257
|
openDelay: 400,
|
|
258
|
-
container: _this.parent.rootContainer,
|
|
259
258
|
showTipPointer: true,
|
|
260
259
|
beforeRender: _this.tooltipBeforeRender.bind(_this),
|
|
261
260
|
windowCollision: true,
|
|
@@ -228,6 +228,13 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
228
228
|
var isRootParent = false;
|
|
229
229
|
if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey && !isEmptyNode) {
|
|
230
230
|
pointer = range.startOffset;
|
|
231
|
+
var container = range.startContainer;
|
|
232
|
+
// Check if the container is a text node and contains a zero-width space
|
|
233
|
+
if (container.nodeType === Node.TEXT_NODE && container.nodeValue.includes("\u200B")) {
|
|
234
|
+
var beforeZeroWidthSpace = container.splitText(container.nodeValue.indexOf("\u200B"));
|
|
235
|
+
beforeZeroWidthSpace.splitText(1); // The zero-width space is at the beginning of this node
|
|
236
|
+
beforeZeroWidthSpace.parentNode.removeChild(beforeZeroWidthSpace);
|
|
237
|
+
}
|
|
231
238
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
232
239
|
range.startContainer.nodeName === '#text' ? range.startContainer.parentElement !== this.parent.inputElement ? range.startContainer.parentElement.classList.add('currentStartMark')
|
|
233
240
|
: isRootParent = true : range.startContainer.classList.add('currentStartMark');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
|
|
2
|
+
import { TooltipEventArgs } from '@syncfusion/ej2-popups';
|
|
2
3
|
import { IRenderer, IRichTextEditor, IToolbarOptions, IDropDownModel, IColorPickerModel } from '../base/interface';
|
|
3
4
|
import { ColorPicker } from '@syncfusion/ej2-inputs';
|
|
4
5
|
import { ServiceLocator } from '../services/service-locator';
|
|
@@ -50,6 +51,7 @@ export declare class ToolbarRenderer implements IRenderer {
|
|
|
50
51
|
|
|
51
52
|
*/
|
|
52
53
|
renderToolbar(args: IToolbarOptions): void;
|
|
54
|
+
tooltipBeforeOpen(args: TooltipEventArgs): void;
|
|
53
55
|
/**
|
|
54
56
|
* renderDropDownButton method
|
|
55
57
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addClass, Browser, removeClass, formatUnit, isNullOrUndefined, isNullOrUndefined as isNOU, EventHandler } from '@syncfusion/ej2-base';
|
|
1
|
+
import { addClass, Browser, removeClass, formatUnit, isNullOrUndefined, isNullOrUndefined as isNOU, EventHandler, detach } from '@syncfusion/ej2-base';
|
|
2
2
|
import { getInstance, closest, selectAll } from '@syncfusion/ej2-base';
|
|
3
3
|
import { Toolbar } from '@syncfusion/ej2-navigations';
|
|
4
4
|
import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
|
|
@@ -153,7 +153,6 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
153
153
|
if (this.parent.showTooltip && args.type === 'toolbar') {
|
|
154
154
|
this.tooltip = new Tooltip({
|
|
155
155
|
target: '#' + this.parent.getID() + '_toolbar_wrapper [title]',
|
|
156
|
-
container: this.toolbarPanel,
|
|
157
156
|
showTipPointer: true,
|
|
158
157
|
openDelay: 400,
|
|
159
158
|
opensOn: 'Hover',
|
|
@@ -165,6 +164,11 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
165
164
|
this.tooltip.appendTo(args.target.parentElement);
|
|
166
165
|
}
|
|
167
166
|
};
|
|
167
|
+
ToolbarRenderer.prototype.tooltipBeforeOpen = function (args) {
|
|
168
|
+
if (args.element) {
|
|
169
|
+
args.element.setAttribute('data-rte-id', this.parent.getID());
|
|
170
|
+
}
|
|
171
|
+
};
|
|
168
172
|
/**
|
|
169
173
|
* renderDropDownButton method
|
|
170
174
|
*
|
|
@@ -710,6 +714,13 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
710
714
|
}
|
|
711
715
|
if (this.tooltip && !this.tooltip.isDestroyed) {
|
|
712
716
|
this.tooltip.destroy();
|
|
717
|
+
var tooltipElements = document.querySelectorAll('[data-rte-id="' + this.parent.getID() + '"]');
|
|
718
|
+
for (var i = 0; i < tooltipElements.length; i++) {
|
|
719
|
+
var tooltipEle = tooltipElements[i];
|
|
720
|
+
if (this.parent.getID() === tooltipEle.getAttribute('data-rte-id')) {
|
|
721
|
+
detach(tooltipEle);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
713
724
|
}
|
|
714
725
|
this.unWireEvent();
|
|
715
726
|
this.mode = null;
|