[TYPO3-RTE] (no subject)

rte htmlarea rte-htmlarea at mail.ru
Fri Mar 16 18:16:39 CET 2007


Hallo, people.

I have problem embeding videos int tt_news bodytext field.

My aim is to make the following scenario working:

    1. Redactor opens news
    2. switches bodytext to html mode
    3. pastes the code like this 

          <OBJECT width="295" height="273">
	      <PARAM name="movie" value="http://video.rutube.ru/34cd18b7be4e54bcfcdc2ff28424108b" />
	<PARAM name="wmode" value="transparent" />
	<EMBED src="http://video.rutube.ru/34cd18b7be4e54bcfcdc2ff28424108b" type="application/x-shockwave-flash" wmode="transparent" width="295" height="273" />
</OBJECT>
        there
     4. switches back to WYSIWYG mode 
     5. saves changes.        

I use typo3 3.8.1 with rte-htmlarea 1.3.7 with default settings except of following

*********************************************************************************
# to prevent images before links
RTE.classesAnchor >
RTE.classes >

# to enable underlined text & object/embed tags
RTE.config.tt_news.bodytext {
   allowTags = object, param, embed, a, abbr, acronym, address, blockquote, b, br, caption, center, cite, code, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, link, ol, p, pre, q, sdfield, span, strike, strong, sub, sup, table, thead, tbody, tfoot, td, th, tr, tt, u, ul
   removeTags = center, font, sdfield, strike
   proc {
             entryHTMLparser_db = 1
             entryHTMLparser_db {
                    allowTags = object, param, embed, a, abbr, acronym, address, blockquote, b, br, caption, center, cite, code, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, link, ol, p, pre, q, sdfield, span, strike, strong, sub, sup, table, thead, tbody, tfoot, td, th, tr, tt, u, ul
                    removeTags = center, font, sdfield, strike
             }
   }
}

# i do not want any transformation 
RTE.config.tt_news.bodytext.proc.overruleMode = none
*********************************************************************************

After news was saved 1st time database field contains following:

*********************************************************************************
 <p>Here i put video<embed wmode="transparent" type="application/x-shockwave-flash" height="273" width="295" src="http://video.rutube.ru/34cd18b7be4e54bcfcdc2ff28424108b"></embed> </p>
*********************************************************************************

As you can see that originally inserted html code was 'slightly' changed and 
<object> tag has been replaced with <embed> tag. This is bad but not critical bacause
video is still available and nothing is corrupted.

Next, i open again the same news and simply save it again without any change.
The data base content looks now so:
*********************************************************************************
| <p>Here i put video<embed wmode="transparent" type="application/x-shockwave-flash" height="273" width="295" src="http://video.rutube.ru/34cd18b7be4e54bcfcdc2ff28424108b"></embed></embed>&lt;//embed&gt; </p> 
*********************************************************************************

That is: one </embed> tag was added as well as one escaped </embed> tag.

If i press save again then i can see the following:
*********************************************************************************
| <p>Here i put video<embed wmode="transparent" type="application/x-shockwave-flash" height="273" width="295" src="http://video.rutube.ru/34cd18b7be4e54bcfcdc2ff28424108b"></embed></embed>&lt;//embed&gt;</embed>&lt;//embed&gt;&lt;//embed&gt; </p> |
*********************************************************************************

and so on ...

So, how can i prevent RTE doing any transformation at least for <object> construct?
The best solution for me would be NO TRANSFORMATION at all.

Thank you in advance,  
Vitali.


More information about the TYPO3-project-rte mailing list