✍️ vanilla JS · zero dependencies

Rich text,
without the weight.

yjd is a rich text editor you compose from a tree-shakeable core. Register only the features you use and ship 16 KB — not the whole library.

16 KB minimal, gzip
0 runtime deps
100 Lighthouse a11y
editor.html — live, type in it ✦
The whole point

You ship the features, not the framework.

Every preset is built from the same /core entry. Pick a profile — the rest is tree-shaken away. (gzipped JS)

Minimalbold · italic · link
16 KB
Bubbleno toolbar
21 KB
Basic+ headings · lists
25 KB
Standard+ colour · table · find
38 KB
Fulleverything + AI
56 KB
Quill 2for comparison
60 KB
Batteries, detachable

Everything a writing surface needs

A Quill-inspired registry of formats and modules — add what you want, drop what you don't.

Tree-shakeable core

Import classes from /core, register what you need. Side-effect-free, ESM + UMD builds.

Responsive toolbar

Fills the width on desktop, a single swipe-row on mobile, overflow tucked into "More".

XSS-safe paste

Pasted HTML is sanitised — scripts, handlers and unsafe URLs stripped; only trusted embeds survive.

Full formatting

Headings, fonts, sizes, colour, lists, tables, images, video, links, find & replace, code view.

Framework-agnostic

Plain DOM. Drop it into React, Vue, Svelte or a static page — it's just new yjd().

Image upload hook

Point image.upload at your CDN — toolbar, paste & drop all upload, with a placeholder while it loads. Falls back to base64.

AI assistant (BYO model)

Select text → Improve, fix, shorten, translate or Ask AI, with accept/discard. Plus ghost-text autocomplete. You bring the model; no SDK bundled, tree-shakes to 0.

@mention & #tasks

Autocomplete people or tasks from your own async source. Tokens carry an id, so saved content knows who was tagged.

Export anywhere

Store content as HTML, a JSON tree, or Markdown — getMarkdown(), getJSON() & back. Plus fromTextarea and renderStatic.

Live, editable demos

The playground lets you tweak the config and re-run — copy the exact code into your app.

→ See the integration demo (AI · upload · mention · export · fromTextarea)

Two minutes

Install & compose

Add the package, register the features you want, link the one shared stylesheet. That's the whole setup.

Full docs →
// 1. install
npm i @oix1987/yjd

// 2. compose from the tree-shakeable core
import { Editor, registry, Bold, Italic, Link,
  Toolbar, History } from '@oix1987/yjd/core';

registry.register('formats/bold', Bold);
registry.register('formats/italic', Italic);
registry.register('modules/toolbar', Toolbar);

new Editor('#editor', { placeholder: 'Write…' });
Start here

Pick a preset, or build your own

Five ready profiles in the live playground — edit the code and watch it rebuild.