Skip to content
Edytor
Esc
↑↓navigate↵open⌘Jpreview
On this page

Installation

Install the edytor package in a Svelte 5 project and check the requirements for the editor, the CRDT entries and the server room.

Edytor ships as one npm package, edytor. It contains the <Edytor> component, the bundled plugins, the collaborative document API and its CRDT engine, and a Cloudflare Durable Object room.

Requirements

  • Svelte 5. svelte is a peer dependency (^5.0.0). The editor uses runes and snippets, so Svelte 4 is not supported.
  • A Svelte-aware bundler. The root entry ships .svelte files. SvelteKit, or Vite with @sveltejs/vite-plugin-svelte, compiles them with its default config: nothing to add to vite.config. Astro renders a component from a package on the server only when that package is bundled, so add vite: { ssr: { noExternal: ['edytor'] } } to astro.config (without it, a server-rendered island fails with “Unknown file extension .svelte”).
  • Node.js 22 or later (the package’s engines field).
  • A Baseline 2024 browser. Chrome and Edge 120, Firefox 125, Safari 17.4 or Chrome on Android 120, or later; the current versions are tested. Real phones and their keyboards are not tested yet. See Platform support.

Install

Edytor is on npm under latest:

npm install edytor
pnpm add edytor
yarn add edytor
bun add edytor
nub add edytor
aube add edytor

Each release is published from CI with npm provenance. The 2.0.0 pre-releases stay on npm under the next tag; do not install them.

Earlier installs by URL keep working: this site still serves every pre-release tarball it hosted, each at its versioned URL, and the bytes under a URL never change, so a lockfile’s URL and integrity hash stay valid. Switch to edytor when you upgrade.

If your project does not have Svelte yet, add it too:

npm install -D svelte
pnpm add -D svelte
yarn add -D svelte
bun add -D svelte
nub add -D svelte
aube add -D svelte

Do not install yjs for Edytor. The collaboration engine (a fork of Yjs v14) is vendored inside the package and is available as edytor/crdt. The yjs package on npm is v13, which cannot exchange updates with v14.

The package pulls in a few runtime dependencies on its own: Atlassian’s Pragmatic Drag and Drop (block handles), TanStack Highlight (code block highlighting) and lib0.

Next steps

Was this page helpful?