| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| @font-face { |
| font-family: Ahem; |
| src: url("../../resources/Ahem.ttf"); |
| } |
| |
| body { |
| margin: 0; |
| padding: 0; |
| font: 40px/1 Ahem; |
| } |
| |
| #first { |
| position: relative; |
| top: -10px; |
| } |
| |
| #second { |
| position: relative; |
| top: -20px; |
| } |
| </style> |
| </head> |
| <body> |
| <div id="first" contenteditable="true"></div> |
| <div id="second" contenteditable="true"></div> |
| <script> |
| var first = document.getElementById("first"); |
| var second = document.getElementById("second"); |
| |
| for (var element of [first, second]) { |
| element.focus(); |
| document.execCommand("InsertText", false, "mispelled"); |
| document.execCommand("InsertText", false, " "); // Trigger spell checking |
| element.blur(); |
| } |
| </script> |
| </body> |
| </html> |