Hey everybody,
we built a technical documentation platform for our customer and he just loves it.
But I recently received a nightmare requirement:
They want to have tables:
Configurable borders
rowspan and colspan
Images inside table cells (probably also other content)
background color of table cells
I have the following idea, but I would love to have some feedback on this:
I’m thinking of building a new ContentElement of type “FatTable” (or any other fancy name^^). This element has a property called tableConfiguration where the editor can paste a html or markdown table (like generated from Table generator).
I use AOP to detect the change of that property in TYPO3CR and generate childContent elements of type “FatTableCell” (which have properties like rowspan, colspan, border, background).
Building the table renderer will be a bit tricky, but I don’t have a better solution atm.
you could technically create rowand cellelements, make row be a ContentColleciton that accepts only cell and the Table only accepts row. That would avoid the dangerous AOP stuff and editors can just create rows and cells.
I fixed it, it was the ContentCollection of the table cell. It didn’t work to render it’s main collection as td tag, but at this point to have the td tag inside the template.