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.
- package/esm2020/lib/el-text-editor.component.mjs +24 -2
- package/fesm2015/el-text-editor.mjs +23 -1
- package/fesm2015/el-text-editor.mjs.map +1 -1
- package/fesm2020/el-text-editor.mjs +23 -1
- package/fesm2020/el-text-editor.mjs.map +1 -1
- package/lib/el-text-editor.component.d.ts +1 -0
- package/package.json +1 -1
@@ -1013,13 +1013,25 @@ class ElTextEditorComponent {
|
|
1013
1013
|
addRow() {
|
1014
1014
|
if (this.selectedTable) {
|
1015
1015
|
let row = this.selectedTable.insertRow();
|
1016
|
-
|
1016
|
+
// Loop through the columns of the first row to determine the number of cells
|
1017
1017
|
for (let i = 0; i < this.selectedTable.rows[0].cells.length; i++) {
|
1018
1018
|
let cell = row.insertCell(i);
|
1019
1019
|
cell.innerHTML = ' ';
|
1020
|
+
// Apply bottom border explicitly
|
1021
|
+
cell.style.borderBottom = `2px solid ${this.themeModeClrVerticalLineColorForTable()}`; // You can replace 'black' with your theme color
|
1020
1022
|
}
|
1021
1023
|
}
|
1022
1024
|
}
|
1025
|
+
// addRow() {
|
1026
|
+
// if (this.selectedTable) {
|
1027
|
+
// let row = this.selectedTable.insertRow();
|
1028
|
+
// row.style.borderBottom = this.themeModeClrVerticalLineForTable(); // Add bottom border to the row
|
1029
|
+
// for (let i = 0; i < this.selectedTable.rows[0].cells.length; i++) {
|
1030
|
+
// let cell = row.insertCell(i);
|
1031
|
+
// cell.innerHTML = ' ';
|
1032
|
+
// }
|
1033
|
+
// }
|
1034
|
+
// }
|
1023
1035
|
// deleteRow() {
|
1024
1036
|
// if (this.selectedTable) {
|
1025
1037
|
// this.selectedTable.deleteRow(-1);
|
@@ -1099,6 +1111,7 @@ class ElTextEditorComponent {
|
|
1099
1111
|
cell.style.wordBreak = 'break-all';
|
1100
1112
|
cell.style.whiteSpace = 'normal';
|
1101
1113
|
cell.style.minWidth = `${minWidth}px`;
|
1114
|
+
cell.style.borderBottom = `2px solid ${this.themeModeClrVerticalLineColorForTable()}`;
|
1102
1115
|
}
|
1103
1116
|
// Update existing rows' bottom border
|
1104
1117
|
for (let i = 0; i < this.selectedTable.rows.length; i++) {
|
@@ -1131,6 +1144,15 @@ class ElTextEditorComponent {
|
|
1131
1144
|
return '2px solid #5F5F5F !important';
|
1132
1145
|
}
|
1133
1146
|
}
|
1147
|
+
themeModeClrVerticalLineColorForTable() {
|
1148
|
+
const clrMode = document.body.getAttribute('data-layout-color');
|
1149
|
+
if (clrMode == 'dark') {
|
1150
|
+
return '#414141';
|
1151
|
+
}
|
1152
|
+
else {
|
1153
|
+
return '#5F5F5F';
|
1154
|
+
}
|
1155
|
+
}
|
1134
1156
|
adjustTableWidth(event) {
|
1135
1157
|
if (this.selectedTable) {
|
1136
1158
|
this.selectedTable.style.width = event.target.value + 'px';
|