902 views

Embedding YouTube videos in knowledge base articles

 

Overview

There are many good reasons for embedding YouTube videos in knowledge base articles and, at times, it can be a requirement.

There are two methods for embedding:

  • YouTube embed link
  • Insert/Edit option

With either method, you can use the HTML Sanitizer to whitelist the respective HTML tag (iframe or object) or set the attribute to false in the dictionary for the knowledge.text field.

 

Embedding with the YouTube embed link
  1. To obtain the YouTube video embed code, open the video, click Share, and select Embed.

    Getting the Embed link of a YouTube video

  2. Copy the code to the clipboard.
  3. Log in to your ServiceNow instance.
  4. Open to the knowledge base article in which you want to embed the video. 
  5. In Text, click at the position where you want the video to appear.
  6. On the HTML editor toolbar, click the source code icon Source Code icon.
  7. Paste the code into the HTML Source Code popup window.
  8. [Optional] In the HTML Source Code popup window, modify the size (width/height) of the video.
  9. Click OK to return to the WYSIWYG editor.
  10. Save the article.
  11. Click View Article and check that the video is embedded correctly.

  

Embedding with the Inset/Edit option
  1. To obtain the YouTube video URL, open the video and copy the URL from the browser tab/window to the clipboard.

    URL of a YouTube video

  2. Log in to your ServiceNow instance.
  3. Open to the knowledge base article in which you want to embed the video..
  4. In Text, click at the position where you want the video to appear.
  5. On the HTML editor toolbar, click the insert/edit video icon Insert/Edito Video icon.
  6. Enter information into each field:
    Type: URL
    Video: (paste in the URL that you copied earlier)
    Size: refer to the Embed code to set the size or entered the desired size in pixels.
  7. Click OK to return to the WYSIWYG editor.
  8. Save the article
  9. Click View Article and check that the video is inserted correctly.

  

Note: These steps can easily be modified for videos from other streaming services, such as Vimeo.

 

Article Information

Last Updated:2017-02-01 08:58:17
Published:2016-03-16