@syncfusion/ej2-richtexteditor 20.4.38 → 20.4.42
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- 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 +24 -9
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +23 -8
- 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 -13
- package/src/editor-manager/plugin/toolbar-status.js +3 -2
- package/src/rich-text-editor/actions/full-screen.js +1 -0
- package/src/rich-text-editor/actions/html-editor.js +16 -6
- package/src/rich-text-editor/actions/toolbar.js +4 -1
|
@@ -4738,7 +4738,10 @@ class Toolbar$2 {
|
|
|
4738
4738
|
* @deprecated
|
|
4739
4739
|
*/
|
|
4740
4740
|
updateItem(args) {
|
|
4741
|
-
|
|
4741
|
+
let item = this.tools[args.updateItem.toLocaleLowerCase()];
|
|
4742
|
+
if (this.parent.locale !== 'en-US') {
|
|
4743
|
+
item.tooltip = getTooltipText(args.updateItem.toLocaleLowerCase(), this.locator);
|
|
4744
|
+
}
|
|
4742
4745
|
const trgItem = this.tools[args.targetItem.toLocaleLowerCase()];
|
|
4743
4746
|
const index = getTBarItemsIndex(getCollection(trgItem.subCommand), args.baseToolbar.toolbarObj.items)[0];
|
|
4744
4747
|
if (!isNullOrUndefined(index)) {
|
|
@@ -17606,10 +17609,11 @@ class ToolbarStatus {
|
|
|
17606
17609
|
let formatCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
17607
17610
|
const nodeCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
17608
17611
|
const nodeSelection = new NodeSelection();
|
|
17609
|
-
const
|
|
17612
|
+
const range = nodeSelection.getRange(docElement);
|
|
17613
|
+
const nodes = documentNode ? [documentNode] : range.collapsed ? nodeSelection.getNodeCollection(range) :
|
|
17614
|
+
nodeSelection.getSelectionNodeCollectionBr(range);
|
|
17610
17615
|
const nodesLength = nodes.length;
|
|
17611
17616
|
let isNodeChanged = false;
|
|
17612
|
-
const range = nodeSelection.getRange(docElement);
|
|
17613
17617
|
for (let index = 0; index < nodes.length; index++) {
|
|
17614
17618
|
while (nodes[index].nodeType === 3 && range.startContainer.nodeType === 3 && nodes[index].parentNode &&
|
|
17615
17619
|
nodes[index].parentNode.lastElementChild && nodes[index].parentNode.lastElementChild.nodeName !== 'BR' &&
|
|
@@ -18507,22 +18511,32 @@ class HtmlEditor {
|
|
|
18507
18511
|
}
|
|
18508
18512
|
const previousLength = this.parent.inputElement.innerHTML.length;
|
|
18509
18513
|
const currentLength = this.parent.inputElement.innerHTML.replace(regEx, '').length;
|
|
18514
|
+
let focusNode = range.startContainer;
|
|
18510
18515
|
if (previousLength > currentLength) {
|
|
18511
18516
|
let currentChild = this.parent.inputElement.firstChild;
|
|
18512
18517
|
while (!isNullOrUndefined(currentChild) && currentChild.textContent.replace(regEx, '').trim().length > 0) {
|
|
18513
18518
|
currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
|
|
18514
18519
|
currentChild = currentChild.nextElementSibling;
|
|
18515
18520
|
}
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
for (let i = 0; i <
|
|
18519
|
-
if (
|
|
18520
|
-
detach(
|
|
18521
|
+
const currentChildNode = this.parent.inputElement.querySelector('.currentStartMark').childNodes;
|
|
18522
|
+
if (currentChildNode.length > 1) {
|
|
18523
|
+
for (let i = 0; i < currentChildNode.length; i++) {
|
|
18524
|
+
if (currentChildNode[i].nodeName === '#text' && currentChildNode[i].textContent.length === 0) {
|
|
18525
|
+
detach(currentChildNode[i]);
|
|
18521
18526
|
i--;
|
|
18522
18527
|
}
|
|
18528
|
+
if (focusNode.textContent.replace(regEx, '') === currentChildNode[i].textContent) {
|
|
18529
|
+
pointer = focusNode.textContent.length > 1 ? focusNode.textContent.length - 1 : focusNode.textContent.length;
|
|
18530
|
+
focusNode = currentChildNode[i];
|
|
18531
|
+
}
|
|
18523
18532
|
}
|
|
18524
18533
|
}
|
|
18525
|
-
|
|
18534
|
+
else if (currentChildNode.length === 1) {
|
|
18535
|
+
if (focusNode.textContent.replace(regEx, '') === currentChildNode[0].textContent) {
|
|
18536
|
+
focusNode = currentChildNode[0];
|
|
18537
|
+
}
|
|
18538
|
+
}
|
|
18539
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), focusNode, pointer);
|
|
18526
18540
|
}
|
|
18527
18541
|
const currentElem = this.parent.inputElement.querySelector('.currentStartMark');
|
|
18528
18542
|
if (!isNullOrUndefined(currentElem)) {
|
|
@@ -20569,6 +20583,7 @@ class FullScreen {
|
|
|
20569
20583
|
this.parent.toolbarModule.addFixedTBarClass();
|
|
20570
20584
|
}
|
|
20571
20585
|
}
|
|
20586
|
+
this.parent.refreshUI();
|
|
20572
20587
|
this.parent.trigger(actionComplete, { requestType: 'Minimize', targetItem: 'Minimize', args: event });
|
|
20573
20588
|
}
|
|
20574
20589
|
});
|