1 <p>This tests for a bug where newlines would not be preserved during copy/paste. Below you should see two paragaphs containing
"Hello World!" and an empty third paragraph with the caret in it.
</p>
2 <div id=
"root" contenteditable=
"true">Hello World!
<div id=
"div"><br></div></div>
5 root
= document
.getElementById("root");
7 document
.execCommand("SelectAll");
8 document
.execCommand("Copy");
10 selection
= window
.getSelection();
11 div
= document
.getElementById("div");
12 selection
.setPosition(div
, 0);
13 document
.execCommand("Paste");