Try our conversational search powered by Generative AI!

Tinymce removes the allowfullscreen attribute from the youtube share code (iframe tag).


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:

More info:


Edited, Dec 01, 2016 21:52

Hey Rolle! Check out this link:

The only minor change to that post is what Linus Ekström mentioned in the comments about ServerSideOnly.

So for your case, the class would look like this:

[TinyMCEPluginNonVisual(ServerSideOnly = true, PlugInName = "TinyMceExtendedValidElements", AlwaysEnabled = true, EditorInitConfigurationOptions = "{ extended_valid_elements: 'iframe[allowfullscreen|src|frameborder=0|alt|title|width|height|align|name]' }")]
public class TinyMceExtendedValidElements

You can add that anywhere in your project.

Then add the configuration in web.config:

	... some configuration ... 
	<tinyMCE mergedConfigurationProperties="valid_elements, extended_valid_elements, invalid_elements, valid_child_elements" />

And that's it!

Dec 10, 2016 7:06
* 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.