typo3

Add custom class for links in RTE

Introduction#

Here is a quick example to see how it is possible to add custom classes for links in TYPO3 RTE.

Add custom link classes

RTE {
    classes {
        btn-lg {
            name = Button (large)
            requires = btn btn-default
        }

        btn-default {
            name = Button (default)
            requires = btn
        }
    }

    default {
        buttons.link.properties.class.allowedClasses := addToList(btn-lg, btn-default)
        proc.allowedClasses := addToList(btn-lg, btn-default)
    }
}

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow