Table
This commit is contained in:
@@ -1 +1 @@
|
||||
1.2.78
|
||||
1.2.80
|
||||
|
||||
@@ -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'})}">
|
||||
<tbody>
|
||||
<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-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 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 B</th>
|
||||
</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-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'})}">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'})}">...</td>
|
||||
</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-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'})}">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'})}">...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>`
|
||||
|
||||
@@ -43,23 +43,31 @@
|
||||
const label = existingVal || (r === 0 ? `Spalte ${String.fromCharCode(65 + c)}` : `Zeile ${r} / ${c + 1}`);
|
||||
if (r === 0) {
|
||||
row.components.push({
|
||||
type: 'text',
|
||||
tagName: 'th',
|
||||
editable: true,
|
||||
selectable: true,
|
||||
hoverable: true,
|
||||
draggable: false,
|
||||
attributes: {
|
||||
style: headStyle,
|
||||
'data-gjs-selectable': 'false',
|
||||
'data-gjs-draggable': 'false',
|
||||
},
|
||||
components: [{ type: 'textnode', content: label }],
|
||||
content: label,
|
||||
});
|
||||
} else {
|
||||
row.components.push({
|
||||
type: 'text',
|
||||
tagName: 'td',
|
||||
editable: true,
|
||||
selectable: true,
|
||||
hoverable: true,
|
||||
draggable: false,
|
||||
attributes: {
|
||||
style: cellStyle,
|
||||
'data-gjs-selectable': 'false',
|
||||
'data-gjs-draggable': 'false',
|
||||
},
|
||||
components: [{ type: 'textnode', content: label }],
|
||||
content: label,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user