0
votes

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 ??

2
why do you bother? Usually our content should be wrapped in p-Tags or other block elements, if you add tables f.e. I would not recommend to change this behavior. What is the real problem?maholtz
I don't know what is the real problem (the < p > tags shift down the text in FE). I think that nobody can help me. Probably it's a dummy issue and it's due to my incompetence in Typo3. But thanks anyway.RikiRiocma

2 Answers

3
votes

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 >
0
votes
// 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