justing | f8b4263 | 2007-02-21 03:58:51 +0000 | [diff] [blame] | 1 | <style> |
| 2 | blockquote { |
| 3 | border-left: 2px solid blue; |
| 4 | margin: 0; |
| 5 | padding-left: 10px; |
| 6 | color: blue; |
| 7 | } |
| 8 | </style> |
| 9 | <p>This tests copying/pasting less than a paragraph of quoted content. It should not appear quoted.</p> |
| 10 | <div id="div" contenteditable="true"> |
| 11 | <br> |
| 12 | <br> |
| 13 | <blockquote type="cite">On Tuesday, Dave wrote:</blockquote> |
| 14 | <blockquote type="cite"><br></blockquote> |
| 15 | <blockquote type="cite">Hello World.</blockquote> |
| 16 | </div> |
| 17 | |
| 18 | <script> |
csaavedra@igalia.com | e4ebde0 | 2013-03-28 00:33:25 +0000 | [diff] [blame] | 19 | if (window.internals) |
| 20 | internals.settings.setEditingBehavior('mac'); |
| 21 | |
justing | f8b4263 | 2007-02-21 03:58:51 +0000 | [diff] [blame] | 22 | var sel = window.getSelection(); |
| 23 | var div = document.getElementById("div"); |
| 24 | sel.setPosition(div, 0); |
| 25 | sel.modify("move", "forward", "paragraph"); |
| 26 | sel.modify("move", "forward", "paragraph"); |
| 27 | sel.modify("extend", "forward", "word"); |
| 28 | document.execCommand("Copy"); |
| 29 | sel.setPosition(div, 0); |
justin.garcia@apple.com | 79bf02b | 2008-11-17 22:40:50 +0000 | [diff] [blame] | 30 | document.execCommand("PasteAndMatchStyle"); |
justing | f8b4263 | 2007-02-21 03:58:51 +0000 | [diff] [blame] | 31 | </script> |