inserttext-at-start-with-different-style.html (386B)
1 <html> 2 <head> 3 <meta charset="utf-8"> 4 <head> 5 <script> 6 function go() { 7 a.show(); 8 document.execCommand("bold", false); 9 b.style.setProperty("font", "0px/43%"); 10 document.execCommand("insertText", false, "a"); 11 } 12 </script> 13 </head> 14 <body onload=go()> 15 <ul contenteditable="true"> 16 <li id="b" style="font-weight: bolder">a</li> 17 <dialog id="a" tabindex="0">a</dialog> 18 </ul> 19 </body> 20 </html>