blob: aec31d40398cfa0ecba69d75a1109c865d6c78a6 (
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
|
<html>
<body>
<div>
This tests outdenting "three". You should see 2 and 3 before "three" and "four" respectively.
<ol id="e" contenteditable="true">
<li>one</li>
<ol><li>two</li>
<li id="test">three</li></ol>
<li>four</li>
</ol>
</div>
<ul>
<li>Before:<span id="c1"></span></li>
<li>After:<span id="c2"></span></li>
</ul>
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpEditingCallbacks();
testRunner.dumpAsText();
}
var e = document.getElementById('e');
document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
var s = window.getSelection();
var r = document.createRange();
r.selectNode(document.getElementById('test'));
s.removeAllRanges();
s.addRange(r);
document.execCommand("Outdent", false, "");
document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
</script>
|