Project

General

Profile

Actions

Bug #89360

closed

element: ["tag1" , "tag2" , ... , "tagn"] for styleSets doesn't work anymore

Added by Jens Hoppe over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2019-10-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using this configuration

editor:
    config:
        contentsCss: "EXT:my_sitepackage/Resources/Public/Css/rte.css" 

        stylesSet:
            # headers
            - { name: "LLL:EXT:my_sitepackage/Resources/Private/Language/Backend.xlf:header.trenner.name", element: ["h1" , "h2" , "h3" , "h4", "h5"] , attributes: { 'class': 'trenner' } }

an option Trenner appears in the list of available Styles once an editor choses one of the headings h1, h2, h3, h4 or h5. The class trenner is defined in contentsCss:


h1.trenner, h2.trenner, h3.trenner, h4.trenner, h5.trenner {
    font-size: 1.66em;
    ...
    border-top: 1px solid #777777;
}

The style can successfully be applied to a heading in the editor (Screenshot rte_ckeditor_style-applied.png). Once you click save the style will be saved in tt_content.bodytext (or for whichever field the above preset is defined), so in the frontend everything looks fine. When the content element is opened/edited again at a later point in time (and the content of the editor is loaded from the database) the class trenner is not applied to the heading anymore (Screenshot rte_ckeditor_style-not-applied-after-reopening.png). This means that whenever you edit this element the class has to be reapplied manually which is a real nuisance. From what I gather this is not caused by a malconfigured HTMLparser_db as I haven't defined any. Additionally all works fine if I define only one element (i.e. only h1) instead of five, like such:

editor:
    config:
        contentsCss: "EXT:my_sitepackage/Resources/Public/Css/rte.css" 

        stylesSet:
            # headers
            - { name: "LLL:EXT:my_sitepackage/Resources/Private/Language/Backend.xlf:header.trenner.name", element: ["h1"] , attributes: { 'class': 'trenner' } }

The above configuration with a Style Set for multiple tags worked flawlessly in TYPO3 8.7.10 with ckeditor 4.7.1 (for some reasons I still had a few of these older installations running up until recently) but it doesn't work in TYPO3 8.7.27 with ckeditor 4.11.3 anymore.


Files

Actions

Also available in: Atom PDF