Settings

Theme

Svedit – A tiny library for building rich content editors with Svelte 5

svedit.vercel.app

4 points by _mql 7 months ago · 1 comment

Reader

johannesmutter 7 months ago

A few things worth pointing out: unlike many text editors, Svedit doesn’t try to fight the DOM with hidden textarea hacks or by re-implementing text rendering in Canvas in a 5 year effort. It’s not really a text editor in the traditional sense, but a content editor—images, layouts, and objects with properties are handled on the same level as plain or rich text.

One new idea in Svedit is the Node Cursor. It sits between Blocks and Properties and makes it possible to insert content directly in that space, without first moving back to a previous block and pressing Enter. In this model, whitespace and “blackspace” are treated the same.

Selections are also mapped from the DOM to custom nodes and properties, which keeps the footprint small and makes it easy for developers to modify or extend – and ship an editor with their frontend.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection