blob: c68315b98445c5ccbb202cbc8e8a78e716fd89e4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body style="font-family: Helvetica">
<p id="description">This tests copying and pasting doesn't strip content.
To manually test, copy the content in the first box and paste it into the second box.</p>
<div id="source" contenteditable style="border: solid 1px; black; margin: 5px;">
<font face="Verdana">hello&nbsp;</font><br>
<font face="Verdana"><div style="-webkit-line-break: after-white-space;"><div><font face="Verdana">world</font></div>
<div style="-webkit-line-break: after-white-space; "><font face="Verdana">WebKit</font></div></div>
</div>
<div id="destination" contenteditable style="border: solid 1px black; margin: 5px;"><br></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description(document.getElementById('description').textContent);
document.getElementById('source').focus();
document.execCommand('selectall', false, null);
document.execCommand('copy', false, null);
if (document.queryCommandEnabled('paste')) {
document.getElementById('destination').focus();
document.execCommand('paste', false, null);
Markup.dump('source', 'Original content');
Markup.dump('destination', 'Pasted content');
}
</script>
</body>
</html>