How to add a video as a catalog Item

davidngu972
Tera Contributor

I added a video to "System UI> Videos" and want to create an item catalog with the video. How do I do so? 

1 ACCEPTED SOLUTION

Follow these steps - 

Go to the script include table and search for HTMLSanitizerConfig find_real_file.png

find_real_file.png

Open the script - after line 15 copy and paste these lines of code - just like the picture below

  embed:{attribute:["src","type","allowfullscreen","allowscriptacces","plugnspage"]},
    object:{attribute:["classid","codebase"]},
    param:{attribute:["name","value"]}

find_real_file.png

after that, you need to set and attribute to false-

you first have to right-click the description in the catalog item to open the context menu -

find_real_file.png

click on "configure Dictionary"

on the bottom of that new page, there is a tab called attributes - you should see a new option - click itfind_real_file.png

now make sure it looks like the picture - once it does click save

find_real_file.png

now type in sys_properties.list in the navigation menu search bar - 

find_real_file.png

now search for this property - "glide.ui.html.editor.extended_valid_elements" property

keep searching it doesnt always popup so try glide.ui.html and look or it on the list -

find_real_file.png

 

open it and add this to the value section and save

a[onclick|href|target|rel|media|hreflang|type|charset|name|rev|shape|coords|download|id|accesskey|class|dir|lang|style|tabindex|title]

find_real_file.png

 

now go back to the catalog item and insert the video back in. and it should work 

find_real_file.png

View solution in original post

10 REPLIES 10

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

Hello ,

In the catalog item Description, there is an option for video. Just click and add it from the library option here is the documentation on it as well.find_real_file.png

find_real_file.png

 

If my answer helped you, mark it as correct and helpful.

When i click save, the video disappears. Any way to resolve this?

By default, the HTML Sanitizer removes videos from HTML fields. To prevent the video from being removed:

  • Add an attribute to the text field on the form that the video is added to: html_sanitize=false. Adding the attribute stops this HTML field from being sanitized in the future.
  • Modify the white list in the script include HTMLSanitizerConfig to add the embed, object, and param attributes. The script include allows the attributes to be used in all HTML fields in the future. For example:
    HTML_WHITELIST :{ 
        globalAttributes:{ 
          attribute:[], 
          attributeValuePattern:{}
        }, 
        embed:{attribute:["src","type","allowfullscreen","allowscriptacces","plugnspage"]},
        object:{attribute:["classid","codebase"]},
        param:{attribute:["name","value"]}
      }
  • Universally override elements that the TinyMCE strips out by adding a list of elements to the glide.ui.html.editor.extended_valid_elements property. For example, add
    a[onclick|href|target|rel|media|hreflang|type|charset|name|rev|shape|coords|download|id|accesskey|class|dir|lang|style|tabindex|title]

can you provide the a screenshot on where i can add that to the 'text field'?