blob: c3ade49b4eb46ffe2d49a695840627d6fd9a3091 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<script src="../../resources/dump-as-markup.js"></script>
<style>
div {
border: 1px solid red;
margin: 2px;
}
</style>
<p id="description">The code in paste that prevents block nesting had a bug where the order of pasted paragraphs could be reversed.</p>
<div id="test" contenteditable="true"><br></div>
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
var s = window.getSelection();
var e = document.getElementById("test");
s.collapse(e, 0);
document.execCommand("InsertHTML", false, "There should be an empty line between these two paragraphs.<span><div><br></div></span><div>This paragraph and the empty line should have be in their own divs with a red border.</div>");
Markup.description(document.getElementById('description').textContent);
Markup.dump(e);
</script>
|