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
@@ -802,7 +802,7 @@ class ElTextEditorComponent {
|
|
802
802
|
const cellMinWidth = tableWidth / cols; // Calculate minimum width for each cell
|
803
803
|
let table = `<br /><table style="width: ${tableWidth}px;">`;
|
804
804
|
for (let i = 0; i < 3; i++) { // Number of rows
|
805
|
-
table +=
|
805
|
+
table += `<tr style="border-bottom: ${this.themeModeClrVerticalLineForTable()}">`; // Add border-bottom to the row
|
806
806
|
for (let j = 0; j < cols; j++) {
|
807
807
|
table += `<td style="word-wrap: break-word; word-break: break-all; white-space: normal; min-width: ${cellMinWidth}px;"> </td>`;
|
808
808
|
}
|
@@ -869,7 +869,7 @@ class ElTextEditorComponent {
|
|
869
869
|
addRow() {
|
870
870
|
if (this.selectedTable) {
|
871
871
|
let row = this.selectedTable.insertRow();
|
872
|
-
row.style.borderBottom =
|
872
|
+
row.style.borderBottom = this.themeModeClrVerticalLineForTable(); // Add bottom border to the row
|
873
873
|
for (let i = 0; i < this.selectedTable.rows[0].cells.length; i++) {
|
874
874
|
let cell = row.insertCell(i);
|
875
875
|
cell.innerHTML = ' ';
|
@@ -959,7 +959,7 @@ class ElTextEditorComponent {
|
|
959
959
|
}
|
960
960
|
// Update existing rows' bottom border
|
961
961
|
for (let i = 0; i < this.selectedTable.rows.length; i++) {
|
962
|
-
this.selectedTable.rows[i].style.borderBottom =
|
962
|
+
this.selectedTable.rows[i].style.borderBottom = this.themeModeClrVerticalLineForTable();
|
963
963
|
}
|
964
964
|
}
|
965
965
|
}
|
@@ -980,6 +980,15 @@ class ElTextEditorComponent {
|
|
980
980
|
}
|
981
981
|
}
|
982
982
|
}
|
983
|
+
themeModeClrVerticalLineForTable() {
|
984
|
+
const clrMode = document.body.getAttribute('data-layout-color');
|
985
|
+
if (clrMode == 'dark') {
|
986
|
+
return '2px solid #414141 !important';
|
987
|
+
}
|
988
|
+
else {
|
989
|
+
return '2px solid #5F5F5F !important';
|
990
|
+
}
|
991
|
+
}
|
983
992
|
adjustTableWidth(event) {
|
984
993
|
if (this.selectedTable) {
|
985
994
|
this.selectedTable.style.width = event.target.value + 'px';
|