blob: 99122ff9c6c9372f972ee277dbc4eb9b08e0973b (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<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>
function editingTest() {
for (i = 0; i < 4; i++)
moveSelectionForwardByCharacterCommand();
deleteCommand();
for (i = 0; i < 4; i++)
moveSelectionForwardByCharacterCommand();
deleteCommand();
for (i = 0; i < 6; i++)
moveSelectionForwardByCharacterCommand();
deleteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body>
<div contenteditable id="root" class="editing">
<div id="test">
One
<div>Two<br><div>Three<br></div></div>
Four
</div>
</div>
<script>
runEditingTest();
</script>
</body>
</html>
|