el-text-editor 0.0.79 → 0.0.81

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.
@@ -1015,13 +1015,25 @@ class ElTextEditorComponent {
1015
1015
  addRow() {
1016
1016
  if (this.selectedTable) {
1017
1017
  let row = this.selectedTable.insertRow();
1018
- row.style.borderBottom = this.themeModeClrVerticalLineForTable(); // Add bottom border to the row
1018
+ // Loop through the columns of the first row to determine the number of cells
1019
1019
  for (let i = 0; i < this.selectedTable.rows[0].cells.length; i++) {
1020
1020
  let cell = row.insertCell(i);
1021
1021
  cell.innerHTML = '&nbsp;';
1022
+ // Apply bottom border explicitly
1023
+ cell.style.borderBottom = `2px solid ${this.themeModeClrVerticalLineColorForTable()}`; // You can replace 'black' with your theme color
1022
1024
  }
1023
1025
  }
1024
1026
  }
1027
+ // addRow() {
1028
+ // if (this.selectedTable) {
1029
+ // let row = this.selectedTable.insertRow();
1030
+ // row.style.borderBottom = this.themeModeClrVerticalLineForTable(); // Add bottom border to the row
1031
+ // for (let i = 0; i < this.selectedTable.rows[0].cells.length; i++) {
1032
+ // let cell = row.insertCell(i);
1033
+ // cell.innerHTML = '&nbsp;';
1034
+ // }
1035
+ // }
1036
+ // }
1025
1037
  // deleteRow() {
1026
1038
  // if (this.selectedTable) {
1027
1039
  // this.selectedTable.deleteRow(-1);
@@ -1102,6 +1114,7 @@ class ElTextEditorComponent {
1102
1114
  cell.style.wordBreak = 'break-all';
1103
1115
  cell.style.whiteSpace = 'normal';
1104
1116
  cell.style.minWidth = `${minWidth}px`;
1117
+ cell.style.borderBottom = `2px solid ${this.themeModeClrVerticalLineColorForTable()}`;
1105
1118
  }
1106
1119
  // Update existing rows' bottom border
1107
1120
  for (let i = 0; i < this.selectedTable.rows.length; i++) {
@@ -1135,6 +1148,15 @@ class ElTextEditorComponent {
1135
1148
  return '2px solid #5F5F5F !important';
1136
1149
  }
1137
1150
  }
1151
+ themeModeClrVerticalLineColorForTable() {
1152
+ const clrMode = document.body.getAttribute('data-layout-color');
1153
+ if (clrMode == 'dark') {
1154
+ return '#414141';
1155
+ }
1156
+ else {
1157
+ return '#5F5F5F';
1158
+ }
1159
+ }
1138
1160
  adjustTableWidth(event) {
1139
1161
  if (this.selectedTable) {
1140
1162
  this.selectedTable.style.width = event.target.value + 'px';