[TYPO3-english] Problem with crop and text field with line breaks

Peter Klein pmk at io.dk
Wed Nov 18 14:42:35 CET 2009


Hej Brian.

The standard "crop" function doesn't respect HTML tags, so you should use 
stripHtml = 1 before you crop.

Or if you want to preserve the HTML formatting, use this extension:
http://typo3.org/extensions/repository/view/pmkhtmlcrop/current/

It has same parameters as the standard "crop" + more.

--
Peter Klein


"Brian Bendtsen" <bb at bellevuevej.dk> wrote in message 
news:mailman.1.1258548266.20779.typo3-english at lists.typo3.org...
> Hi
>
> This is driving me crazy.
>
> Im using the crop function on a text field, but somehow the output gets 
> messed up if there is a linebreak in the text field.
>
> ts:
>
> lib.mytextfield.crop = 100 | ... | 1
>
> the output looks like this:
>
> <div id="mytextfield">
>  <p class="bodytext">
>   this is my text before linebreak </p>
>  <.../p>
> </div>
>
> The <.../p> is the problem here. What can I do to prevent this from 
> happening? Any help is appreciated
>
> /Brian 




More information about the TYPO3-english mailing list