blob: e65e94f18c02c849706d3bc8f5178bbafec1dcb0 [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
font-size: 24px;
}
.explanation {
border: 2px solid blue;
padding: 12px;
font-size: 24px;
margin-bottom: 24px;
}
.scenario { margin-bottom: 16px;}
.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
.expected-results:first-line { font-weight: bold }
</style>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function editingTest() {
var r = document.getElementById("root");
setSelectionCommand(r, 0, r, 1);
copyCommand();
var e = document.getElementById("target");
setSelectionCommand(e, 0, e, 1);
pasteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body id="root" contenteditable><table id="test">
<tbody><tr><td>one</td><td>two</td></tr></tbody></table>
<div id="target">replaceme</div>
<script>
runEditingTest();
</script>
</body>
</html>