Upon further investigation, it appears that using an iframe is the more suitable method for displaying HTML content. Instead of providing an external link to a webpage, you can directly load raw HTML into the iframe. Additionally, you have the flexibility to embed a stylesheet within the iframe without affecting the styling of the rest of your website, making it perfect for themes. For reference, you can view the jsfiddle here.
HTML
<textarea id="editor"><p>This is plain html to keep it simple. In my
application, this would be Markdown text and converted to HTML by a
Markdown converter in JavaScript.</p></textarea>
<iframe id="preview"></iframe>
JavaScript
var html = document.getElementById('editor').value;
head = '<style type="text/css">#inner {color: blue; margin: auto; zoom: 0.6; -moz-transform: scale(0.6); -moz-transform-origin: 0 0;}</style>';
var body = '<div id="inner">' + html + '</div>';
var preview = document.getElementById('preview').contentWindow.document;
preview.head.innerHTML = head;
preview.body.innerHTML = body;
CSS
#editor, #preview {
height: 300px;
width: 200px;
}
textarea {
resize: none;
}