Site Navigation

Aug 19, 2014

Insert an HTML File into MarkDown a File

HTML5 Logo

I was looking into a way to include an iFrame in a MarkDown document. The goal is to include an HTML file seamlessly. The contents of the file should like it is part of the output. This is the solution I came across. It seems to work well in Webkit browsers. The HTML file looks like it is part of the document.

In Firefox and IE, the document is included as an iFrame with a default height (200px I think). The width is 100%. So this is not a perfect solution, but probably good enough for my purposes.

According to the documentation, only pixels should be used for an iFrame. That seems a bit short sited given all the different devices out there.

   1 <div style="height:100%;">
   2 <iframe src="file.html" style="height:100%;width:100%;" seamless="seamless"></iframe>
   3 </div>
Post a Comment

Favorite Links Feed