blob: 6834ecedcbf0e91816644c7a0e0eba216fc5e7b3 [file] [log] [blame]
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
</script>
<div id="test" contenteditable="true">The second word, and only the second word of this sentence should have a red background color.</div>
<script>
var sel = window.getSelection();
var e = document.getElementById("test");
sel.setPosition(e, 0);
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("extend", "backward", "word");
document.execCommand("HiliteColor", false, "red");
sel.modify("move", "backward", "line");
</script>