#81676CKeditor - set table classes only in YAML file without adjusting lib.parseFunc_RTE settings
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
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 6
-
Wouter Wolters commented and changed removed the assignee <span data-processor="relativetime" data-value="2017-06-22T16:50:17+00:00" > 06/22/17, 16:50 </span>
-
Sebastian Stein commented and changed attached contenttable.png <span data-processor="relativetime" data-value="2017-07-25T14:19:39+00:00" > 07/25/17, 14:19 </span>
This workaround solved this problem for me (Typo3 8.7.3):
lib.parseFunc_RTE.externalBlocks.table.stdWrap >
It removes the default “contenttable” stdWrap.
-
Samuel Heinz commented <span data-processor="relativetime" data-value="2017-07-28T14:37:02+00:00" > 07/28/17, 14:37 </span>
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.
-
Riccardo De Contardi commented and changed tracker
BugFeature subjectCKEditor deletes table class in frontendCKeditor - set table classes only in YAML file without adjusting lib.parseFunc_RTE settings priorityMust haveCould have target version <span data-processor="relativetime" data-value="2018-01-19T22:59:19+00:00" > 01/19/18, 22:59 </span>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.stdWrapcould 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.
-
Henri Nathanson commented <span data-processor="relativetime" data-value="2018-10-04T14:35:07+00:00" > 10/04/18, 14:35 </span>
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 -
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-07T18:10:36+00:00" > 11/07/26, 18:10 </span>The CKEditor configuration (YAML) and
lib.parseFunc_RTEare two independent configuration layers that cannot be merged into one:- The RTE YAML (
stylesSet,style, …) is backend configuration. It only describes what the editor offers and keeps while editing. lib.parseFunc_RTEis frontend TypoScript. It is evaluated when the content is rendered and is configured per site/template, not per RTE preset.
Deriving the frontend output from the editor configuration would couple a backend preset to the frontend rendering of every site that uses it, and would change the output of existing installations. This was already pointed out in the issue (removing the default table
stdWrapwould be a breaking change).In addition, the TYPO3 Core default for
lib.parseFunc_RTE.externalBlocks.tableno longer restricts table classes: it only enablesHTMLparserwithkeepNonMatchedTags = 1and contains nofixAttrib.class.list. A class list like the one in the workaround is therefore only present if the site package (or a template set such as fluid_styled_content) defines it, and has to be extended there.hope it is ok to close issue therefore.
- The RTE YAML (
Please do not assign issue to anyone. Thanks.