Step by step instructions to allow videos to be embedded in Knowledge articles


Description

We need to be able to embed links to "external" videos in our knowledge articles. We have tried several suggestions from the community and have followed the steps from "Embed videos in HTML fields" but we still are not successful in getting videos to stay and play when we add them to an article. The video will show up in the article and play but once we submit and look at the article the video is not there.

Steps to Reproduce

  1. Go to any Knowledge Base
  2. Click on "Create an Article"
  3. Add any Category and Valid To date
  4. Copy embedded code from a web site, for example:
    <iframe src="https://www.youtube.com/embed/QZkOXfYdipI" width="560" height="315"></iframe>
  5. Click on <> Source Code and insert the code (The video shows up in the Article Body and will play)
  6. Click Submit and Publish
  7. Go to the article
    • The code has been stripped out, no video shows up.

Release or Environment

London, Madrid

Resolution

Follow the directions documented in Embed videos in HTML fields

  1. Add the html_sanitize attribute with a value of false to the Article body dictionary entry.
  2. Go to any Knowledge Base
  3. Click on "Create an Article"
  4. Copy embedded code from a web site:
     <iframe width="560" height="315" src="https://www.youtube.com/embed/QZkOXfYdipI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  5. Click on <> Source Code and insert code (The video shows up in the Article Body and will play)
  6. Click submit and Publish
  7. Open the article and observe that video is displayed correctly and will play