@syncfusion/ej2-richtexteditor 22.1.36 → 22.1.39
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 +18 -0
- 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 +39 -29
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +39 -29
- 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/inserthtml.js +2 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +2 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.js +3 -1
- package/src/rich-text-editor/actions/emoji-picker.js +5 -1
- package/src/rich-text-editor/renderer/table-module.js +24 -24
- package/src/rich-text-editor/renderer/toolbar-renderer.js +3 -1
|
@@ -3404,7 +3404,9 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3404
3404
|
target: '#' + this.parent.getID() + '_toolbar_wrapper [title]',
|
|
3405
3405
|
showTipPointer: true,
|
|
3406
3406
|
openDelay: 400,
|
|
3407
|
-
cssClass: this.parent.cssClass
|
|
3407
|
+
cssClass: this.parent.cssClass,
|
|
3408
|
+
windowCollision: true,
|
|
3409
|
+
position: 'BottomCenter'
|
|
3408
3410
|
});
|
|
3409
3411
|
this.tooltip.appendTo(args.target);
|
|
3410
3412
|
}
|
|
@@ -6144,7 +6146,9 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6144
6146
|
_this.tooltip = new Tooltip({
|
|
6145
6147
|
target: '#' + _this.element.id + ' [title]',
|
|
6146
6148
|
openDelay: 400,
|
|
6147
|
-
showTipPointer: true
|
|
6149
|
+
showTipPointer: true,
|
|
6150
|
+
windowCollision: true,
|
|
6151
|
+
position: 'BottomCenter'
|
|
6148
6152
|
});
|
|
6149
6153
|
_this.tooltip.appendTo(_this.element);
|
|
6150
6154
|
}
|
|
@@ -13548,7 +13552,8 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
13548
13552
|
InsertHtml.findDetachEmptyElem = function (element) {
|
|
13549
13553
|
var removableElement;
|
|
13550
13554
|
if (!isNullOrUndefined(element.parentElement)) {
|
|
13551
|
-
if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true'
|
|
13555
|
+
if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true' &&
|
|
13556
|
+
isNullOrUndefined(element.parentElement.querySelector('img'))) {
|
|
13552
13557
|
removableElement = this.findDetachEmptyElem(element.parentElement);
|
|
13553
13558
|
}
|
|
13554
13559
|
else {
|
|
@@ -17588,7 +17593,8 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
17588
17593
|
imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
|
|
17589
17594
|
imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
|
|
17590
17595
|
imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
|
|
17591
|
-
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0
|
|
17596
|
+
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
|
|
17597
|
+
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0) {
|
|
17592
17598
|
detach(imgElem[i]);
|
|
17593
17599
|
}
|
|
17594
17600
|
}
|
|
@@ -23220,7 +23226,11 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
|
|
|
23220
23226
|
return;
|
|
23221
23227
|
}
|
|
23222
23228
|
targetEle.focus();
|
|
23223
|
-
|
|
23229
|
+
var startOffset = this.save.startOffset;
|
|
23230
|
+
var textContent = this.save.range.startContainer.textContent;
|
|
23231
|
+
var previousText = textContent.substring(startOffset, startOffset + 1);
|
|
23232
|
+
// When toolbar action is clicked then only restore the range.
|
|
23233
|
+
if (!isNullOrUndefined(this.clickEvent) || previousText !== ':') {
|
|
23224
23234
|
this.save.restore();
|
|
23225
23235
|
}
|
|
23226
23236
|
if (this.popupObj) {
|
|
@@ -29809,7 +29819,6 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29809
29819
|
var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare);
|
|
29810
29820
|
for (var i = 0; i < lastColumnsCell.length; i++) {
|
|
29811
29821
|
if (_this.curTable.rows[i].cells[_this.colIndex]) {
|
|
29812
|
-
// eslint-disable-next-line
|
|
29813
29822
|
_this.curTable.rows[i].cells[_this.curTable.rows[i].cells.length === _this.colIndex ?
|
|
29814
29823
|
_this.colIndex - 1 : _this.colIndex].style.width = (currentColumnCellWidth - differenceWidth) + '%';
|
|
29815
29824
|
}
|
|
@@ -29822,32 +29831,34 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29822
29831
|
var totalwid = parseFloat(_this.columnEle.offsetWidth.toString()) +
|
|
29823
29832
|
parseFloat(cellColl[_this.colIndex - 1].offsetWidth.toString());
|
|
29824
29833
|
for (var i = 0; i < _this.curTable.rows.length; i++) {
|
|
29825
|
-
|
|
29834
|
+
var currentRow = _this.curTable.rows[i];
|
|
29835
|
+
if ((totalwid - actualwid) > 20 && actualwid > 20) {
|
|
29826
29836
|
var leftColumnWidth = totalwid - actualwid;
|
|
29827
29837
|
var rightColWidth = actualwid;
|
|
29828
29838
|
var index = void 0;
|
|
29829
29839
|
var isMergedEleResize = false;
|
|
29830
29840
|
var leftTableCell = void 0;
|
|
29831
29841
|
var rightTableCell = void 0;
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
if (_this.curTable.rows[i].cells[j].hasAttribute('rowspan') && j <= _this.colIndex) {
|
|
29842
|
+
for (var j = 0; j < currentRow.cells.length; j++) {
|
|
29843
|
+
if (currentRow.cells[j].hasAttribute('rowspan') && j <= _this.colIndex) {
|
|
29835
29844
|
isRowCellsMerged = true;
|
|
29836
29845
|
mergedCellIndex = i;
|
|
29837
|
-
mergedElement =
|
|
29846
|
+
mergedElement = currentRow.cells[j];
|
|
29838
29847
|
}
|
|
29839
29848
|
}
|
|
29840
|
-
if (
|
|
29841
|
-
index = parseInt(
|
|
29849
|
+
if (!isNullOrUndefined(currentRow.cells[i]) && currentRow.cells[i].hasAttribute('colspan')) {
|
|
29850
|
+
index = parseInt(currentRow.cells[i].getAttribute('colspan'), 10) - 1;
|
|
29842
29851
|
}
|
|
29843
29852
|
else {
|
|
29844
29853
|
index = _this.colIndex;
|
|
29845
29854
|
}
|
|
29846
29855
|
if (isRowCellsMerged) {
|
|
29847
29856
|
var currentResizeRow = void 0;
|
|
29848
|
-
if (
|
|
29849
|
-
index =
|
|
29850
|
-
|
|
29857
|
+
if (currentRow.cells.length < cellColl.length) {
|
|
29858
|
+
index = currentRow.cells.length === _this.colIndex ?
|
|
29859
|
+
_this.colIndex - 1 : _this.colIndex - (_this.colIndex - 1);
|
|
29860
|
+
currentResizeRow = _this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ?
|
|
29861
|
+
mergedCellIndex : _this.colIndex - 1];
|
|
29851
29862
|
if (currentResizeRow && (currentResizeRow.cells[_this.colIndex - 1] === mergedElement ||
|
|
29852
29863
|
currentResizeRow.cells[currentResizeRow.cells.length - 1] === mergedElement)) {
|
|
29853
29864
|
isMergedEleResize = true;
|
|
@@ -29859,15 +29870,15 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29859
29870
|
else {
|
|
29860
29871
|
index = _this.colIndex;
|
|
29861
29872
|
}
|
|
29862
|
-
leftTableCell = !isMergedEleResize ?
|
|
29863
|
-
currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
|
|
29864
|
-
|
|
29865
|
-
rightTableCell = !isMergedEleResize ?
|
|
29866
|
-
rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
|
|
29867
|
-
currentResizeRow.cells[currentResizeRow.cells.length - 1];
|
|
29873
|
+
leftTableCell = !isMergedEleResize ? currentRow.cells[index - 1] : (currentResizeRow &&
|
|
29874
|
+
currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
|
|
29875
|
+
currentResizeRow.cells[_this.colIndex - 1] : currentRow.cells[currentRow.cells.length - 1];
|
|
29876
|
+
rightTableCell = !isMergedEleResize ? currentRow.cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
|
|
29877
|
+
rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
|
|
29878
|
+
currentRow.cells[index - 1] : currentResizeRow.cells[currentResizeRow.cells.length - 1];
|
|
29868
29879
|
}
|
|
29869
|
-
if (!isNullOrUndefined(
|
|
29870
|
-
|
|
29880
|
+
if (!isNullOrUndefined(currentRow.cells[index - 1]) && !isRowCellsMerged) {
|
|
29881
|
+
currentRow.cells[index - 1].style.width =
|
|
29871
29882
|
_this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
29872
29883
|
}
|
|
29873
29884
|
else {
|
|
@@ -29876,8 +29887,8 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29876
29887
|
_this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
29877
29888
|
}
|
|
29878
29889
|
}
|
|
29879
|
-
if (!isNullOrUndefined(
|
|
29880
|
-
|
|
29890
|
+
if (!isNullOrUndefined(currentRow.cells[index]) && !isRowCellsMerged) {
|
|
29891
|
+
currentRow.cells[index].style.width =
|
|
29881
29892
|
_this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
29882
29893
|
}
|
|
29883
29894
|
else {
|
|
@@ -29886,7 +29897,6 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29886
29897
|
_this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
29887
29898
|
}
|
|
29888
29899
|
}
|
|
29889
|
-
/* eslint-enable */
|
|
29890
29900
|
}
|
|
29891
29901
|
}
|
|
29892
29902
|
}
|
|
@@ -29910,8 +29920,8 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
29910
29920
|
EventHandler.remove(_this.contentModule.getEditPanel(), 'mouseover', _this.resizeHelper);
|
|
29911
29921
|
}
|
|
29912
29922
|
if (currentTdElement) {
|
|
29913
|
-
|
|
29914
|
-
|
|
29923
|
+
var tableBoxPosition = _this.curTable.getBoundingClientRect().left
|
|
29924
|
+
- currentTdElement.getBoundingClientRect().left;
|
|
29915
29925
|
maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
|
|
29916
29926
|
_this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
29917
29927
|
}
|