Not able to configurate any HTML tag of a table content element with typoscript.
You can add a class to <table> if you set it to the flexform, but only one class. Two classes won't pass the validation.
In css_styld_content points an userFunc to tx_cssstyledcontent_pi1->render_table where the configuration is taken from pi_flexform field.
This is very unflexible, because if I want to change something on a table, I have to write an extension to overwrite the pi_flexform value of that content element. other elements are rendered with typoscript, not with userFunc.
#1 Updated by Oliver Hader over 6 years ago
- Status changed from New to Needs Feedback
Looks like you're talking about two different issues, right?
The "Additional CSS Class" issue can be confirmed, since the input field in the backend removes whitespace (to be fixed in TCA "eval" part).
Concerning the Flexform thingy, I'd like to ask you to add an example of TypoScript to see, what you're aiming for. Thanks
#3 Updated by Patrick Crausaz over 6 years ago
The thing is that the content element TABLE is rendered by the userFunc tx_cssstyledcontent_pi1->render_table (and there are hardcoded classed in this PHP function by the way...)
So you cannot configurate anything about the table.
If for example you want to change something of the content element Image or Text, you just overwrite the css_styled_content typoscript.
Look at "tt_content.stdWrap.innerWrap.cObject.default"
- If I dont want my text is rendered with id="anything" I will overwrite it here.
- If I want my Image is rendered with span instead of div, I overwrite it.
- If I want to change anything about my table markup, I go to "typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php" and do my own PHP. And I need to do it again in any TYPO3 update.