[TYPO3] RTE Htmlarea empty paragraphs before and after list

Andreas Otto andreas.otto at dkd.de
Wed Dec 13 15:12:37 CET 2006


Hi,

Andreas Otto wrote:
> Does anyone have an idea how to get rid of the empty paragraphs?

It looks like I have found a solution we can live with.

We are using the following TS setup:

# Re-define typolist and ul
tt_content.text.20.parseFunc.tags {
        typolist {
                default {
                        split.1.textStyle >
                        split.1.wrap = <li>|</li>
                        wrap = <ul>|</ul>
                }
                1 < .default
                2 < .default
                3 < .default
                4 < .default
        }
        ul >
        ul = TEXT
        ul {
                breakoutTypoTagContent = 1
                current = 1
                wrap = <ul> | </ul>
                parseFunc < tt_content.text.20.parseFunc.tags.typolist.default.parseFunc
                parseFunc.allowTags =
b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ol,blockquote,strike,span,h1,h2,h3,h4,h5
                stripNL = 1
        }
}

Where stripNL = 1 helps to get rid of the empty paragraphs.

The downside is that the HTML output does not look so pretty, but we can
live with that.

HTML Output:

<p>Ein Absatz mit Text. </p><ul> <li><a href="index.php?id=54" target="page"
>Punkt 1</a></li> <li>Punkt 2</li> <li>Punkt 3</li></ul><p> Ein Absatz mit
Text.
</p>
<p>Ein Absatz über<br />zwei Zeilen.
</p>
<p>Ein Absatz.<br /></p>

Because of stripNL = 1 the newlines before and after the list are removed
which results in a concatenated string.

If anyone has a nicer solution, you are welcome to share your solution.


Cheers,
Andreas

-- 
Andreas Otto

d.k.d Internet Service GmbH
Kaiserstraße 79
60329 Frankfurt / Main
Fon: +49 69 43056170
Fax: +49 69 43056190
Mail: andreas.otto at dkd.de
Home: www.dkd.de



More information about the TYPO3-english mailing list