OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/dump-as-markup.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <div contentEditable id="first"> |
| 8 <ol> |
| 9 <li id="listItemBlock">before<div>div1</div><div>div2</div><div>div3</di
v>after</li> |
| 10 <li id="listItemInline">before<span>span1</span><span>span2</span><span>
span3</span>after</li> |
| 11 <li id="listItemTable">before<table border="1" cellpadding="2" cellspaci
ng="2"><tr><td><br/></td></tr></table>after</li> |
| 12 </ol> |
| 13 </div> |
| 14 <div contentEditable id="second"> |
| 15 <ol> |
| 16 <pre><ul><li id="listItemPre">hello |
| 17 world</li> |
| 18 </ul></pre> |
| 19 </ol> |
| 20 </div> |
| 21 <script> |
| 22 Markup.waitUntilDone(); |
| 23 |
| 24 function indentListItem(item) { |
| 25 window.getSelection().collapse(item, 0); |
| 26 document.execCommand("indent"); |
| 27 } |
| 28 |
| 29 Array.prototype.slice.call(document.getElementsByTagName('li')).forEach(indentLi
stItem); |
| 30 Markup.dump(document.getElementById('first'), "Indent With Children"); |
| 31 Markup.dump(document.getElementById('second'), "Indent With Pre"); |
| 32 |
| 33 Markup.notifyDone(); |
| 34 </script> |
| 35 </body> |
| 36 </html> |
OLD | NEW |