I wanted writing on vivro to feel like editing the page itself, not filling in a form. Esqia by Jakub Krehel showed how good that can feel, so I brought the same ideas to vivro's post editor.
What made it in
- A
/menu for headings, lists, quotes, code and images - Drag a block by its grip, or move it with
⌘⇧↑and⌘⇧↓ ⌘⌥Eto start editing,Escto save
Three things I learned
- Build lists by hand. The browser's own list command nests them inside paragraphs.
- Use pointer events for drag and drop. Native drag and drop fights with editable text and doesn't work on phones.
- Never trust an old draft. A stale copy in my browser overwrote a finished post.
Saving should never surprise you.
That last lesson became a feature: if the editor opens with unsaved changes from an earlier session, it tells you, and you can keep them or go back to what's saved.
if (draft && !sameData(draft, saved)) showNotice();It's all built on contentEditable, so there's no editor framework to load. Try it on
vivro.xyz.