[TYPO3-RTE] tinymce_rte templates unwanted wraps and disapearing tag

Thomas Allmer at at delusionworld.com
Tue Mar 31 12:53:07 CEST 2009


Andreas Burg wrote:
> [...]
> Maybe many suggestions on the Net only affect rtehtmlarea.

All this transformation thing is pretty hard to understand and even 
harder to manage... :p

1) TinyMCE also forces images into block elements (p by default)
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/forced_root_block

2) TYPO3 wrapes every "line" in the DB with p tags on it's way to the 
RTE and the FE.

3) BUT as on save from RTE to DB "remaps" all p tags to "lines"(\n) the 
"forced" p tags from TinyMCE doesn't get saved.. so in the db it's just 
<img ... />

4) So if you save a <img ... /> without p tags around it the next time 
you edit it in the RTE you will again see it "in the RTE" even if you 
save again it won't be in the DB (due to the remap..)

5) dam this is complicated...

if you do
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines >

works fine for images, but it will also remove every other "p" tag...

adding img to the list didn't worked for me either still got wrapped 
with "p"... However I guess that's because the image is on it's own line 
(and every line gets wrapped with a p tag... if the image is in the same 
line as some text the img doesn't gets wrapped extra...) if you have a 
<div>asdf</div> it will become <div><p>asdf</p></div> so I guess the div 
didn't get wrapped extra but the "asdf" gets wrapped (=> see point 5)

Everything that works for htmlarea in therms for TYPO3 transformation 
also works for tinymce_rte... (I guess... :p)

If you find a solution - pls let us know... I don't know if it's a bug 
in the transformation method or if it's just that you shouldn't do it...
:p

cheers
-- 
+---------------------------------+-----------------------------------+
| Thomas Allmer                   |   http://www.delusionworld.com    |
| E-mail: at at delusionworld.com    |   phone: +43 699 16217064         |
+---------------------------------+-----------------------------------+


More information about the TYPO3-project-rte mailing list