blob: d1f5867e3369c02dc22206f468ce206043e870ea [file] [log] [blame]
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
</script>
<p>This tests inserting a paragraph separator before a horizontal rule. You should see 'foo', empty paragraph, horizontal rule, 'bar', and the caret should be just before the horizontal rule.</p>
<div contenteditable="true" id="div">foo<hr>bar</div>
<script>
var sel = window.getSelection();
var div = document.getElementById("div");
sel.setPosition(div, 0);
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "character");
document.execCommand("InsertParagraph");
</script>