Subscribe to Acqal

Got Thoughts? Write Us!

Contact
Request
Validate

Approved TYPO3 Agency

Acqal is an approved TYPO3 agency focusing on support, training and website migration.

This means that we...

  • are available on TYPO3.org
  • make substantial contributions to TYPO3 teams
  • are registered as business members of the TYPO3 Association
  • have completed more than four TYPO3 projects
  • have proven our technical abilities with quality TYPO3 extensions
  • use TYPO3 for our own website

Acqal is a TYPO3 Association Business Member

Popular Blog Posts

Blog Topics

Virgil on Twitter

Please wait while virgilhuston tweets load Twitter is loading

Recent Blog Posts

Blog Archives

Allow Youtube and Custom HTML Tags in TYPO3 RTE

Youtube in TYPO3 Frontend

Youtube in TYPO3 Frontend

Selecting Edit Page Properties

Selecting Edit Page Properties

Edit Page TSConfig

Edit Page TSConfig

Edit TypoScript Template Setup

Edit TypoScript Template Setup

Youtube in RTE Source

Youtube in RTE Source

Youtube in RTE WYSIWYG

Youtube in RTE WYSIWYG
Tuesday, February 3, 2009 12:01 AM EST

By: Michael Cannon

voting in progress Submitting your vote...
Rating: 4.8 of 5. 5 vote(s).
Click the rating bar to rate this item.

Social media is an important part of today's website user experience. By default though, TYPO3's RTE doesn't easily allow for including video. After a good bit of testing, Acqal offers the two tips to get videos into your RTE and showing on your website.

Add the following snippet to your root level page and storage folder Page TSConfig. These lines basically say "let these additional HTML be accepted for proper display in the TYPO3 backend."

RTE.default.proc {
# Allow embed (Youtube) HTML tags in the RTE
allowTags := addToList(object,param,embed)
allowTagsOutside := addToList(object,embed)
entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
}

In your website root TypoScript template setup block, add the following snippet. This line tells the front-end RTE processor to  display the additional HTML as intended.

# Allow embed (Youtube) HTML tags in the RTE
lib.parseFunc_RTE.allowTags := addToList(object,param,embed)

By keeping the above method for allowing Youtube videos into the RTE, you can apply the similar principal for custom HTML tags. Either replace the object and other tags above with your custom code or append ",customtag, customtag1, customtagN" to the allowTags or allowTagsOutside addlist to list functions.

An Explanation From TYPO3 Core TS

  • Value modifications: The ":=" operator assigns a value to an object path by calling a predefined function which modifies the existing value of the current object path in different ways.
  • The portion after the “:=”-operator and to the end of the line is split in two parts: A function and a value. The function is specified right next to the operator (trimmed) and holding the value in brackets (not trimmed).
  • Function addToList: Adds a comma-separated list of values to the end of a string value. There is no check for duplicate values, and the list is not sorted in any way.

Reference

Keywords:

  • typo3,rte,typoscript,tsconfig,youtube,flash,object,embed

Please Share This Post

Tweet thisRedditBookmark on deliciousStumble thisShare on Facebook

Send this article via email to your friends and peers.

Leave a Comment

Add comment

* - required field







Notify me when a new comment is added.
By Charles Coleman on Wednesday, December 31, 1969 7:46 PM EST
Gravatar: Charles Coleman Are you using pseudo code above or is there new commands in TS that I do not know about...

1. Why are you using ":=" instead of "="
2. Is "addToList()" actual TS or are you just saying to add your custom tag to the long list other typical allowed html tags such as p,span,div,...?
By Michael Cannon on Wednesday, December 31, 1969 7:51 PM EST
Gravatar: Michael Cannon Charles, there's no pseudo code in above. The := means that a function is to be called and addToList is the function.

Per TYPO3 Core TS doc:
* Value modifications: The ":=" operator assigns a value to an object path by calling a predefined function which modifies the existing value of the current object path in different ways.
* The portion after the “:=”-operator and to the end of the line is split in two parts: A function and a value. The function is specified right next to the operator (trimmed) and holding the value in brackets (not trimmed).
* addToList: Adds a comma-separated list of values to the end of a string value. There is no check for duplicate values, and the list is not sorted in any way.

Ref: http://typo3.org/documentation/document-library/core-documentation/doc_core_ts/4.1.0/view/1/2/
By Michael Cannon on Wednesday, December 31, 1969 7:55 PM EST
Gravatar: Michael Cannon For some of our client sites, we've even been able to enable adding JavaScript and forms this way.

The tags are `script` and 'form,select,input,textarea,option`.
By Charles Coleman on Wednesday, December 31, 1969 7:59 PM EST
Gravatar: Charles Coleman I was not aware that operators could be used in TS. Thank you very much for commenting on that!
By hassan fitt on Wednesday, December 31, 1969 8:59 PM EST
Gravatar: hassan fitt i will unblock only one day
By Anees on Tuesday, June 9, 2009 12:46 PM EDT
Gravatar: Anees Hi,
This is very good website for typo3 developers to find the solution of their problems, but I didn't found the topic helpful in my case, I want to enable the strike tag in rte, I follow the whole procedure you defined and add del,strike in place of object,param,embed in your code, but that not enables the del or strike tags for me. Do you have any idea why it is not working in my case?

