| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <style> | |
| 5 body { | |
| 6 font-size: 24px; | |
| 7 } | |
| 8 .editing { | |
| 9 border: 2px solid red; | |
| 10 padding: 12px; | |
| 11 } | |
| 12 p { | |
| 13 border: 2px solid blue; | |
| 14 padding: 12px; | |
| 15 } | |
| 16 br { | |
| 17 background-color: green; | |
| 18 } | |
| 19 | |
| 20 </style> | |
| 21 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 22 | |
| 23 <script> | |
| 24 | |
| 25 function editingTest() { | |
| 26 for (i = 0; i < 14; i++) | |
| 27 moveSelectionForwardByCharacterCommand(); | |
| 28 insertParagraphCommand(); | |
| 29 insertParagraphCommand(); | |
| 30 typeCharacterCommand(); | |
| 31 } | |
| 32 | |
| 33 </script> | |
| 34 | |
| 35 <title>Editing Test</title> | |
| 36 </head> | |
| 37 <body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode:
space; -khtml-line-break: after-white-space;"> | |
| 38 | |
| 39 Test inserting paragraphs and managing typing style correctly: "x" under "line 2
" should be bold. Fix for this bug: | |
| 40 <a href="rdar://problem/3939523"><rdar://problem/3939523></a> in some case
s, text does not retain style info after pressing return twice | |
| 41 <div style="height: 12px"></div> | |
| 42 | |
| 43 <p id="test">line 1</p> | |
| 44 <p><br class="khtml-block-placeholder"></p> | |
| 45 <p><b>line 2</b></p> | |
| 46 <p><br class="khtml-block-placeholder"></p> | |
| 47 <p>line 3</p> | |
| 48 | |
| 49 <script> | |
| 50 runEditingTest(); | |
| 51 </script> | |
| 52 | |
| 53 </body> | |
| 54 </html> | |
| OLD | NEW |