textarea.my on GitHub
simonwillison.net·6w

textarea.my on GitHub (via) Anton Medvedev built textarea.my, which he describes as:

A minimalist text editor that lives entirely in your browser and stores everything in the URL hash.

It’s ~160 lines of HTML, CSS and JavaScript and it’s worth reading the whole thing. I picked up a bunch of neat tricks from this!

  • <article contenteditable="plaintext-only"> - I did not know about the plaintext-only value, supported across all the modern browsers.
  • It uses new CompressionStream('deflate-raw') to compress the editor state so it can fit in a sho…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help