blob: dd2bfd59bdcca95e796fad385593fb2d5c660a55 [file] [log] [blame]
<style>
blockquote {
color: blue;
border-left: 2px solid blue;
padding-left: 5px;
margin: 0px;
}
</style>
<p>We copy and paste a blockquoted paragraph plus a paragraph break. The paragraph break shouldn't be inside the blockquote on paste.
You should see 'hello' (blockquoted), 'world' (not quoted, black text), 'hello' (blockquoted), empty paragraph.</p>
<div id="div" contenteditable="true"><br><blockquote id="blockquote" type="cite">hello<br></blockquote><br></div>
<script>
div = document.getElementById("div");
blockquote = document.getElementById("blockquote");
sel = window.getSelection();
sel.setBaseAndExtent(blockquote, 0, div, 2);
document.execCommand("Copy");
sel.setPosition(div, 0);
document.execCommand("Paste");
document.execCommand("InsertHTML", false, "world");
</script>