[Typo3] Preserving nested tags in RTE
Wankyu Choi
wankyu at b-trees.net
Wed Feb 9 17:54:52 CET 2005
Hi all,
Please bear with me if this has been already discussed.I'm just cutting my
teeth on Typo3 :-)
I have a very annoying problem with RTE/RTEHTMLArea, that is, any rich text
editor whose content gets cleaned up by the
t3lib_parsehtml_proc->TS_transform_db() call.
The problem is: all nested tags get killed by this transformation; only the
innermost tags survive the transformation process.
For instance, if I put the following block of HTML code into the RTE (source
mode)::
<div class="box">
<div class="title">What's New?</div>
<div class="body">
<div class="content">line 1</div>
<div class="content">line 2</div>
</div>
</div>
I get the following on saving it::
<div class="title">What's New?</div><div class="content">line 1</div><div
class="content">line 2</div>
As you can see, all the outer div's (class 'box' and class 'body') are gone.
I tried disabling the TS_transform_db() call and found the above-said
example preserved (well, with a couple of extra <p></p> tags.)
How can I preserve nested tags, no matter how ugly they may look? Disabling
the TS_transform_db() call looks way too kludgy.
And while we're at it, how can I preserve newlines in RTE? The above example
also shows what I mean by this: all newlines/indentations are gone.
I'd appreciate any comments on these problems.
Thanks in advance.
Regards,
Wankyu Choi
More information about the TYPO3-english
mailing list