blob: 18ce2b5d58de49c65b8856ab72d27191e0e51f15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<html class="reftest-wait">
<body>
<style>
:read-only { color: red; }
:read-write { color: green; }
</style>
<script>
onload = function() {
document.designMode = "on";
var p = document.createElement("p");
p.textContent = "test";
document.getElementById("x").appendChild(p);
getSelection().removeAllRanges(); // don't need a caret
document.documentElement.removeAttribute("class");
};
</script>
<div contenteditable id="x">
</div>
more test
</body>
</html>
|