el-text-editor 0.0.31 → 0.0.32
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/esm2020/lib/el-text-editor.component.mjs +13 -4
- package/fesm2015/el-text-editor.mjs +12 -3
- package/fesm2015/el-text-editor.mjs.map +1 -1
- package/fesm2020/el-text-editor.mjs +12 -3
- package/fesm2020/el-text-editor.mjs.map +1 -1
- package/lib/el-text-editor.component.d.ts +1 -0
- package/package.json +1 -1
@@ -800,7 +800,7 @@ class ElTextEditorComponent {
|
|
800
800
|
const cellMinWidth = tableWidth / cols; // Calculate minimum width for each cell
|
801
801
|
let table = `<br /><table style="width: ${tableWidth}px;">`;
|
802
802
|
for (let i = 0; i < 3; i++) { // Number of rows
|
803
|
-
table +=
|
803
|
+
table += `<tr style="border-bottom: ${this.themeModeClrVerticalLineForTable()}">`; // Add border-bottom to the row
|
804
804
|
for (let j = 0; j < cols; j++) {
|
805
805
|
table += `<td style="word-wrap: break-word; word-break: break-all; white-space: normal; min-width: ${cellMinWidth}px;"> </td>`;
|
806
806
|
}
|
@@ -867,7 +867,7 @@ class ElTextEditorComponent {
|
|
867
867
|
addRow() {
|
868
868
|
if (this.selectedTable) {
|
869
869
|
let row = this.selectedTable.insertRow();
|
870
|
-
row.style.borderBottom =
|
870
|
+
row.style.borderBottom = this.themeModeClrVerticalLineForTable(); // Add bottom border to the row
|
871
871
|
for (let i = 0; i < this.selectedTable.rows[0].cells.length; i++) {
|
872
872
|
let cell = row.insertCell(i);
|
873
873
|
cell.innerHTML = ' ';
|
@@ -956,7 +956,7 @@ class ElTextEditorComponent {
|
|
956
956
|
}
|
957
957
|
// Update existing rows' bottom border
|
958
958
|
for (let i = 0; i < this.selectedTable.rows.length; i++) {
|
959
|
-
this.selectedTable.rows[i].style.borderBottom =
|
959
|
+
this.selectedTable.rows[i].style.borderBottom = this.themeModeClrVerticalLineForTable();
|
960
960
|
}
|
961
961
|
}
|
962
962
|
}
|
@@ -976,6 +976,15 @@ class ElTextEditorComponent {
|
|
976
976
|
}
|
977
977
|
}
|
978
978
|
}
|
979
|
+
themeModeClrVerticalLineForTable() {
|
980
|
+
const clrMode = document.body.getAttribute('data-layout-color');
|
981
|
+
if (clrMode == 'dark') {
|
982
|
+
return '2px solid #414141 !important';
|
983
|
+
}
|
984
|
+
else {
|
985
|
+
return '2px solid #5F5F5F !important';
|
986
|
+
}
|
987
|
+
}
|
979
988
|
adjustTableWidth(event) {
|
980
989
|
if (this.selectedTable) {
|
981
990
|
this.selectedTable.style.width = event.target.value + 'px';
|