Search code examples
typo3typoscripttypo3-7.6.x

Is there a way to include a custom user class in RTE link wizard?


Users would like to add custom classes to links in RTE link wizard. I don't see any documentation about this feature.

enter image description here


Solution

  • On TYPO3 7 you have to add the followint Page TSConfig:

    RTE.classesAnchor.myown-link {
      class = myown-link
      type = page
      titleText = My Own Link
      altText = My Own Link
      }
    
    RTE.default.buttons.link.properties.class.allowedClasses := addToList(myown-link)
    RTE.default.proc.allowedClasses := addToList(myown-link)
    

    See the documentation here and this answer, too