132 views

Embedding You Tube Videos in Knowledge base articles.

 

Overview :

Sometimes there are requirement that a Youtube video needs to be embedded in the Knowledge base article.

 

There is an easy way on how you can embed a You tube video using HTML Sanitizer.

 

  1. Go to the Script Includes HTMLSanitizerConfig on your instance.
  2. In Line number 11 of the script include add the following code mentioned in Step 3 to whitelist the You tube attributes. (Screen shot attached)
  3. iframe:{ 
    attribute:["width", "height", "src", "frameborder", "allowfullscreen"],},
  4. After making this change and saving the script include, go to any Knowledge article and in the TEXT area, go to source code and add the embed url which you get it on youtube something like below  (Screen shot 2 , Screenshot 3 on how to reach to youtube embed Video link)
  5. <iframe width="560" height="315" src="https://www.youtube.com/embed/gBa3eiAmKgA" frameborder="0" allowfullscreen></iframe>
  6. Add this embed url to the source code of this Article Text, save it and then view the article. 
  7. Save the Article and the Youtube video is now embedded in the Knowledge base. (Screen shot 5 )

Article Information

Last Updated:2017-11-14 06:48:43
Published:2017-11-14