| <!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 </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> |