blob: bd39890a7e40d0163e8f01bece7d6312f0b9717d [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
padding: 12px;
font-size: 24px;
}
</style>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
// There was a bug when pasting at the end of the block. The content was inserted at the
// start of the block instead of the end. This tests the insert-at-end case.
function editingTest() {
for (i = 0; i < 31; i++)
moveSelectionForwardByCharacterCommand();
for (i = 0; i < 7; i++)
extendSelectionForwardByCharacterCommand();
copyCommand();
moveSelectionForwardByCharacterCommand();
insertLineBreakCommand();
insertLineBreakCommand();
pasteCommand();
pasteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body contenteditable id="root">
<div class="editing" id="test">There is a tide in the affairs of men.</div>
<script>
runEditingTest();
</script>
</body>
</html>