Thanks
By Michael Cannon on Tuesday, June 9, 2009 8:46 PM EDT
Gravatar: Michael Cannon Anees, it sounds like you need to let the RTE process strike tags. Try the following.
RTE.default.proc.entryHTMLparser_db.removeTags := removeFromList(strike)

In your page TSconfig.

If that doesn't work because the strike tag isn't being inserted, try this.
RTE.default.buttons.inserttag.denyTags := removeFromList(strike)
By Anees on Thursday, June 11, 2009 11:35 AM EDT
Gravatar: Anees Hi Michael Cannon,
Thanks for your reply, I have tried it but still del and strike are not enable for me.
By Michael Cannon on Thursday, June 11, 2009 11:36 AM EDT
Gravatar: Michael Cannon If you put the RTE in demo mode, does strike work?
By Anees on Thursday, June 11, 2009 11:51 AM EDT
Gravatar: Anees yes works for both del and strike for 1 time then if I toggle to source then html strike removed but del is still there
By Michael Cannon on Thursday, June 11, 2009 11:59 AM EDT
Gravatar: Michael Cannon I'm a little stumped without testing, if you'd like resolution at this point, I'd suggest putting in a support request via http://www.acqal.com/contact-us/.
By rapid4me on Thursday, January 14, 2010 8:29 AM EST
Gravatar: rapid4me I am a biginner typo3 developer and this info is just what I was looking for. Thanks you!
By Sohbet on Sunday, March 21, 2010 4:12 AM EDT
Gravatar: Sohbet <a href="http://www.webhane.com" title="Sohbet">Sohbet</a>
<a href="http://www.webhane.com" title="Chat">Chat</a>


Hey Admin! Thanks, Forever web pages..
By hd film izle efe on Friday, April 23, 2010 10:40 AM EDT
Gravatar: hd film izle efe good work admin my website welcome :)
By Medyumlar on Thursday, April 29, 2010 10:34 AM EDT
Gravatar: Medyumlar I was not aware that operators could be used in TS. Thank you very much for commenting on that!
By Sohbet chat on Saturday, June 5, 2010 12:38 PM EDT
Gravatar: Sohbet chat Como se comento anteriormente en el barrio existe una sola infraestructura educativa en el que funcionan 3 unidades educativas: Walter Alpire Duran (turno mañana), <a href="http://www.sohbetnl.com" title="chat, sohbet odaları" target="_blank">Sohbet</a> Roberto Alvarado Daza (turno tarde), Nocturno Rio Seco.

Desde hace 5 años el Gobierno Municipal de El Alto y la Prefectura del Departamento de La Paz impulsaron <a href="http://www.sohbetnl.com" title="sohbet, chat odaları" target="_blank">Chat</a> un programa de Alfabetización Digital, la primera etapa del Programa consistía en implementar <a href="http://www.sohbetnl.com" title="sohbet siteleri, sohbet sitesi" target="_blank">Sohbet Siteleri</a> los laboratorios pues la gran mayoría no disponía de ellos, posteriormente se procedió a contratar estudiantes de Informática e Ingeniería <a href="http://www.sohbetnl.com" title="chat siteleri, chat sitesi" target="_blank">Chat Siteleri</a> de Sistemas para fungir como Docentes de Computación de dichos laboratorios, pero la curricula se limitaba al uso del Sistema Operativo (Windows) <a href="http://mirc.sohbetnl.com" title="Mirc indir, Mirc, Mirc yükle, Mirc sohbet, Mirc chat">Mirc indir</a> y el manejo de su suite ofimática.
By Muhabbet on Saturday, June 5, 2010 12:49 PM EDT
Gravatar: Muhabbet Thank you admin...
By chatodalari chat on Sunday, July 18, 2010 5:03 PM EDT
Gravatar: chatodalari chat <a href="http://www.chatodalari.wordpress.com/" title="chat odaları">chat odaları</a>
By chatodalari on Sunday, July 18, 2010 5:04 PM EDT
Gravatar: chatodalari <a href="http://www.chatodalari.wordpress.com/" title="chat odaları">chat odaları</a>
By Kızlık Zarı Meme Büyütme on Thursday, August 5, 2010 6:37 PM EDT
Gravatar: Kızlık Zarı Meme Büyütme Thank you admin... <a href="http://www.uzamakistiyorum.net" target="_blank">boy uzatma</a><span class="line-break">&nbsp;</span><a href="http://www.bayanlarda-cinsellik.tk" target="_blank">kızlık zarı</a><span class="line-break">&nbsp;</span><a href="http://www.5sey.com" target="_blank">5sey</a> <a href="http://www.uzamakistiyorum.com" target="_blank">boy uzatma</a>
By Makita TW0350 on Tuesday, August 24, 2010 8:57 AM EDT
Gravatar: Makita TW0350 An individual may easily know whereas your family seem to be and therefore indulge in going through the house. A person could certainly learn when the public are and additionally benefit from engaging in the idea. In the event that the public are usually shopping for the purpose of some sort of most people will need to contemplate obtaining an important via a often the protect. You might master when most people may be and also indulge in following through on the item. Our ideal is normally without doubt the following is normally the exact most effective strategy so that you can check out in advance. Many of us urge which you'll also give consideration to flipping time frame directly into getting beneficial.
By medyum medyum on Sunday, August 29, 2010 3:00 PM EDT
Gravatar: medyum medyum great thank you. I wish you continued success