Question

Hello I'm getting crazy around a dummy problem: how to remove paragraph tags < p > that RTE (in Typo3 6.1.7) adds oafter saving some text contents. I wish to add some images here to better explain this funny thing but I can't since I've not (yet) enough reputation.

BTW I put the images on an external site:

http://s16.postimg.org/uqbu40fut/rte_ptags_1.jpg

http://s16.postimg.org/7q56roi11/rte_ptags_3.jpg

The first image is a text entered in RTE; the second image (not shown here for the same reputation matter) is the same text shown in the "<>" raw view; the last image is what I see in raw view AFTER saving the content element.

I think that I must do something in the template or in the Typoscritp settings to remove these < p > useless tags... But what ??

Was it helpful?

Solution

Those <p> tags are enabled by default because in most cases you want your Text wrapped in propper HTML markup. However, typing your question into google, gets me to this two lines of Typoscript, wich I just tested on a 6.1.7 and which seem to do the job:

tt_content.stdWrap.dataWrap >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines >

OTHER TIPS

// Remove Class Of <p class="bodytext">

lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.addAttributes.P.class =

// Remove P tag
tt_content.stdWrap.innerWrap >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines >

//Remove Extra Figure Tag of Image
tt_content.image.20.renderMethod = figure
tt_content.image.20.rendering.figure
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top