Skip to content

Installation

Terminal window
npm install @the-sumeet/sveltedown

svelte@^5.40 is a peer dependency. The editor is built on Lexical and uses CodeMirror for code blocks and the source view; both are installed with it.

The editor imports its stylesheet itself, so most setups need nothing more. If your bundler drops CSS imported from packages, import it once in your app:

import '@the-sumeet/sveltedown/editor.css';

The editor renders its container on the server and creates the Lexical editor in the browser, so it works in SvelteKit pages without extra setup.