This is a card in Dave's Virtual Box of Cards.
HTML contenteditable
Created: 2025-01-30
Updated: 2025-02-10
If you put contenteditable="true"
in an HTML element, you can click on it and
edit it with your keyboard. This has always been an interesting curiosity, but
I’ve never done anything with it.
For more about this fascinating property, check out: https://blog.whatwg.org/the-road-to-html-5-contenteditable
I’m contemplating a web editor thing and I might lean heavily on this property. Update: After a shallow dive into existing work in this field, I’m pretty convinced that the browsers do not support this property well enough to rely on it alone and that I should use an existing library for this such as The Guardian’s Scribe or maybe ProseMirror:
Here’s a test page: contenteditable test.
Back to web stuff.