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.
svelteis 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
.sveltefiles. SvelteKit, or Vite with@sveltejs/vite-plugin-svelte, compiles them for you. - Node.js 22 or later (the package’s
enginesfield).
Install
The pre-release is on npm under the next tag:
npm install edytor@nextpnpm add edytor@nextyarn add edytor@nextbun add edytor@nextnub add edytor@nextaube add edytor@nextName the tag: a bare edytor resolves to the old, incompatible 0.0.11. Each pre-release is published from CI with npm provenance.
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@next when you upgrade.
If your project does not have Svelte yet, add it too:
npm install -D sveltepnpm add -D svelteyarn add -D sveltebun add -D sveltenub add -D svelteaube add -D svelteDo 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.
Build from source
To build the tarball yourself, from a clone of the repository (master):
cd edytor # your clone
pnpm install
pnpm package # builds dist/
pnpm pack # writes edytor-0.1.0-next.25.tgz
Then, in your project, install the file:
npm install ../edytor/edytor-0.1.0-next.25.tgzpnpm add ../edytor/edytor-0.1.0-next.25.tgzyarn add ../edytor/edytor-0.1.0-next.25.tgzbun add ../edytor/edytor-0.1.0-next.25.tgznub add ../edytor/edytor-0.1.0-next.25.tgzaube add ../edytor/edytor-0.1.0-next.25.tgzVerify the install
Render an editor. It needs no setup:
<script lang="ts">
import { Edytor } from 'edytor';
</script>
<Edytor />
You should see one empty paragraph. Hover it to reveal its block handle (touch devices always show it). An empty document always starts with one block of the default type (paragraph). <Edytor> includes the rich text, image, arrow move and suggestions plugins by default, so this is already a working rich text editor.