Feature #81676

CKeditor - set table classes only in YAML file without adjusting lib.parseFunc_RTE settings

Added by Samuel Heinz over 4 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2017-06-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.1
Tags:
Complexity:
Sprint Focus:

Description

Added a new table class in CKEditor.yaml, it's available correctly in BE source code and still after saving the CE.

CKEditor.yaml

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

But in FE there is only

<table class="contenttable">
...
</table


Files

contenttable.png (68.2 KB) contenttable.png Sebastian Stein, 2017-07-25 14:18
#1

Updated by Wouter Wolters over 4 years ago

  • Assignee deleted (Mathias Schreiber)

Please do not assign issue to anyone. Thanks.

#2

Updated by Sebastian Stein about 4 years ago

This workaround solved this problem for me (Typo3 8.7.3):

lib.parseFunc_RTE.externalBlocks.table.stdWrap >

It removes the default "contenttable" stdWrap.

#3

Updated by Samuel Heinz about 4 years ago

Thx, for the hint.
I need the default table class "contenttable" for styling so I decided for the following solution.

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)

Maybe the TypoScript could be removed in future. Would be nice to set new table classes only in the YAML file.

#4

Updated by Riccardo De Contardi over 3 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from CKEditor deletes table class in frontend to CKeditor - set table classes only in YAML file without adjusting lib.parseFunc_RTE settings
  • Priority changed from Must have to Could have
  • Target version deleted (next-patchlevel)

Hello sorry for this late answer, I hope it is fine for you if I change the tracker of your issue to "Feature" as there is no bug here (IMO) - I also change the title to "CKeditor - set table classes only in YAML file without adjusting lib.parseFunc_RTE settings"

I feel that simply removing the lib.parseFunc_RTE.externalBlocks.table.stdWrap could not be a viable way, as it would be a breaking change (I guess that a lot of existing installations may rely on that setting).

If you think that this is the wrong decision, please ping me and I'll revert my changes. Thank you.

#5

Updated by Henri Nathanson almost 3 years ago

just adding this as another reference - EXT:bootstrap_package dropped adding bootstrap .table class somewhere on the way. (~v7.0)
https://github.com/benjaminkott/bootstrap_package/issues/280

Also available in: Atom PDF