Search code examples
configurationconfigtypo3typoscriptrte

RTE should not wrap a <p> tag around an <img> tag


I work with the RTE and it makes me angry that the RTE does wrap <p> tags around an <img> tag. What do I have to do that the RTE does not wrap <p> tags around the <img> tag?


Solution

  • In your PageTSConfig something like this

    RTE.default.proc.allowTagsOutside = img,hr
    

    or

    RTE.default.proc.allowTagsOutside := addToList(img)
    

    if you want the previous settings and the img additionally