Adding embedded HTML frames (such as YouTube videos) to DITA WebHelp output
-
Edit the DITA topic and insert a reference to the embedded object by using the
Insert Media Object toolbar action or by manually adding an
objectelement, as in one of the following examples:<object outputclass="iframe" data="https://www.youtube.com/embed/m_vv2s5Trn4"/>or, instead of thedataattribute, you can specify the object using a parameter like this:<object outputclass="iframe"> <param name="src" value="http://www.youtube.com/embed/m_vv2s5Trn4"/> </object> -
If you want the video to be allowed to play in full screen mode once the
document is converted to XHTML output, also add an
allowfullscreenparameter and set its value to true:<object outputclass="iframe" data="https://www.youtube.com/embed/m_vv2s5Trn4"/> <param name="allowfullscreen" value="true"/> </object>Tip: If you copy the embed code from the source and paste it into the Insert Media dialog box), theallowfullscreenparameter will automatically be added and all you have to do is set the value to true. -
Apply a DITA to WebHelp transformation to obtain the output.
<iframe controls="controls" src="https://www.youtube.com/embed/m_vv2s5Trn4"> </iframe>For more information, see the following video demonstration:
object element to an HTML5
iframe element.