@syncfusion/ej2-richtexteditor 28.1.36 → 28.1.37
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 -1
- package/dist/ej2-richtexteditor.umd.min.js +10 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +42 -31
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +42 -31
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +10 -1
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +8 -8
- package/src/rich-text-editor/actions/enter-key.js +3 -2
- package/src/rich-text-editor/actions/html-editor.js +2 -2
- package/src/rich-text-editor/formatter/formatter.js +1 -1
- package/src/rich-text-editor/renderer/table-module.js +29 -23
- package/src/rich-text-editor/renderer/toolbar-renderer.js +7 -3
- package/styles/bootstrap5.3-lite.css +5 -0
- package/styles/bootstrap5.3.css +5 -0
- package/styles/rich-text-editor/_layout.scss +1 -1
- package/styles/rich-text-editor/_theme.scss +1 -1
- package/styles/rich-text-editor/bootstrap5.3.css +5 -0
- package/styles/rich-text-editor/tailwind3.css +5 -0
- package/styles/tailwind3-lite.css +5 -0
- package/styles/tailwind3.css +5 -0
|
@@ -6179,17 +6179,21 @@ class ToolbarRenderer {
|
|
|
6179
6179
|
value: colorpickerValue
|
|
6180
6180
|
};
|
|
6181
6181
|
proxy.parent.notify(selectionRestore, {});
|
|
6182
|
-
proxy.currentElement
|
|
6182
|
+
if (proxy.currentElement) {
|
|
6183
|
+
proxy.currentElement.querySelector('.' + CLS_RTE_ELEMENTS).style.borderBottomColor = colorpickerValue;
|
|
6184
|
+
}
|
|
6183
6185
|
const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.parent.contentModule.getDocument());
|
|
6184
6186
|
const closestElement = closest(range.startContainer.parentNode, 'table');
|
|
6185
6187
|
if ((range.startContainer.nodeName === 'TD' || range.startContainer.nodeName === 'TH' || range.startContainer.nodeName === 'BODY' ||
|
|
6186
|
-
closest(range.startContainer.parentNode, 'td,th')) && range.collapsed && args.subCommand === 'BackgroundColor' && (closest(closestElement, '.' + CLS_RTE) || proxy.parent.iframeSettings.enable)) {
|
|
6188
|
+
(range.startContainer.parentNode && closest(range.startContainer.parentNode, 'td,th'))) && range.collapsed && args.subCommand === 'BackgroundColor' && (closestElement && closest(closestElement, '.' + CLS_RTE) || proxy.parent.iframeSettings.enable)) {
|
|
6187
6189
|
proxy.parent.notify(tableColorPickerChanged, colorPickerArgs);
|
|
6188
6190
|
}
|
|
6189
6191
|
else {
|
|
6190
6192
|
proxy.parent.notify(colorPickerChanged, colorPickerArgs);
|
|
6191
6193
|
}
|
|
6192
|
-
proxy.currentDropdown
|
|
6194
|
+
if (proxy.currentDropdown) {
|
|
6195
|
+
proxy.currentDropdown.toggle();
|
|
6196
|
+
}
|
|
6193
6197
|
},
|
|
6194
6198
|
beforeModeSwitch: (args) => {
|
|
6195
6199
|
value = colorPicker.value;
|
|
@@ -14477,34 +14481,40 @@ class Table {
|
|
|
14477
14481
|
// eslint-disable-next-line
|
|
14478
14482
|
applyProperties(args, e) {
|
|
14479
14483
|
const dialogEle = this.editdlgObj.element;
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
if (
|
|
14488
|
-
|
|
14489
|
-
|
|
14484
|
+
if (dialogEle && args && args.selectNode.length > 0 && args.selectNode[0]) {
|
|
14485
|
+
const selectedElement = (args.selectNode[0] && args.selectNode[0].nodeType === 3 ?
|
|
14486
|
+
args.selectNode[0].parentNode : args.selectNode[0]);
|
|
14487
|
+
const table = selectedElement ? closest(selectedElement, 'table') : null;
|
|
14488
|
+
if (table) {
|
|
14489
|
+
table.style.width = dialogEle.querySelector('.e-table-width') ? dialogEle.querySelector('.e-table-width').value + 'px'
|
|
14490
|
+
: table.style.width;
|
|
14491
|
+
if (dialogEle.querySelector('.e-cell-padding') && dialogEle.querySelector('.e-cell-padding').value !== '') {
|
|
14492
|
+
const tdElm = table.querySelectorAll('td');
|
|
14493
|
+
for (let i = 0; i < tdElm.length; i++) {
|
|
14494
|
+
let padVal = '';
|
|
14495
|
+
if (tdElm[i].style.padding === '') {
|
|
14496
|
+
padVal = tdElm[i].getAttribute('style') + ' padding:' +
|
|
14497
|
+
dialogEle.querySelector('.e-cell-padding').value + 'px;';
|
|
14498
|
+
}
|
|
14499
|
+
else {
|
|
14500
|
+
tdElm[i].style.padding = dialogEle.querySelector('.e-cell-padding').value + 'px';
|
|
14501
|
+
padVal = tdElm[i].getAttribute('style');
|
|
14502
|
+
}
|
|
14503
|
+
tdElm[i].setAttribute('style', padVal);
|
|
14504
|
+
}
|
|
14505
|
+
}
|
|
14506
|
+
table.cellSpacing = dialogEle.querySelector('.e-cell-spacing') ? dialogEle.querySelector('.e-cell-spacing').value
|
|
14507
|
+
: table.cellSpacing;
|
|
14508
|
+
if (!isNullOrUndefined(table.cellSpacing) && table.cellSpacing !== '0') {
|
|
14509
|
+
addClass([table], CLS_TABLE_BORDER);
|
|
14490
14510
|
}
|
|
14491
14511
|
else {
|
|
14492
|
-
|
|
14493
|
-
padVal = tdElm[i].getAttribute('style');
|
|
14512
|
+
removeClassWithAttr([table], CLS_TABLE_BORDER);
|
|
14494
14513
|
}
|
|
14495
|
-
|
|
14514
|
+
this.parent.formatter.saveData();
|
|
14515
|
+
this.editdlgObj.hide({ returnValue: true });
|
|
14496
14516
|
}
|
|
14497
14517
|
}
|
|
14498
|
-
table.cellSpacing = dialogEle.querySelector('.e-cell-spacing') ? dialogEle.querySelector('.e-cell-spacing').value
|
|
14499
|
-
: table.cellSpacing;
|
|
14500
|
-
if (!isNullOrUndefined(table.cellSpacing) && table.cellSpacing !== '0') {
|
|
14501
|
-
addClass([table], CLS_TABLE_BORDER);
|
|
14502
|
-
}
|
|
14503
|
-
else {
|
|
14504
|
-
removeClassWithAttr([table], CLS_TABLE_BORDER);
|
|
14505
|
-
}
|
|
14506
|
-
this.parent.formatter.saveData();
|
|
14507
|
-
this.editdlgObj.hide({ returnValue: true });
|
|
14508
14518
|
}
|
|
14509
14519
|
tableDlgContent(e) {
|
|
14510
14520
|
const selectNode = e.selectParent[0];
|
|
@@ -19400,7 +19410,7 @@ class Formatter {
|
|
|
19400
19410
|
}
|
|
19401
19411
|
}
|
|
19402
19412
|
const command = actionBeginArgs.item.subCommand.toLocaleLowerCase();
|
|
19403
|
-
if (command === 'image') {
|
|
19413
|
+
if (command === 'image' || command === 'file' || command === 'replace') {
|
|
19404
19414
|
value = actionBeginArgs.itemCollection;
|
|
19405
19415
|
}
|
|
19406
19416
|
if (command === 'paste' || command === 'cut' || command === 'copy') {
|
|
@@ -32696,7 +32706,7 @@ class HtmlEditor {
|
|
|
32696
32706
|
onSelectionRestore(e) {
|
|
32697
32707
|
this.parent.isBlur = false;
|
|
32698
32708
|
this.contentRenderer.getEditPanel().focus({ preventScroll: true });
|
|
32699
|
-
if (isNullOrUndefined(e.items) || e.items) {
|
|
32709
|
+
if ((isNullOrUndefined(e.items) || e.items) && (!isNullOrUndefined(this.saveSelection))) {
|
|
32700
32710
|
this.saveSelection.restore();
|
|
32701
32711
|
}
|
|
32702
32712
|
}
|
|
@@ -33154,7 +33164,7 @@ class HtmlEditor {
|
|
|
33154
33164
|
let checkParent = false;
|
|
33155
33165
|
if (this.oldRangeElement && this.oldRangeElement.nodeName !== '#text' && this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
33156
33166
|
const brElement = this.oldRangeElement.querySelector('BR');
|
|
33157
|
-
if (brElement) {
|
|
33167
|
+
if (brElement && isNullOrUndefined(brElement.nextSibling)) {
|
|
33158
33168
|
const brParentElement = brElement.parentNode;
|
|
33159
33169
|
const currentState = this.oldRangeElement.innerHTML;
|
|
33160
33170
|
this.parent.formatter.saveData(currentState);
|
|
@@ -37754,7 +37764,8 @@ class EnterKeyAction {
|
|
|
37754
37764
|
&& isSplitTextEmpty && !isPreWrapApplied && !isTextWrapApplied;
|
|
37755
37765
|
const isCursorAtStartPreWrapWithContent = lastCharBeforeCursor === 32
|
|
37756
37766
|
&& (isPreWrapApplied || isTextWrapApplied) && isSplitTextEmpty && hasContentAfterCursor;
|
|
37757
|
-
if (isCursorAtStartNonPreWrap || isCursorAtStartPreWrapWithContent)
|
|
37767
|
+
if ((isCursorAtStartNonPreWrap || isCursorAtStartPreWrapWithContent) &&
|
|
37768
|
+
!this.range.startContainer.previousSibling) {
|
|
37758
37769
|
isFocusedFirst = true;
|
|
37759
37770
|
}
|
|
37760
37771
|
}
|
|
@@ -37763,7 +37774,7 @@ class EnterKeyAction {
|
|
|
37763
37774
|
}
|
|
37764
37775
|
this.removeBRElement(nearBlockNode);
|
|
37765
37776
|
const fireFoxEnterAtMiddle = Browser.userAgent.indexOf('Firefox') !== -1 && this.range.startOffset === 0 && this.range.startContainer === this.range.endContainer &&
|
|
37766
|
-
this.range.startContainer.nodeName === '#text' && !this.parent.formatter.editorManager.domNode.isBlockNode(this.range.startContainer.previousSibling) &&
|
|
37777
|
+
this.range.startContainer.nodeName === '#text' && !isNullOrUndefined(this.range.startContainer.previousSibling) && !this.parent.formatter.editorManager.domNode.isBlockNode(this.range.startContainer.previousSibling) &&
|
|
37767
37778
|
this.range.startContainer.parentElement === this.range.startContainer.previousSibling.parentElement;
|
|
37768
37779
|
const preventZeroWithSpace = ((this.range.startContainer.nodeName === '#text' && this.range.startContainer.textContent.includes('\u200B') &&
|
|
37769
37780
|
this.range.startContainer.textContent.trim() === '\u200B') ||
|