Skip to content
Edytor
Esc
↑↓navigate↵open⌘Jpreview
Slate's flexibility, Svelte's ergonomics

The block editor for Sveltecollaborative by default.

Render every block with your own Svelte snippets, hook into every edit with plugins, and let people write together — online, offline, and across tabs — on a Yjs v14 engine with a Durable Object server.

$pnpm add edytor
🌱 Edit this page with everyone Live · 1 person editing

Edit this page with everyone

This document is live. Open this page in another tab or send it to a friend: every keystroke syncs through a Cloudflare Durable Object, and it resets every day.

Try it

Type / for blocks, select text to format it, and drag the six-dot handle to move or nest a block. Drag from the margin to select several blocks at once.

Collaborative by default
Works offline, syncs when you are back
Your words stay yours, even as the page changes.

Drag a block to the edge of another to put them side by side.

Drag the gap between two columns to resize them.

Block
What it holds
Table
Rows of cells: drag a grip to move a row or a column
Columns
Any blocks, side by side
JavaScript
const editor = "yours to shape";


Open this page in a second tab or on another device — you are editing the same document, synced through a Cloudflare Durable Object.

Press Ask AI or type /ai for a draft (canned, no key needed): it shows only on your screen until you accept it.

Built for real documents

A small editing engine, not a black box.

A readable JSON block model on a CRDT, commands you can intercept, and a rendering layer you control — from a single textarea replacement to a collaborative workspace.

Your components, every block

Blocks, marks, and inline atoms render through your own Svelte snippets. The core owns the text; you own the markup around it.

Plugins that can veto anything

Every command is prepared before it writes. Plugins see each planned step and can veto, replace, or extend it.

Real-time collaboration

One shared document for any number of views and peers, with presence cursors and conflict-free merges of moves, splits, and joins.

Offline first, cross-tab

A local copy in IndexedDB and a BroadcastChannel between tabs: edits made offline survive reloads and sync on reconnect.

A Durable Object server

Deploy the ready-made room or attach a document to your own Durable Object: SQLite storage, store-before-ack, identity binding, hibernation.

Notion-style editing

Notion's look and keys out of the box: a theme stylesheet, slash and block menus, the toolbar, markdown and shortcuts.

One component. One Worker.

The same setup that runs the live editor above: a Svelte view and a Durable Object room you deploy on your own Cloudflare account.

<script lang="ts">
  import { Edytor } from "edytor";
</script>

<Edytor
  server="wss://rooms.example.com/rooms"
  room={documentId}
  params={{ token }}
  actor={{ id: userId, name: userName }}
/>
import {
  DocumentRoom, closedSocket, requestedReplica, routeDocumentSocket
} from "edytor/cloudflare";

export { DocumentRoom };

export default {
  fetch(request, env) {
    const match = /^\/rooms\/([^/]+)$/.exec(new URL(request.url).pathname);
    if (!match) return new Response("not found", { status: 404 });
    let documentId; // the provider percent-encodes the room id
    try {
      documentId = decodeURIComponent(match[1]);
    } catch {
      return closedSocket(4400, "invalid document id");
    }
    return routeDocumentSocket(request, env.ROOMS, documentId, async (req) => {
      const user = await verify(req); // your auth
      return user && { userId: user.id, replica: requestedReplica(req) };
    });
  },
};

Everything from a paragraph to a workspace.

The editing features people expect, and the extension points to build the ones they don't yet.

Start with one paragraph. Grow into a workspace.

Drop the component into a SvelteKit page, then add plugins, your own blocks, and a collaboration room when you need them.