Learn about the top 2016 CMS trends. Read on.


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

From February 3, 2009

Still stuck? Write us.

  • 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/

  • 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`.

  • 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

  • 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)
  • Hi Michael Cannon,
    Thanks for your reply, I have tried it but still del and strike are not enable for me.

  • 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

  • If you put the RTE in demo mode, does strike work?

  • I’m a little stumped without testing, if you’d like resolution at this point, I’d suggest putting in a support request via .

  • Pradeep Chauhan

    Thanks for posting…It helps me…..
    Hope we get more help from side…!!

    • Great to know that this older content is still helping out Pradeep.