[TYPO3-rte] How to remove p tags from img in HtmlArea RTE

nikos nick at jamalade.com
Wed Mar 27 00:08:09 CET 2013


Unfortunately not the result that I wanted as it appears all <p> tags 
are removed!
I just want to remove <p> tags that are inserted around <img /> aghhh!

No hair left now!

Nikos

On 26/03/2013 00:12, nikos wrote:
> Hi,
>
> got the result I wanted by using:
> lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.encapsTagList:=
> addToList(img)
>
> not sure this is the best way, it doesn't remove the <p> </p> wrapping
> <img/> in RTE but does in the output to FE which will do for now at least!
>
> Any better solutions welcome
>
> Nikos
>
> On 25/03/2013 10:32, nikos wrote:
>> Hi
>>
>> I am using Typo3 v 6.04 and would really like to insert images from RTE
>> without it being wrapped with <p> </p>.
>>
>> I have tried :
>>
>> RTE.default.proc.allowTagsOutside:= addToList(img)
>>
>> But when saving the content element, in RTE, the img tag is wrapped in
>> the p tags and ends up like:
>>      <p><img src="where/image/is/mypic.jpg" ... /></p>
>>
>> which is also rendered in the front end.
>>
>> The reason I want to do this is that I would like to wrap my image in
>> <div class="myClass> <img <src="where/image/is/mypic.jpg" ... /> </div>
>>
>> I have also in desperation tried adding the following too
>>
>> RTE.default.proc.entryHTMLparser_db.allowTagsOutside <
>> RTE.default.proc.allowTagsOutside
>> RTE.default.proc.exitHTMLparser_db.allowTagsOutside <
>> RTE.default.proc.allowTagsOutside
>>
>> Have tried google, looked din the manual butleft pulling what hair I
>> have left out!
>>
>> Thanks for your help
>>
>> Nikos
>



More information about the TYPO3-project-rte mailing list