This commit is contained in:
2026-02-09 00:10:26 +01:00
parent a6c6bc3340
commit 70127e61c2
3 changed files with 19 additions and 11 deletions

View File

@@ -1 +1 @@
1.2.78 1.2.80

View File

@@ -6,16 +6,16 @@
content:`<table data-bridge-table="1" data-bridge-rows="3" data-bridge-cols="2" data-gjs-selectable="true" data-gjs-hoverable="true" role="presentation" width="100%" cellpadding="0" cellspacing="0" style="${css({'font-family':'Arial,sans-serif','border-collapse':'collapse','width':'100%','margin-bottom':'16px'})}"> content:`<table data-bridge-table="1" data-bridge-rows="3" data-bridge-cols="2" data-gjs-selectable="true" data-gjs-hoverable="true" role="presentation" width="100%" cellpadding="0" cellspacing="0" style="${css({'font-family':'Arial,sans-serif','border-collapse':'collapse','width':'100%','margin-bottom':'16px'})}">
<tbody> <tbody>
<tr> <tr>
<th data-gjs-selectable="false" data-gjs-draggable="false" style="${css({'text-align':'left','padding':'8px','border':'1px solid #e2e8f0','background-color':'#f8fafc','font-size':'13px'})}">Spalte A</th> <th data-gjs-type="text" contenteditable="true" data-gjs-draggable="false" style="${css({'text-align':'left','padding':'8px','border':'1px solid #e2e8f0','background-color':'#f8fafc','font-size':'13px'})}">Spalte A</th>
<th data-gjs-selectable="false" data-gjs-draggable="false" style="${css({'text-align':'left','padding':'8px','border':'1px solid #e2e8f0','background-color':'#f8fafc','font-size':'13px'})}">Spalte B</th> <th data-gjs-type="text" contenteditable="true" data-gjs-draggable="false" style="${css({'text-align':'left','padding':'8px','border':'1px solid #e2e8f0','background-color':'#f8fafc','font-size':'13px'})}">Spalte B</th>
</tr> </tr>
<tr> <tr>
<td data-gjs-selectable="false" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">Zeile 1</td> <td data-gjs-type="text" contenteditable="true" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">Zeile 1</td>
<td data-gjs-selectable="false" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">...</td> <td data-gjs-type="text" contenteditable="true" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">...</td>
</tr> </tr>
<tr> <tr>
<td data-gjs-selectable="false" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">Zeile 2</td> <td data-gjs-type="text" contenteditable="true" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">Zeile 2</td>
<td data-gjs-selectable="false" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">...</td> <td data-gjs-type="text" contenteditable="true" data-gjs-draggable="false" style="${css({'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'})}">...</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`

View File

@@ -43,23 +43,31 @@
const label = existingVal || (r === 0 ? `Spalte ${String.fromCharCode(65 + c)}` : `Zeile ${r} / ${c + 1}`); const label = existingVal || (r === 0 ? `Spalte ${String.fromCharCode(65 + c)}` : `Zeile ${r} / ${c + 1}`);
if (r === 0) { if (r === 0) {
row.components.push({ row.components.push({
type: 'text',
tagName: 'th', tagName: 'th',
editable: true,
selectable: true,
hoverable: true,
draggable: false,
attributes: { attributes: {
style: headStyle, style: headStyle,
'data-gjs-selectable': 'false',
'data-gjs-draggable': 'false', 'data-gjs-draggable': 'false',
}, },
components: [{ type: 'textnode', content: label }], content: label,
}); });
} else { } else {
row.components.push({ row.components.push({
type: 'text',
tagName: 'td', tagName: 'td',
editable: true,
selectable: true,
hoverable: true,
draggable: false,
attributes: { attributes: {
style: cellStyle, style: cellStyle,
'data-gjs-selectable': 'false',
'data-gjs-draggable': 'false', 'data-gjs-draggable': 'false',
}, },
components: [{ type: 'textnode', content: label }], content: label,
}); });
} }
} }