<p>This tests for a bug where a copied link wouldn't paste as a link. Both editable regions below should contain a link "Hello\nWorld".</p> | |
<div id="copy" contenteditable="true"> | |
<a href="http://www.apple.com/">Hello<br>World</a> | |
</div> | |
<div id="paste" contenteditable="true"><br></div> | |
<script> | |
copy = document.getElementById("copy"); | |
copy.focus(); | |
document.execCommand("Copy"); | |
paste = document.getElementById("paste"); | |
paste.focus(); | |
document.execCommand("Paste"); | |
</script> |