October 9, 2026
Syntax highlighting for Svelte, TypeScript, and 19 more
Code blocks in Editable now have syntax highlighting. You can pick a language from the layout selector and your code turns pretty. Best of all, this not only works for readers when they view the page but code is also colored live while you are editing.
Highlighting is powered by Twinkleplop, a lightweight and fast syntax highlighter and code authoring toolkit:
Editable currently highlights 21 languages: Bash, CSS, Diff, Dotenv, Go, HTML, HTTP, INI, JavaScript, JSON, JSON with Comments (JSONC), Markdown, Python, Rust, Shell Session, SQL, Svelte, TOML, TSX, TypeScript and YAML.
/** Estimates how long a task will really take. Battle-tested. */ export function estimate(task: string): string { if (task.includes('quick fix')) return 'see you next sprint'; const guess = task.length / 10; return `${guess}h (actually ${guess * Math.PI}h)`; } /** Fixes any bug. Requires coffee. */ export function debug(bug: Error, coffee = Infinity): never { while (coffee-- > 0) console.log('why?'); throw bug; // it was a typo }
Try it out yourself. Hold ⌘ (Mac) or Ctrl (Windows) and press E to enter edit mode. Now you can edit the code block above. Use the layout switcher in bottom left corner of the window to change the language.
Last updated October 9, 2026