user500665
user500665

Reputation: 1364

TYPO3 custom styles in RTE?

I am using TYPO3 7.6.4. In my TSConfig I am using this to add custom styles:

RTE.classes{
  highlight{
      name = highlight
      value = color:#636466; font-size:15px;
  } 
  brown{
      name = braun
      value = color:#9A3811;
  }
}

RTE.default{
      ignoreMainStyleOverride = 1 
      useCSS = 1
      showTagFreeClasses = 1
      contentCSS = fileadmin/templates/css/rte.css
      buttons {
        blockstyle.tags.div.allowedClasses := addToList(highlight, brown)
        blockstyle.tags.p.allowedClasses := addToList(highlight, brown)
        textstyle.tags.span.allowedClasses := addToList(highlight, brown)
      }
      proc.allowedClasses := addToList(highlight, brown)
    }

1) Instead of specifying div, p, span, is there a way to add available classes to all tags?

2) Do I need to have the RTE.classes part if I have made an external RTE style sheet?

Upvotes: 1

Views: 1373

Answers (1)

ESP32
ESP32

Reputation: 8723

ad 1.)

blockstyle.tags.all.allowedClasses should work if I read https://docs.typo3.org/typo3cms/extensions/rtehtmlarea/Configuration/PageTsconfig/interfaceConfiguration/Index.html correctly.

ad 2.) yes, otherwise RTE will not show you the drop down for selection of the classes

Upvotes: 1

Related Questions