From c6e8e37a9c6b83b4d4e55ba56eed9ec97bdaaebf Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sat, 7 Feb 2026 22:47:17 +0100 Subject: [PATCH] tabellen element --- config/current.ver | 2 +- public/assets/js/bridge/blocks-custom.js | 43 ++++++++++++++++-------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/config/current.ver b/config/current.ver index 0323a29..e0bb42e 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.2.64 \ No newline at end of file +1.2.65 \ No newline at end of file diff --git a/public/assets/js/bridge/blocks-custom.js b/public/assets/js/bridge/blocks-custom.js index dd888b6..74182b7 100644 --- a/public/assets/js/bridge/blocks-custom.js +++ b/public/assets/js/bridge/blocks-custom.js @@ -76,7 +76,7 @@ // TABLE const hasBridgeTable = !!(editor && editor.DomComponents && editor.DomComponents.getType && editor.DomComponents.getType('bridge-table')); - const tableType = hasBridgeTable ? 'bridge-table' : 'table'; + const tableType = hasBridgeTable ? 'bridge-table' : 'default'; addOnce(bm, 'cust-table', { id:'cust-table', label:'🧩 Tabelle (2xN)', content:{ type: tableType, @@ -96,19 +96,34 @@ 'width':'100%', 'margin-bottom':'16px' }, - components:` - - Spalte A - Spalte B - - - Zeile 1 - ... - - - Zeile 2 - ... - ` + components: [ + { + tagName: 'tbody', + components: [ + { + tagName: 'tr', + components: [ + { tagName: 'th', content: 'Spalte A', style: {'text-align':'left','padding':'8px','border':'1px solid #e2e8f0','background-color':'#f8fafc','font-size':'13px'} }, + { tagName: 'th', content: 'Spalte B', style: {'text-align':'left','padding':'8px','border':'1px solid #e2e8f0','background-color':'#f8fafc','font-size':'13px'} }, + ], + }, + { + tagName: 'tr', + components: [ + { tagName: 'td', content: 'Zeile 1', style: {'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'} }, + { tagName: 'td', content: '...', style: {'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'} }, + ], + }, + { + tagName: 'tr', + components: [ + { tagName: 'td', content: 'Zeile 2', style: {'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'} }, + { tagName: 'td', content: '...', style: {'padding':'8px','border':'1px solid #e2e8f0','font-size':'13px'} }, + ], + }, + ], + }, + ] } }); // DIVIDER