yjd vs Draft.js
Draft.js was Facebook's React rich text framework. It works, but it is React-only and effectively in maintenance mode — Meta itself moved to Lexical. yjd is a smaller, actively-developed editor that stores plain HTML/Markdown and runs in React, Vue, Angular and vanilla.
At a glance
| yjd | Draft.js | |
|---|---|---|
| Bundle size | ~17 KB min → ~75 KB full (gzip), tree-shakeable | ~45 KB gzip (+ React) |
| Dependencies | None (zero runtime deps) | React + Immutable.js |
| Frameworks | React, Vue 3/2, Angular, AngularJS, Svelte, vanilla | React only |
| TypeScript types | ✓ Yes | ~ Community |
| License | ISC | MIT |
| Best for | Comments, chat/prompt inputs, blog & social posts, light CMS | Existing/legacy React editors |
Facts, not a scorecard — both are capable editors. Sizes are approximate and vary with configuration/plugins; figures for Draft.js come from its public docs (https://draftjs.org). The trade-offs are below.
Which should you pick?
Choose Draft.js when
- Established in older React codebases
- Immutable model with fine-grained control
- Lots of existing StackOverflow answers
You are maintaining an existing Draft.js integration and are not ready to migrate.
Choose yjd when
- Actively developed (Draft.js is winding down)
- Runs anywhere, not just React
- No Immutable.js; plain HTML/Markdown output
You are starting fresh and want a maintained, framework-agnostic editor instead of a legacy one.
Try yjd
A real editor, ~17 KB, zero dependencies. Install: npm i @oix1987/yjd. It runs in React, Vue, Angular and vanilla.
More comparisons: vs Tiptap · vs Quill · vs TinyMCE · vs CKEditor 5 · vs Slate · vs Lexical · vs ProseMirror · vs Editor.js · vs Froala · vs Trix · vs Summernote · vs Jodit · vs Toast UI Editor