2011-07-20 23:58:25 +04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html class="reftest-wait">
|
|
|
|
<body>
|
|
|
|
<style>
|
2020-05-14 19:46:08 +03:00
|
|
|
:read-only { color: red; }
|
|
|
|
:read-write { color: green; }
|
2011-07-20 23:58:25 +04:00
|
|
|
</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>
|