1317704.html (787B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <script> 6 addEventListener('DOMContentLoaded', () => { 7 // For emulating the traditional behavior, collapse Selection to end of the 8 // text node at end of the <body>. 9 getSelection().collapse( 10 document.body.lastChild, 11 document.body.lastChild.length 12 ); 13 document.documentElement.className = 'lizard'; 14 setTimeout(() => { 15 document.execCommand('selectAll'); 16 document.designMode = 'on'; 17 document.execCommand('removeformat'); 18 }, 0); 19 }); 20 </script> 21 <style> 22 .lizard { 23 -webkit-user-select: all; 24 } 25 * { 26 position: fixed; 27 display: table-column; 28 } 29 </style> 30 </head> 31 <body> 32 <span> 33 <span contenteditable> 34 <span class=lizard></span> 35 <span class=lizard></span> 36 <span /> 37 </span> 38 </span> 39 </span> 40 </span> 41 </body> 42 </html>