Last active
March 19, 2025 18:34
-
-
Save sverweij/188bfd227f1a2e0e1694c676d7bc192b to your computer and use it in GitHub Desktop.
Revisions
-
sverweij revised this gist
Mar 19, 2025 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,5 @@ } </script> </head> <body contenteditable style="font: 1rem/1 monospace; line-height: 1.4rem; max-width: 60rem; margin: 0 auto; padding: 4rem; color: darkblue; background-color: lightyellow"></body> </html> -
sverweij created this gist
Mar 19, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ <!DOCTYPE html> <html> <head> <title>SCRATCH</title> <script> window.onload = () => { const content = document.querySelector('[contenteditable]'); if (localStorage.getItem('scratch.savedContent')) { content.innerHTML = localStorage.getItem('scratch.savedContent'); } content.addEventListener('input', () => { localStorage.setItem('scratch.savedContent', content.innerHTML); }); } </script> </head> <body contenteditable style="font: 1rem/1 monospace; line-height: 1.4rem; max-width: 60rem; margin: 0 auto; padding: 4rem; color: darkblue; background-color: lightyellow"> </body> </html>