<p>This tests a bug when copying HTML markup inside <pre> tags. When pasted, this content would appear as the rendered form of that markup. You should see markup in the editable region below.</p> | |
<pre id="pre" contenteditable="true"><input type='button'>foo<br>bar<b>baz</b></pre> | |
<script> | |
var pre = document.getElementById("pre"); | |
pre.focus(); | |
document.execCommand("SelectAll"); | |
document.execCommand("Cut"); | |
document.execCommand("Paste"); | |
</script> |