blob: 063824748cb13d67d4e86334e135338afce75a40 [file] [log] [blame]
<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>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
addEventListener("load", () => {
getSelection().setPosition(document.getElementById("copy"));
document.execCommand("SelectAll");
document.execCommand("Copy");
getSelection().setPosition(document.getElementById("paste"));
document.execCommand("Paste");
});
</script>