Allow Youtube videos in tt_news

I was writing some time ago about how to allow Youtube videos in the RTE of TYPO3. Well that solution works for general content but it doesn’t seem to...

I was writing some time ago about how to allow Youtube videos in the RTE of TYPO3. Well that solution works for general content but it doesn’t seem to work for tt_news. However there is a solution for this and you can enjoy Youtube videos even in tt_news content.

In order to allow the embed codes in the tt_news content you need to make a few special configurations. First of all in the root typoscript template setup add the following lines:

RTE.default.proc.allowTags := addToList(iframe,embed,object,param)
RTE.default.proc.entryHTMLparser_db.allowTags := addToList(iframe,embed,object,param)
RTE.default.proc.allowTagsOutside := addToList(iframe,embed,object,param)

plugin.tt_news.displaySingle.content_stdWrap.parseFunc {
	nonTypoTagStdWrap.encapsLines.nonWrappedTag >
	allowTags = script, iframe, param, embed, object, 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
}
plugin.tt_news.general_stdWrap.parseFunc.allowTags := addToList(iframe,embed,object,param,p)

and in the typoscript constants the following code:

styles.content.links.allowTags = b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,
blockquote,strike,del,ins,span,h1,h2,h3,h4,h5,h6,address,iframe,
object,param,embed

Make sure this last setting is on one line. Here it is on multiple lines because otherwise it couldn’t be displayed properly.

Well, with these settings made and after you’ve cleared all caches the Youtube videos should be visible in tt_news.

1 Comment

Leave a Reply

*

*


  • iframe in rte bei tt_news
    29 June 2012 at 17:27

    […] kann das über weitere extensions lösen, aber es geht auch anders. Nach einigem suchen bin ich auf diesen Post aufmerksam geworden, den ich auf deutsch wiedergebe. In den deutschsprachigen Foren habe ich […]