Knowledge Article Embedded Video Issue with Iframes removing video on save
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2016 10:32 AM
We have two different Geneva instances. When attempting to embed an iframe youtube video or similar into the source code of a knowledge article, it shows up in the preview Wysiwyg editor but on clicking "Save", the iframe is removed from the code altogether. Has anyone experienced this before?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2016 11:02 AM
The HTML field is based on tinyMCE. There are a number of things that are not allowed. The wiki link below talks about it.
http://wiki.servicenow.com/index.php?title=Using_HTML_Fields#gsc.tab=0
If you could, you would need to add iframe to the extended_valid_elements in the tinymce config, but im not aware of how to do that in servicenow.
There has been questions about customizing the HTML field, but i'd have to agree with Travis Toulson comment about it not being that easy and we would just end making it a normal text field to avoid the editor from remove the html we write.
https://community.servicenow.com/message/723841#723841
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2016 11:30 AM
Thanks Jeff. Think you steered me in the right direction. The HTML Sanitizer Script Include is what's removing any <iframe> tags from my code. I had to set up a whitelist item for iframes to prevent the script include from removing my code.
See here for more info:
HTML Sanitizer - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2016 11:37 AM
No, you actually helped me. After I wrote that I sort felt bad that I didn't really provided any thing useful, because I was just saying that it was restrictive and lousy. I'll take a look at this. Thank you.