@syncfusion/ej2-richtexteditor 19.4.56 → 20.1.47
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 +1 -81
- 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 +89 -32
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +88 -31
- 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 +12 -12
- package/src/editor-manager/plugin/clearformat.js +3 -2
- package/src/editor-manager/plugin/inserthtml.js +7 -1
- package/src/editor-manager/plugin/lists.js +14 -6
- package/src/editor-manager/plugin/table.js +6 -5
- package/src/rich-text-editor/actions/count.js +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +1 -1
- package/src/rich-text-editor/actions/html-editor.js +1 -0
- package/src/rich-text-editor/base/classes.d.ts +5 -0
- package/src/rich-text-editor/base/classes.js +5 -0
- package/src/rich-text-editor/base/rich-text-editor.js +4 -3
- package/src/rich-text-editor/renderer/image-module.js +21 -5
- package/src/rich-text-editor/renderer/table-module.js +20 -5
- package/src/selection/selection.js +3 -0
- package/styles/bootstrap-dark.css +6 -3
- package/styles/bootstrap.css +6 -3
- package/styles/bootstrap4.css +2 -2
- package/styles/bootstrap5-dark.css +30 -6
- package/styles/bootstrap5.css +31 -7
- package/styles/fabric-dark.css +2 -2
- package/styles/fabric.css +2 -2
- package/styles/fluent-dark.css +3001 -0
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +3001 -0
- package/styles/fluent.scss +1 -0
- package/styles/highcontrast-light.css +2 -2
- package/styles/highcontrast.css +2 -2
- package/styles/material-dark.css +2 -2
- package/styles/material.css +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +19 -0
- package/styles/rich-text-editor/_bootstrap-definition.scss +19 -0
- package/styles/rich-text-editor/_bootstrap4-definition.scss +19 -0
- package/styles/rich-text-editor/_bootstrap5-definition.scss +24 -3
- package/styles/rich-text-editor/_fabric-dark-definition.scss +19 -0
- package/styles/rich-text-editor/_fabric-definition.scss +19 -0
- package/styles/rich-text-editor/_fluent-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_fluent-definition.scss +42 -19
- package/styles/rich-text-editor/_highcontrast-definition.scss +19 -0
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +19 -0
- package/styles/rich-text-editor/_layout.scss +96 -6
- package/styles/rich-text-editor/_material-dark-definition.scss +18 -1
- package/styles/rich-text-editor/_material-definition.scss +19 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +26 -6
- package/styles/rich-text-editor/_theme.scss +17 -2
- package/styles/rich-text-editor/bootstrap-dark.css +6 -3
- package/styles/rich-text-editor/bootstrap.css +6 -3
- package/styles/rich-text-editor/bootstrap4.css +2 -2
- package/styles/rich-text-editor/bootstrap5-dark.css +30 -6
- package/styles/rich-text-editor/bootstrap5.css +31 -7
- package/styles/rich-text-editor/fabric-dark.css +2 -2
- package/styles/rich-text-editor/fabric.css +2 -2
- package/styles/rich-text-editor/fluent-dark.css +3001 -0
- package/styles/rich-text-editor/fluent-dark.scss +4 -0
- package/styles/rich-text-editor/fluent.css +3001 -0
- package/styles/rich-text-editor/fluent.scss +4 -0
- package/styles/rich-text-editor/highcontrast-light.css +2 -2
- package/styles/rich-text-editor/highcontrast.css +2 -2
- package/styles/rich-text-editor/icons/_fluent-dark.scss +1 -0
- package/styles/rich-text-editor/icons/_fluent.scss +74 -74
- package/styles/rich-text-editor/icons/_tailwind.scss +73 -74
- package/styles/rich-text-editor/material-dark.css +2 -2
- package/styles/rich-text-editor/material.css +2 -2
- package/styles/rich-text-editor/tailwind-dark.css +104 -85
- package/styles/rich-text-editor/tailwind.css +105 -86
- package/styles/tailwind-dark.css +104 -85
- package/styles/tailwind.css +105 -86
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 20.1.47
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@19.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@19.7.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-qd8dxBBoB6NySpSez7cBo1QjzbpAmvbM3hS4N1NqHbVvaRjJWs8hnvOeCwDAqcS8U4KltG8Np81Ztg0Zsnn+zQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-19.7.5.tgz",
|
|
30
|
+
"_shasum": "a9cbd4740f94fbe66b3fb49af4d63dc8fed5af77",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~
|
|
42
|
-
"@syncfusion/ej2-buttons": "~
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~
|
|
44
|
-
"@syncfusion/ej2-inputs": "~
|
|
45
|
-
"@syncfusion/ej2-navigations": "~
|
|
46
|
-
"@syncfusion/ej2-popups": "~
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~
|
|
41
|
+
"@syncfusion/ej2-base": "~20.1.47",
|
|
42
|
+
"@syncfusion/ej2-buttons": "~20.1.47",
|
|
43
|
+
"@syncfusion/ej2-filemanager": "~20.1.47",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.1.47",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~20.1.47",
|
|
46
|
+
"@syncfusion/ej2-popups": "~20.1.47",
|
|
47
|
+
"@syncfusion/ej2-splitbuttons": "~20.1.47"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "Essential JS 2 RichTextEditor component",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "
|
|
73
|
+
"version": "20.1.47",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -209,7 +209,8 @@ var ClearFormat = /** @class */ (function () {
|
|
|
209
209
|
for (var index = 0; index < textNodes.length; index++) {
|
|
210
210
|
var currentInlineNode = textNodes[index];
|
|
211
211
|
var currentNode = void 0;
|
|
212
|
-
while (!this.domNode.isBlockNode(currentInlineNode)
|
|
212
|
+
while (!this.domNode.isBlockNode(currentInlineNode) &&
|
|
213
|
+
(currentInlineNode.parentElement && !currentInlineNode.parentElement.classList.contains('e-img-inner'))) {
|
|
213
214
|
currentNode = currentInlineNode;
|
|
214
215
|
currentInlineNode = currentInlineNode.parentElement;
|
|
215
216
|
}
|
|
@@ -223,7 +224,7 @@ var ClearFormat = /** @class */ (function () {
|
|
|
223
224
|
ClearFormat.removeInlineParent = function (textNodes) {
|
|
224
225
|
var nodes = InsertMethods.unwrap(textNodes);
|
|
225
226
|
for (var index = 0; index < nodes.length; index++) {
|
|
226
|
-
if (nodes[index].parentNode.childNodes.length === 1
|
|
227
|
+
if (nodes[index].parentNode.childNodes.length === 1 && !nodes[index].parentNode.classList.contains('e-img-inner')
|
|
227
228
|
&& IsFormatted.inlineTags.indexOf(nodes[index].parentNode.nodeName.toLocaleLowerCase()) > -1) {
|
|
228
229
|
this.removeInlineParent(nodes[index].parentNode);
|
|
229
230
|
}
|
|
@@ -39,6 +39,12 @@ var InsertHtml = /** @class */ (function () {
|
|
|
39
39
|
nodeSelection.setSelectionText(docElement, range.startContainer.children[0], range.startContainer.children[0], 0, 0);
|
|
40
40
|
range = nodeSelection.getRange(docElement);
|
|
41
41
|
}
|
|
42
|
+
if (range.startContainer.nodeName === 'BR' && range.startOffset === 0 && range.startOffset === range.endOffset &&
|
|
43
|
+
range.startContainer === range.endContainer) {
|
|
44
|
+
var currentIndex = Array.prototype.slice.call(range.startContainer.parentElement.children).indexOf(range.startContainer);
|
|
45
|
+
nodeSelection.setSelectionText(docElement, range.startContainer.parentElement, range.startContainer.parentElement, currentIndex + 1, currentIndex + 1);
|
|
46
|
+
range = nodeSelection.getRange(docElement);
|
|
47
|
+
}
|
|
42
48
|
var isCursor = range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
43
49
|
range.startContainer === range.endContainer;
|
|
44
50
|
var isCollapsed = range.collapsed;
|
|
@@ -222,7 +228,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
222
228
|
else {
|
|
223
229
|
var tempSpan = createElement('span', { className: 'tempSpan' });
|
|
224
230
|
var nearestAnchor = closest(range.startContainer.parentElement, 'a');
|
|
225
|
-
if (range.startContainer.nodeType === 3 && nearestAnchor) {
|
|
231
|
+
if (range.startContainer.nodeType === 3 && nearestAnchor && closest(nearestAnchor, 'span')) {
|
|
226
232
|
var immediateBlockNode = this.getImmediateBlockNode(range.startContainer, editNode);
|
|
227
233
|
if (immediateBlockNode.querySelectorAll('br').length > 0) {
|
|
228
234
|
detach(immediateBlockNode.querySelector('br'));
|
|
@@ -92,6 +92,9 @@ var Lists = /** @class */ (function () {
|
|
|
92
92
|
range.endContainer.parentElement.closest('LI');
|
|
93
93
|
if (!isNOU(startNode) && !isNOU(endNode) && startNode === endNode && startNode.tagName === 'LI' &&
|
|
94
94
|
startNode.textContent.trim() === '' && startNode.querySelectorAll('IMG').length === 0) {
|
|
95
|
+
if (startNode.innerHTML.indexOf(' ') >= 0) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
95
98
|
if (startNode.textContent.charCodeAt(0) === 65279) {
|
|
96
99
|
startNode.textContent = '';
|
|
97
100
|
}
|
|
@@ -233,7 +236,7 @@ var Lists = /** @class */ (function () {
|
|
|
233
236
|
e.event.stopPropagation();
|
|
234
237
|
this.currentAction = this.getAction(nodes[0]);
|
|
235
238
|
if (e.event.shiftKey) {
|
|
236
|
-
this.revertList(nodes);
|
|
239
|
+
this.revertList(nodes, e);
|
|
237
240
|
this.revertClean();
|
|
238
241
|
}
|
|
239
242
|
else {
|
|
@@ -395,6 +398,9 @@ var Lists = /** @class */ (function () {
|
|
|
395
398
|
append([nestedElement], prevSibling);
|
|
396
399
|
append([elements[i]], nestedElement);
|
|
397
400
|
}
|
|
401
|
+
else if (prevSibling.tagName === 'OL' || prevSibling.tagName === 'UL') {
|
|
402
|
+
append([elements[i]], prevSibling);
|
|
403
|
+
}
|
|
398
404
|
}
|
|
399
405
|
}
|
|
400
406
|
else {
|
|
@@ -489,7 +495,7 @@ var Lists = /** @class */ (function () {
|
|
|
489
495
|
listsNodes[i] = listsNodes[i].parentNode;
|
|
490
496
|
}
|
|
491
497
|
}
|
|
492
|
-
this.applyLists(listsNodes, this.currentAction, e.selector, e.item);
|
|
498
|
+
this.applyLists(listsNodes, this.currentAction, e.selector, e.item, e);
|
|
493
499
|
if (e.callBack) {
|
|
494
500
|
e.callBack({
|
|
495
501
|
requestType: this.currentAction,
|
|
@@ -510,10 +516,10 @@ var Lists = /** @class */ (function () {
|
|
|
510
516
|
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, startElem, endElem, 0, 0);
|
|
511
517
|
}
|
|
512
518
|
};
|
|
513
|
-
Lists.prototype.applyLists = function (elements, type, selector, item) {
|
|
519
|
+
Lists.prototype.applyLists = function (elements, type, selector, item, e) {
|
|
514
520
|
var isReverse = true;
|
|
515
521
|
if (this.isRevert(elements, type) && isNOU(item)) {
|
|
516
|
-
this.revertList(elements);
|
|
522
|
+
this.revertList(elements, e);
|
|
517
523
|
this.removeEmptyListElements();
|
|
518
524
|
}
|
|
519
525
|
else {
|
|
@@ -672,7 +678,7 @@ var Lists = /** @class */ (function () {
|
|
|
672
678
|
}
|
|
673
679
|
}
|
|
674
680
|
};
|
|
675
|
-
Lists.prototype.revertList = function (elements) {
|
|
681
|
+
Lists.prototype.revertList = function (elements, e) {
|
|
676
682
|
var temp = [];
|
|
677
683
|
for (var i = elements.length - 1; i >= 0; i--) {
|
|
678
684
|
for (var j = i - 1; j >= 0; j--) {
|
|
@@ -722,7 +728,9 @@ var Lists = /** @class */ (function () {
|
|
|
722
728
|
' class="' + className + ' e-rte-wrap-inner"';
|
|
723
729
|
var wrapper = '<' + CONSTANT.DEFAULT_TAG + wrapperclass +
|
|
724
730
|
this.domNode.attributes(parentNode) + '></' + CONSTANT.DEFAULT_TAG + '>';
|
|
725
|
-
|
|
731
|
+
if (e.enterAction !== 'BR') {
|
|
732
|
+
this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
|
|
733
|
+
}
|
|
726
734
|
}
|
|
727
735
|
else if (this.domNode.contents(element)[0].nodeType === 3) {
|
|
728
736
|
var replace = this.domNode.createTagString(CONSTANT.DEFAULT_TAG, parentNode, this.parent.domNode.encode(this.domNode.contents(element)[0].textContent));
|
|
@@ -182,7 +182,7 @@ var TableCommand = /** @class */ (function () {
|
|
|
182
182
|
var tdElement = createElement('td');
|
|
183
183
|
tdElement.appendChild(createElement('br'));
|
|
184
184
|
newRow.appendChild(tdElement);
|
|
185
|
-
tdElement.setAttribute('style', allCells[(isHeaderSelect && isBelow) ? (minVal + 1) : minVal][i].getAttribute('style'));
|
|
185
|
+
tdElement.setAttribute('style', allCells[(isHeaderSelect && isBelow) ? allCells[(minVal + 1)] ? (minVal + 1) : minVal : minVal][i].getAttribute('style'));
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
// eslint-disable-next-line
|
|
@@ -566,7 +566,8 @@ var TableCommand = /** @class */ (function () {
|
|
|
566
566
|
if (min < (max = Math.min(max, eleArray.length - 1))) {
|
|
567
567
|
for (rowValue = min; rowValue <= max; rowValue++) {
|
|
568
568
|
// eslint-disable-next-line
|
|
569
|
-
if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0]) &&
|
|
569
|
+
if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0]) && eleArray[rowValue][0] &&
|
|
570
|
+
1 < (index = Math.min(parseInt(eleArray[rowValue][0].getAttribute('rowspan'), 10) || 1, max - min + 1)) && eleArray[rowValue][0] === eleArray[rowValue + 1][0]) {
|
|
570
571
|
for (count = index - 1, colIndex = 1; colIndex < eleArray[0].length; colIndex++) {
|
|
571
572
|
if (eleArray[rowValue][colIndex] !== eleArray[rowValue][colIndex - 1]) {
|
|
572
573
|
for (rowMin = rowValue; rowMin < rowValue + index; rowMin++) {
|
|
@@ -608,10 +609,10 @@ var TableCommand = /** @class */ (function () {
|
|
|
608
609
|
};
|
|
609
610
|
TableCommand.prototype.mergeCellContent = function () {
|
|
610
611
|
var selectedCells = this.curTable.querySelectorAll('.e-cell-select');
|
|
611
|
-
var innerHtml = selectedCells[0].innerHTML;
|
|
612
|
-
for (var i = 1; i < selectedCells.length
|
|
612
|
+
var innerHtml = selectedCells[0].innerHTML === '<br>' ? '' : selectedCells[0].innerHTML;
|
|
613
|
+
for (var i = 1; i < selectedCells.length; i++) {
|
|
613
614
|
if ('<br>' !== selectedCells[i].innerHTML) {
|
|
614
|
-
innerHtml = innerHtml + selectedCells[i].innerHTML;
|
|
615
|
+
innerHtml = innerHtml ? innerHtml + '<br>' + selectedCells[i].innerHTML : innerHtml + selectedCells[i].innerHTML;
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
618
|
selectedCells[0].innerHTML = innerHtml;
|
|
@@ -34,8 +34,8 @@ var Count = /** @class */ (function () {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
Count.prototype.appendCount = function () {
|
|
37
|
-
var htmlText = this.parent.editorMode === 'Markdown' ? this.editPanel.value
|
|
38
|
-
this.editPanel.textContent
|
|
37
|
+
var htmlText = this.parent.editorMode === 'Markdown' ? this.editPanel.value :
|
|
38
|
+
this.editPanel.textContent;
|
|
39
39
|
if (this.parent.editorMode !== 'Markdown' && htmlText.indexOf('\u200B') !== -1) {
|
|
40
40
|
this.htmlLength = htmlText.replace(/\u200B/g, '').length;
|
|
41
41
|
}
|
|
@@ -159,7 +159,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
159
159
|
}
|
|
160
160
|
_this.alignDropDown = _this.toolbarRenderer.renderDropDownButton({
|
|
161
161
|
iconCss: 'e-justify-left e-icons',
|
|
162
|
-
cssClass: classes.CLS_DROPDOWN_POPUP + ' ' + classes.CLS_DROPDOWN_ITEMS,
|
|
162
|
+
cssClass: classes.CLS_DROPDOWN_POPUP + ' ' + classes.CLS_DROPDOWN_ITEMS + ' ' + classes.CLS_ALIGN_TB_BTN,
|
|
163
163
|
itemName: 'Alignments', items: model.alignmentItems, element: targetElement
|
|
164
164
|
});
|
|
165
165
|
break;
|
|
@@ -324,6 +324,11 @@ export var CLS_FONT_SIZE_TB_BTN = 'e-font-size-tbar-btn';
|
|
|
324
324
|
/**
|
|
325
325
|
* @hidden
|
|
326
326
|
|
|
327
|
+
*/
|
|
328
|
+
export var CLS_ALIGN_TB_BTN = 'e-alignment-tbar-btn';
|
|
329
|
+
/**
|
|
330
|
+
* @hidden
|
|
331
|
+
|
|
327
332
|
*/
|
|
328
333
|
export var CLS_FONT_COLOR_TARGET = 'e-rte-fontcolor-element';
|
|
329
334
|
/**
|
|
@@ -1211,7 +1211,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1211
1211
|
this.inputElement.parentElement.insertBefore(this.placeHolderWrapper, this.inputElement);
|
|
1212
1212
|
}
|
|
1213
1213
|
attributes(this.placeHolderWrapper, {
|
|
1214
|
-
'style': 'font-size: 14px;
|
|
1214
|
+
'style': 'font-size: 14px; margin-left: 0px; margin-right: 0px;'
|
|
1215
1215
|
});
|
|
1216
1216
|
}
|
|
1217
1217
|
this.placeHolderWrapper.innerHTML = this.placeholder;
|
|
@@ -1451,7 +1451,8 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1451
1451
|
};
|
|
1452
1452
|
RichTextEditor.prototype.setValue = function () {
|
|
1453
1453
|
if (this.valueTemplate) {
|
|
1454
|
-
|
|
1454
|
+
var regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
|
|
1455
|
+
if (regEx.test(this.valueTemplate)) {
|
|
1455
1456
|
this.setProperties({ value: this.valueTemplate });
|
|
1456
1457
|
}
|
|
1457
1458
|
else {
|
|
@@ -2037,7 +2038,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2037
2038
|
RichTextEditor.prototype.restrict = function (e) {
|
|
2038
2039
|
if (this.maxLength >= 0) {
|
|
2039
2040
|
var element = this.editorMode === 'Markdown' ? this.contentModule.getText() :
|
|
2040
|
-
e.currentTarget.textContent
|
|
2041
|
+
e.currentTarget.textContent;
|
|
2041
2042
|
var array = [8, 16, 17, 37, 38, 39, 40, 46, 65];
|
|
2042
2043
|
var arrayKey = void 0;
|
|
2043
2044
|
for (var i = 0; i <= array.length - 1; i++) {
|
|
@@ -286,6 +286,7 @@ var Image = /** @class */ (function () {
|
|
|
286
286
|
Image.prototype.calcPos = function (elem) {
|
|
287
287
|
var ignoreOffset = ['TD', 'TH', 'TABLE', 'A'];
|
|
288
288
|
var parentOffset = { top: 0, left: 0 };
|
|
289
|
+
var elementOffset;
|
|
289
290
|
var doc = elem.ownerDocument;
|
|
290
291
|
var offsetParent = ((elem.offsetParent && (elem.offsetParent.classList.contains('e-img-caption') ||
|
|
291
292
|
ignoreOffset.indexOf(elem.offsetParent.tagName) > -1)) ?
|
|
@@ -299,10 +300,19 @@ var Image = /** @class */ (function () {
|
|
|
299
300
|
// eslint-disable-next-line
|
|
300
301
|
parentOffset = offsetParent.getBoundingClientRect();
|
|
301
302
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
if (elem.offsetParent && (elem.offsetParent.classList.contains('e-img-caption'))) {
|
|
304
|
+
elementOffset = elem.getBoundingClientRect();
|
|
305
|
+
return {
|
|
306
|
+
top: elementOffset.top - parentOffset.top,
|
|
307
|
+
left: elementOffset.left - parentOffset.left
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
return {
|
|
312
|
+
top: elem.offsetTop,
|
|
313
|
+
left: elem.offsetLeft
|
|
314
|
+
};
|
|
315
|
+
}
|
|
306
316
|
};
|
|
307
317
|
Image.prototype.setAspectRatio = function (img, expectedX, expectedY, e) {
|
|
308
318
|
if (isNullOrUndefined(img.width)) {
|
|
@@ -312,7 +322,7 @@ var Image = /** @class */ (function () {
|
|
|
312
322
|
parseInt(img.style.width, 10) : img.width;
|
|
313
323
|
var height = img.style.height !== '' ? parseInt(img.style.height, 10) : img.height;
|
|
314
324
|
if (width > height) {
|
|
315
|
-
img.style.minWidth = '20px';
|
|
325
|
+
img.style.minWidth = this.parent.insertImageSettings.minWidth === 0 ? '20px' : formatUnit(this.parent.insertImageSettings.minWidth);
|
|
316
326
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
317
327
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
318
328
|
var percentageValue = this.pixToPerc((width / height * expectedY), (img.previousElementSibling || img.parentElement));
|
|
@@ -635,6 +645,10 @@ var Image = /** @class */ (function () {
|
|
|
635
645
|
range.startContainer.querySelector('.' + classes.CLS_CAPTION + '.' + classes.CLS_CAPINLINE))) {
|
|
636
646
|
detach(range.startContainer.querySelector('.' + classes.CLS_CAPTION + '.' + classes.CLS_CAPINLINE));
|
|
637
647
|
}
|
|
648
|
+
else if (range.startContainer.nodeType === 1 &&
|
|
649
|
+
range.startContainer.querySelector('.' + classes.CLS_CAPTION + '.' + classes.CLS_IMGBREAK)) {
|
|
650
|
+
detach(range.startContainer.querySelector('.' + classes.CLS_CAPTION + '.' + classes.CLS_IMGBREAK));
|
|
651
|
+
}
|
|
638
652
|
}
|
|
639
653
|
break;
|
|
640
654
|
case 'insert-image':
|
|
@@ -805,6 +819,8 @@ var Image = /** @class */ (function () {
|
|
|
805
819
|
if (this.parent.quickToolbarModule.imageQTBar) {
|
|
806
820
|
if (e.isNotify) {
|
|
807
821
|
setTimeout(function () {
|
|
822
|
+
_this.parent.formatter.editorManager.nodeSelection.Clear(_this.contentModule.getDocument());
|
|
823
|
+
_this.parent.formatter.editorManager.nodeSelection.setSelectionContents(_this.contentModule.getDocument(), target);
|
|
808
824
|
_this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
|
|
809
825
|
}, 400);
|
|
810
826
|
}
|
|
@@ -301,7 +301,7 @@ var Table = /** @class */ (function () {
|
|
|
301
301
|
ele.classList.add(classes.CLS_TABLE_SEL);
|
|
302
302
|
this.addRow(selection, event, true);
|
|
303
303
|
ele.classList.remove(classes.CLS_TABLE_SEL);
|
|
304
|
-
nextElement = nextElement.parentElement.nextSibling.firstChild;
|
|
304
|
+
nextElement = nextElement.parentElement.nextSibling ? nextElement.parentElement.nextSibling.firstChild : nextElement.parentElement.firstChild;
|
|
305
305
|
// eslint-disable-next-line
|
|
306
306
|
(nextElement.textContent.trim() !== '' && closest(nextElement, 'td')) ?
|
|
307
307
|
selection.setSelectionNode(this.contentModule.getDocument(), nextElement) :
|
|
@@ -590,6 +590,7 @@ var Table = /** @class */ (function () {
|
|
|
590
590
|
var offset = elem.getBoundingClientRect();
|
|
591
591
|
var doc = elem.ownerDocument;
|
|
592
592
|
var offsetParent = elem.offsetParent || doc.documentElement;
|
|
593
|
+
var isNestedTable = false;
|
|
593
594
|
while (offsetParent &&
|
|
594
595
|
(offsetParent === doc.body || offsetParent === doc.documentElement) &&
|
|
595
596
|
offsetParent.style.position === 'static') {
|
|
@@ -597,15 +598,29 @@ var Table = /** @class */ (function () {
|
|
|
597
598
|
}
|
|
598
599
|
if (offsetParent.nodeName === 'TD' && elem.nodeName === 'TABLE') {
|
|
599
600
|
offsetParent = closest(offsetParent, '.e-rte-content');
|
|
601
|
+
isNestedTable = true;
|
|
600
602
|
}
|
|
601
603
|
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
|
|
602
604
|
// eslint-disable-next-line
|
|
603
605
|
parentOffset = offsetParent.getBoundingClientRect();
|
|
604
606
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
if (isNestedTable) {
|
|
608
|
+
isNestedTable = false;
|
|
609
|
+
var topValue = this.parent.inputElement && this.parent.inputElement.scrollTop > 0 ?
|
|
610
|
+
(this.parent.inputElement.scrollTop + offset.top) - parentOffset.top : offset.top - parentOffset.top;
|
|
611
|
+
var leftValue = this.parent.inputElement && this.parent.inputElement.scrollLeft > 0 ?
|
|
612
|
+
(this.parent.inputElement.scrollLeft + offset.left) - parentOffset.left : offset.left - parentOffset.left;
|
|
613
|
+
return {
|
|
614
|
+
top: topValue,
|
|
615
|
+
left: leftValue
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
return {
|
|
620
|
+
top: elem.offsetTop,
|
|
621
|
+
left: elem.offsetLeft
|
|
622
|
+
};
|
|
623
|
+
}
|
|
609
624
|
};
|
|
610
625
|
Table.prototype.getPointX = function (e) {
|
|
611
626
|
if (e.touches && e.touches.length) {
|
|
@@ -296,6 +296,9 @@ var NodeSelection = /** @class */ (function () {
|
|
|
296
296
|
node = node && node.childNodes[num[index]];
|
|
297
297
|
}
|
|
298
298
|
if (node && constant >= 0 && node.nodeName !== 'html') {
|
|
299
|
+
if (node.nodeType === 3 && node.nodeValue.replace(/\u00a0/g, ' ') === ' ') {
|
|
300
|
+
constant = node.textContent.length;
|
|
301
|
+
}
|
|
299
302
|
range[isvalid ? 'setStart' : 'setEnd'](node, constant);
|
|
300
303
|
}
|
|
301
304
|
return range;
|
|
@@ -756,6 +756,7 @@
|
|
|
756
756
|
line-height: 18px;
|
|
757
757
|
opacity: 00.54;
|
|
758
758
|
overflow: hidden;
|
|
759
|
+
padding: 16px;
|
|
759
760
|
position: absolute;
|
|
760
761
|
text-align: start;
|
|
761
762
|
top: 0;
|
|
@@ -920,10 +921,9 @@
|
|
|
920
921
|
.e-richtexteditor .e-rte-character-count {
|
|
921
922
|
bottom: 0;
|
|
922
923
|
color: #f0f0f0;
|
|
923
|
-
font-family: 'Times New Roman', Georgia, Serif;
|
|
924
924
|
font-size: 14px;
|
|
925
925
|
margin-right: 30px;
|
|
926
|
-
opacity:
|
|
926
|
+
opacity: 0.54;
|
|
927
927
|
padding-bottom: 2px;
|
|
928
928
|
position: absolute;
|
|
929
929
|
right: 0;
|
|
@@ -2388,7 +2388,10 @@
|
|
|
2388
2388
|
padding: 0;
|
|
2389
2389
|
}
|
|
2390
2390
|
|
|
2391
|
-
.e-rte-quick-toolbar.e-
|
|
2391
|
+
.e-rte-quick-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control,
|
|
2392
|
+
.e-rte-quick-toolbar.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control:hover,
|
|
2393
|
+
.e-rte-quick-toolbar.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control:active,
|
|
2394
|
+
.e-rte-quick-toolbar.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control.e-active {
|
|
2392
2395
|
padding-left: 0;
|
|
2393
2396
|
padding-right: 0;
|
|
2394
2397
|
}
|
package/styles/bootstrap.css
CHANGED
|
@@ -902,6 +902,7 @@
|
|
|
902
902
|
line-height: 18px;
|
|
903
903
|
opacity: 00.54;
|
|
904
904
|
overflow: hidden;
|
|
905
|
+
padding: 16px;
|
|
905
906
|
position: absolute;
|
|
906
907
|
text-align: start;
|
|
907
908
|
top: 0;
|
|
@@ -1066,10 +1067,9 @@
|
|
|
1066
1067
|
.e-richtexteditor .e-rte-character-count {
|
|
1067
1068
|
bottom: 0;
|
|
1068
1069
|
color: #000;
|
|
1069
|
-
font-family: 'Times New Roman', Georgia, Serif;
|
|
1070
1070
|
font-size: 14px;
|
|
1071
1071
|
margin-right: 30px;
|
|
1072
|
-
opacity:
|
|
1072
|
+
opacity: 0.54;
|
|
1073
1073
|
padding-bottom: 2px;
|
|
1074
1074
|
position: absolute;
|
|
1075
1075
|
right: 0;
|
|
@@ -2534,7 +2534,10 @@
|
|
|
2534
2534
|
padding: 0;
|
|
2535
2535
|
}
|
|
2536
2536
|
|
|
2537
|
-
.e-rte-quick-toolbar.e-
|
|
2537
|
+
.e-rte-quick-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control,
|
|
2538
|
+
.e-rte-quick-toolbar.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control:hover,
|
|
2539
|
+
.e-rte-quick-toolbar.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control:active,
|
|
2540
|
+
.e-rte-quick-toolbar.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-rte-backgroundcolor-dropdown.e-dropdown-btn.e-tbar-btn.e-btn.e-control.e-active {
|
|
2538
2541
|
padding-left: 0;
|
|
2539
2542
|
padding-right: 0;
|
|
2540
2543
|
}
|
package/styles/bootstrap4.css
CHANGED
|
@@ -1035,6 +1035,7 @@
|
|
|
1035
1035
|
line-height: 18px;
|
|
1036
1036
|
opacity: 00.54;
|
|
1037
1037
|
overflow: hidden;
|
|
1038
|
+
padding: 16px;
|
|
1038
1039
|
position: absolute;
|
|
1039
1040
|
text-align: start;
|
|
1040
1041
|
top: 0;
|
|
@@ -1199,10 +1200,9 @@
|
|
|
1199
1200
|
.e-richtexteditor .e-rte-character-count {
|
|
1200
1201
|
bottom: 0;
|
|
1201
1202
|
color: #6c757d;
|
|
1202
|
-
font-family: 'Times New Roman', Georgia, Serif;
|
|
1203
1203
|
font-size: 14px;
|
|
1204
1204
|
margin-right: 30px;
|
|
1205
|
-
opacity:
|
|
1205
|
+
opacity: 1;
|
|
1206
1206
|
padding-bottom: 2px;
|
|
1207
1207
|
position: absolute;
|
|
1208
1208
|
right: 0;
|
|
@@ -482,6 +482,13 @@
|
|
|
482
482
|
padding: 0 6px;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
+
.e-bigger .e-richtexteditor .e-rte-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn.e-btn,
|
|
486
|
+
.e-bigger .e-richtexteditor .e-rte-toolbar.e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn.e-btn,
|
|
487
|
+
.e-richtexteditor.e-bigger .e-rte-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn.e-btn,
|
|
488
|
+
.e-richtexteditor.e-bigger .e-rte-toolbar.e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn.e-btn {
|
|
489
|
+
padding: 0 8px;
|
|
490
|
+
}
|
|
491
|
+
|
|
485
492
|
.e-bigger .e-richtexteditor.e-rte-full-screen iframe,
|
|
486
493
|
.e-richtexteditor.e-bigger.e-rte-full-screen iframe {
|
|
487
494
|
height: calc(100% - 56px);
|
|
@@ -544,6 +551,10 @@
|
|
|
544
551
|
padding-right: 5px;
|
|
545
552
|
}
|
|
546
553
|
|
|
554
|
+
.e-richtexteditor .e-rte-toolbar.e-toolbar .e-hor-nav {
|
|
555
|
+
min-height: 40px;
|
|
556
|
+
}
|
|
557
|
+
|
|
547
558
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-items:not(.e-tbar-pos):not(.e-toolbar-multirow) .e-toolbar-item:first-child {
|
|
548
559
|
margin-left: 7px;
|
|
549
560
|
}
|
|
@@ -700,6 +711,11 @@
|
|
|
700
711
|
padding: 0;
|
|
701
712
|
}
|
|
702
713
|
|
|
714
|
+
.e-richtexteditor .e-rte-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn.e-btn,
|
|
715
|
+
.e-richtexteditor .e-rte-toolbar.e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn.e-btn {
|
|
716
|
+
padding: 0 4px;
|
|
717
|
+
}
|
|
718
|
+
|
|
703
719
|
.e-richtexteditor .e-rte-toolbar.e-control[class*='e-toolbar'],
|
|
704
720
|
.e-richtexteditor .e-rte-toolbar.e-toolbar.e-extended-toolbar.e-control[class*='e-toolbar'] {
|
|
705
721
|
box-sizing: border-box;
|
|
@@ -752,6 +768,7 @@
|
|
|
752
768
|
line-height: 1.5;
|
|
753
769
|
opacity: 00.54;
|
|
754
770
|
overflow: hidden;
|
|
771
|
+
padding: 16px;
|
|
755
772
|
position: absolute;
|
|
756
773
|
text-align: start;
|
|
757
774
|
top: 0;
|
|
@@ -916,10 +933,9 @@
|
|
|
916
933
|
.e-richtexteditor .e-rte-character-count {
|
|
917
934
|
bottom: 0;
|
|
918
935
|
color: #6c757d;
|
|
919
|
-
font-family: 'Times New Roman', Georgia, Serif;
|
|
920
936
|
font-size: 14px;
|
|
921
937
|
margin-right: 30px;
|
|
922
|
-
opacity:
|
|
938
|
+
opacity: 1;
|
|
923
939
|
padding-bottom: 2px;
|
|
924
940
|
position: absolute;
|
|
925
941
|
right: 0;
|
|
@@ -2042,6 +2058,13 @@
|
|
|
2042
2058
|
font-size: 12px;
|
|
2043
2059
|
}
|
|
2044
2060
|
|
|
2061
|
+
.e-rte-toolbar.e-toolbar.e-extended-toolbar .e-toolbar-items .e-toolbar-item .e-dropdown-btn.e-alignment-tbar-btn .e-btn-icon.e-caret,
|
|
2062
|
+
.e-rte-toolbar.e-toolbar .e-toolbar-items .e-toolbar-item .e-dropdown-btn.e-alignment-tbar-btn .e-btn-icon.e-caret,
|
|
2063
|
+
.e-rte-toolbar.e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-dropdown-btn.e-alignment-tbar-btn .e-btn-icon.e-caret,
|
|
2064
|
+
.e-rte-toolbar.e-toolbar .e-toolbar-extended .e-toolbar-item .e-dropdown-btn.e-alignment-tbar-btn .e-btn-icon.e-caret {
|
|
2065
|
+
min-width: 24px;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2045
2068
|
.e-rte-inline-dropdown .e-rte-color-content .e-rte-elements {
|
|
2046
2069
|
border-bottom-style: solid;
|
|
2047
2070
|
border-bottom-width: 3px;
|
|
@@ -2471,6 +2494,7 @@
|
|
|
2471
2494
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-item.e-active .e-tbar-btn:focus {
|
|
2472
2495
|
background: #565e64;
|
|
2473
2496
|
border: 1px solid #51585e;
|
|
2497
|
+
border: 0;
|
|
2474
2498
|
}
|
|
2475
2499
|
|
|
2476
2500
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-item.e-active .e-tbar-btn .e-icons,
|
|
@@ -2479,7 +2503,7 @@
|
|
|
2479
2503
|
}
|
|
2480
2504
|
|
|
2481
2505
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-icons {
|
|
2482
|
-
color: #
|
|
2506
|
+
color: #adb5bd;
|
|
2483
2507
|
}
|
|
2484
2508
|
|
|
2485
2509
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-tbar-btn:hover .e-icons {
|
|
@@ -2643,7 +2667,7 @@
|
|
|
2643
2667
|
}
|
|
2644
2668
|
|
|
2645
2669
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn .e-icons {
|
|
2646
|
-
color: #
|
|
2670
|
+
color: #adb5bd;
|
|
2647
2671
|
}
|
|
2648
2672
|
|
|
2649
2673
|
.e-richtexteditor .e-rte-toolbar .e-toolbar-extended .e-toolbar-item.e-active .e-tbar-btn .e-icons {
|
|
@@ -2848,7 +2872,7 @@
|
|
|
2848
2872
|
}
|
|
2849
2873
|
|
|
2850
2874
|
.e-rte-quick-popup .e-rte-quick-toolbar .e-toolbar-items .e-icons {
|
|
2851
|
-
color: #
|
|
2875
|
+
color: #adb5bd;
|
|
2852
2876
|
}
|
|
2853
2877
|
|
|
2854
2878
|
.e-rte-quick-popup .e-rte-quick-toolbar .e-toolbar-items .e-tbar-btn:hover .e-icons {
|
|
@@ -2860,7 +2884,7 @@
|
|
|
2860
2884
|
}
|
|
2861
2885
|
|
|
2862
2886
|
.e-rte-quick-popup .e-rte-quick-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn .e-icons {
|
|
2863
|
-
color: #
|
|
2887
|
+
color: #adb5bd;
|
|
2864
2888
|
}
|
|
2865
2889
|
|
|
2866
2890
|
.e-rte-quick-popup .e-rte-dropdown-btn {
|