Embedding You Tube Videos in Knowledge base articles.
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.
- Go to the Script Includes HTMLSanitizerConfig on your instance.
- 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)
attribute:["width", "height", "src", "frameborder", "allowfullscreen"],},
- 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)
- <iframe width="560" height="315" src="https://www.youtube.com/embed/gBa3eiAmKgA" frameborder="0" allowfullscreen></iframe>
- Add this embed url to the source code of this Article Text, save it and then view the article.
- Save the Article and the Youtube video is now embedded in the Knowledge base. (Screen shot 5 )