1 <p>This tests for a bug where copied links wouldn't be pasted as links at certain positions.
</p>
2 <div id=
"div" contenteditable=
"true">This should be plain text.
<div>This should be plain text.
</div></div>
5 var div
= document
.getElementById("div");
6 var sel
= window
.getSelection();
8 sel
.collapse(div
, div
.childNodes
.length
);
9 document
.execCommand("InsertHTML", false, "<a href='http://www.google.com/'>This should be a link.</a>")