0
votes

I try to add the classes "table" and "table-striped" via yaml-File to the ckeditor in TYPO3 8. With other block-tags or inline-tags there is no problem, but with tables there ist still the class "contenttable" - and only this class, I can't add other classes. I tried this:

{ name: "Table", element: ['table','p'], attributes: { 'class': 'table' }}

{ name: "Table-Striped", element: ['table','p'], attributes: { 'class': 'table-striped' }}

for p it is ok (with no sense), but not for the table.

1

1 Answers

5
votes

I had the same problem and found a workaround. https://forge.typo3.org/issues/81676

YAML

editor:
config:
    stylesSet:
        - { name: "Table borderless", element: "table", attributes: { 'class': 'contenttable contenttable--borderless' } }

TypoScript

lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class.list := addToList(contenttable, contenttable--borderless)