| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <style> | |
| 5 .editing { | |
| 6 border: 1px solid red; | |
| 7 } | |
| 8 </style> | |
| 9 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 10 | |
| 11 <script> | |
| 12 | |
| 13 function editingTest() { | |
| 14 extendSelectionForwardByLineCommand(); | |
| 15 copyCommand(); | |
| 16 boldCommand(); | |
| 17 moveSelectionBackwardByCharacterCommand(); | |
| 18 insertParagraphCommand(); | |
| 19 moveSelectionBackwardByCharacterCommand(); | |
| 20 pasteAndMatchStyleCommand(); | |
| 21 } | |
| 22 | |
| 23 </script> | |
| 24 | |
| 25 <title>Paste and match style on an empty (but styled) line</title> | |
| 26 </head> | |
| 27 <body> | |
| 28 | |
| 29 <p>This tests paste and match style on an empty (but styled) line</p> | |
| 30 <p>The first line is copied (unstyled), then it's bolded, then a paragraph separ
ator is inserted and the original unstyled line is pasted (with style matching).
</p> | |
| 31 | |
| 32 <hr> | |
| 33 | |
| 34 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: s
pace; -khtml-line-break: after-white-space;"> | |
| 35 <div id="test" class="editing">this text should end up bold</div> | |
| 36 </div> | |
| 37 | |
| 38 <script> | |
| 39 runEditingTest(); | |
| 40 </script> | |
| 41 | |
| 42 </body> | |
| 43 </html> | |
| OLD | NEW |