el-text-editor 0.0.23 → 0.0.25
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.
@@ -776,11 +776,11 @@ class ElTextEditorComponent {
|
|
776
776
|
const tableWidth = 825; // Table width in pixels
|
777
777
|
const cols = 3; // Number of columns
|
778
778
|
const cellMinWidth = tableWidth / cols; // Calculate minimum width for each cell
|
779
|
-
let table = `<br /><table style="border
|
779
|
+
let table = `<br /><table style="table-border width: ${tableWidth}px;>`;
|
780
780
|
for (let i = 0; i < 3; i++) { // Number of rows
|
781
|
-
table += '<tr>';
|
781
|
+
table += '<tr class="table-border-bottom table-border-top vertical-align-middle">';
|
782
782
|
for (let j = 0; j < cols; j++) {
|
783
|
-
table += `<td style="
|
783
|
+
table += `<td style=" word-wrap: break-word; word-break: break-all; white-space: normal; min-width: ${cellMinWidth}px;"> </td>`;
|
784
784
|
}
|
785
785
|
table += '</tr>';
|
786
786
|
}
|
@@ -1122,7 +1122,7 @@ class ElTextEditorComponent {
|
|
1122
1122
|
convertTextToTable(text) {
|
1123
1123
|
const rows = text.split('\n').filter(row => row.trim() !== '');
|
1124
1124
|
const tableRows = rows.map(row => {
|
1125
|
-
const cells = row.split('\t').map(cell => `<td class="px-1 py-1"
|
1125
|
+
const cells = row.split('\t').map(cell => `<td class="px-1 py-1" >${cell}</td>`).join('');
|
1126
1126
|
return `<tr >${cells}</tr>`;
|
1127
1127
|
}).join('');
|
1128
1128
|
return `<table>${tableRows}</table>`;
|