Edit online

Embedding HTML Content in DITA Topics

The DITA Open Toolkit that comes bundled with Oxygen XML Author includes a pre-installed plugin that allows you to embed well-formed HTML content directly in a DITA topic.

For example, suppose you wanted to embed a YouTube video directly in a DITA topic.

The DITA topic would look like this:
....
<foreign outputclass="html-embed"><![CDATA[
                <iframe width="420" height="315" 
                  src="https://www.youtube.com/embed/qepRkQxhTX" 
                  frameborder="0" allowfullscreen="true">
                </iframe>
                ]]></foreign>
....
The converted HTML output would look like this:
...........
<iframe width="420" height="315" src="https://www.youtube.com/embed/qepRkQxhTX" 
frameborder="0" allowfullscreen="true">
</iframe>
............

The plugin is also available on the oxygenxml GitHub projects page.