blob: f866f46260b1a4d4048435ea8673527bccea8ed6 [file] [log] [blame]
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
</script>
<p>This tests copy/paste of styled elements, like images. The image in the region below should be centered after its copied and pasted.</p>
<p><b>This demonstrates a bug: createMarkup puts the text-align property on the image, which doesn't center it, so its left aligned on paste.</b></p>
<div contenteditable="true" id="copy"><center><img src="../resources/abe.png"></center></div>
<div contenteditable="true" id="paste"></div>
<script>;
window.getSelection().setPosition(document.getElementById("copy"));
document.execCommand("SelectAll");
document.execCommand("Copy");
window.getSelection().setPosition(document.getElementById("paste"));
document.execCommand("Paste");
</script>