Lokendra Kushwah

Nov 17, 2026

How I built vivro's editor

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 ⌘⇧↓
  • ⌘⌥E to start editing, Esc to save

Three things I learned

  1. Build lists by hand. The browser's own list command nests them inside paragraphs.
  2. Use pointer events for drag and drop. Native drag and drop fights with editable text and doesn't work on phones.
  3. 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.