Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
<iframe width="560" height="315" src="@Model.PropertyForYoutubePlaylistUrl" frameborder="0" allowfullscreen></iframe>
Go to youtube, select a playlist, then click on "Share", there you'll see some code (iframe), take the url and do whatever you want with it.
My costumer would like to copy the share code from youtube and then paste it into the wysiwyg html editor (tinymce - XhtmlString property), but
the problem is that the tinymce removes the allowfullscreen attribute from the iframe tag.
Does anyone know how to allow allowfullscreen attribute in the iframe tag?
Here is the sample code:
<iframe width="560" height="315" src="https://www.youtube.com/embed/A_86zcpwlIk" frameborder="0" allowfullscreen></iframe>
Hi!
I wrote a blog post on creating a featured videos block in Episerver, with code samples that work with YouTube Data API v3. You can check it out here:
As for the stripping out of tags in the TinyMCE editor, you need to create a custom editor and use extended_valid_elements. Here is a quick snippet of how that would look:
[TinyMCEPlugin(AlwaysEnabled = true, EditorInitConfigurationOptions = "{ extended_valid_elements: 'allowfullscreen' }", PlugInName = "ExtendedValidElements", ServerSideOnly = true)] public class TinyMceExtendedValidElements { }
You can read more about customising the TinyMCE editor here:
http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/8/Editing/Customizing-the-TinyMCE-editor/
Hope this helps!
John
There is also a YouTube content provider available on GitHub: https://github.com/episerver/YouTubeContentProvider
I want to display the youtube content dynamically in the page.