Formatting: Youtube Video


About

Formatting YouTube Video is a configuration that can be added to the IFRAME element of a YouTube video.



Specification




Configuration



Description

box
Value Preview
none
border
shadow

formatting
By default, the system will process all IFRAME elements with a src https://www.youtube.com/embed/** that placed at supported section (in data specifications). By setting the value to no in this configuration, the corresponding IFRAME element will not be processed with formatting (it will use the browser's default style).



Usage

  1. This formatting will process all IFRAME elements that load YouTube videos, specifically those with a src attribute that begins with https://www.youtube.com/embed/.

            
    <iframe src="https://www.youtube.com/embed/***"></iframe>
            
          

    Note: In the HTML above, no configuration has been added. All configurations will take the Default Value.

  2. Add the desired configuration by adding the attribute
    data-configuration-name='Value' to the IFRAME element.

    Example:
            
    <iframe src="https://www.youtube.com/embed/***" data-box="shadow"></iframe>
            
          




Others

  • This formatting will also automatically display YouTube videos as responsive (the video width will adjust to the width of the available area). The width and height attributes on the iframe element will be ignored.
Have Question?