Is there a possibility to add Bootstrap table-classes to tables created in Typo3 v6.1? I have noticed the setting \"Additional CSS Class\" when creating a page of type \"Tab
From your post, I assume that you are using the content element table, not a table in the RTE.
Overriding the classes of the RTE would be easy (in TypoScript setup):
lib.parseFunc_RTE {
externalBlocks {
table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
default = table table-hover
always = 1
list >
}
}
}
(The TYPO3 default is "contenttable".)
Overriding the classes of the table CE is harder. Only the FlexForm value is respected, if it is not set, it falls back to the standard classes, see https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php#l130
You will find two solutions in How to generate <table> compatible with jQueryMobile in TYPO3. The first one seems the best to me, the second one looks very hacky.
This has been fixed in the TYPO3 core, so you can use multiple classes in the regular table element now. See Bugfix #55470 on forge