blob: a8fbc887802320efda9f8ffd3bf23382d9dc4295 [file] [log] [blame]
<script>
if (window.testRunner)
testRunner.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>
if (window.internals)
internals.settings.setEditingBehavior("mac");
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>