Try our conversational search powered by Generative AI!

How to display youtube content for a particular playlist in web page or block


I want to display the youtube content dynamically in the page.

Jul 28, 2016 14:07

<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.

Jul 28, 2016 16:51

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="" frameborder="0" allowfullscreen></iframe>

Dec 01, 2016 21:35


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:

Hope this helps!


Edited, Dec 02, 2016 18:27

There is also a YouTube content provider available on GitHub:

Dec 03, 2016 6:39
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.