[Typo3] HR disappearing in RTE

Daniel Parrott danpm44 at hotmail.com
Mon Apr 4 05:20:33 CEST 2005


Thanks Peter,

Tried the code in the parsehtml_proc class which helped but didn't solve
the problem.  Got to an 'acceptable' level with a crude workaround
stripping white space and pagagraph tags from around <HR>s.  Didn't try
the rtehtmlarea class - the project is close to completion, people are using
the standard IE-only rte and I'm not game to change now - but I'm looking
at rtehtmlarea and may use it as standard in future.

Thanks again,
Daniel

Code:
    function TS_transform_rte($value,$css=0)    {
        ...
        
        //return implode(chr(10),$blockSplit);
        $retString =  implode(chr(10),$blockSplit);
        //remove whitespacse,paragraphs around hr
        $retString=eregi_replace('\s*<HR>\s*','<HR>',$retString);
        $retString=eregi_replace('<p><HR></p>','<HR>',$retString);
        //t3lib_div::debug($retString);
        return $retString;
    }

    function TS_transform_db($value,$css=FALSE) {
        //remove whitespace,paragraphs around hr
        $value=eregi_replace('\s*<HR>\s*','<HR>',$value);
        $value=eregi_replace('<p><HR></p>','<HR>',$value);
        //t3lib_div::debug($value);
        ...




More information about the TYPO3-english mailing list