Opened 6 years ago

Last modified 5 years ago

#12073 assigned New Feature

Iframe allow fullscreen

Reported by: Matti Järvinen Owned by: Jakub Ś
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

Currently it is not possible with CKEditor iframe plugin to allow HTML5 video embeds (YouTube, Vimeo etc.) to go fullscreen.

Required attributes to allow fullscreen are:

  • fullscreen="true"
  • allowfullscreen="true"
  • mozallowfullscreen="true"
  • webkitallowfullscreen="true"

Definition for fullscreen, note change label to editor.lang.iframe.allowFullscreen or similar.

{
	id : 'allowFullScreen',
	type : 'checkbox',
	label : 'Allow Fullscreen',
	'default' : '',
	setup : function( element )
	{
		var value = element.hasAttribute( 'fullscreen' );

		this.setValue( value || '' );
	},
	commit : function( element )
	{
		if ( this.getValue() )
		{
			element.setAttribute( 'fullscreen', 'true' );
			element.setAttribute( 'allowfullscreen', 'true' );
			element.setAttribute( 'mozallowfullscreen', 'true' );
			element.setAttribute( 'webkitallowfullscreen', 'true' );
			
		}else
		{
			element.removeAttribute( 'fullscreen' );
			element.removeAttribute( 'allowfullscreen' );
			element.removeAttribute( 'mozallowfullscreen' );
			element.removeAttribute( 'webkitallowfullscreen' );
		}
	}
}

Change History (1)

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy