explaingit

codex-team/editor.js

31,764TypeScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · easy

TLDR

A block-based rich text editor for the web that saves content as clean JSON instead of HTML, with a plugin system for custom content types.

Mindmap

mindmap
  root((editor.js))
    What it does
      Block-based editing
      Structured JSON output
      Plugin system
    How it works
      Tools for content types
      Inline formatting
      Keyboard navigation
    Use cases
      Content management
      Note-taking apps
      Blog platforms
    Tech stack
      TypeScript
      npm package
      Browser-based
    User experience
      Enter creates blocks
      Tab opens toolbox
      Text formatting toolbar

Things people build with this

USE CASE 1

Build a content management system where editors create structured content that's easy to validate and transform.

USE CASE 2

Create a note-taking app where users organize content into blocks and export clean JSON for storage or migration.

USE CASE 3

Develop a blog platform with a user-friendly editor that produces reliable, semantic content without HTML bloat.

USE CASE 4

Add rich text editing to any web app (React, Vue, Angular, or plain HTML) without framework lock-in.

Tech stack

TypeScriptJavaScriptnpm

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Editor.js is a rich text editor for the web that is built around a block-based model rather than a traditional continuous document model. In most editors, the entire document is one blob of HTML, which makes it difficult to work with the content programmatically. Editor.js instead treats each element, such as a paragraph, heading, image, video, or list, as a separate self-contained block with its own data structure. When you save content, you get clean, structured JSON rather than a tangle of HTML. The editor works through a plugin system where each type of block is its own Tool. There are ready-made tools for common content types, and developers can write their own tools by implementing a simple API. Tools can also define inline formatting, like bold or links, that work within a block. The editor itself is the host that renders these tools and manages their order, keyboard navigation, and data collection. From the user's perspective, pressing Enter creates a new block, the Tab key opens a toolbox to choose a block type, and selected text reveals an inline formatting toolbar. Everything is keyboard accessible. You would use Editor.js when building a content management system, a note-taking application, a blog platform, or any interface where users create structured content that you need to store and re-render reliably. The block-based JSON output is easy to validate, transform, and display in different contexts compared to raw HTML. The tech stack is TypeScript, and it is installed via npm as @editorjs/editorjs. It runs in modern browsers and has no framework dependency, so it works in plain HTML pages as well as inside React, Vue, or Angular applications.

Copy-paste prompts

Prompt 1
Show me how to set up Editor.js in a React component and save the block data to a database.
Prompt 2
How do I create a custom tool for Editor.js that lets users embed a custom widget or data type?
Prompt 3
I need to migrate content from a traditional HTML editor to Editor.js format. What's the best approach?
Prompt 4
How can I add custom inline formatting (like strikethrough or custom colors) to Editor.js blocks?
Prompt 5
Show me how to render Editor.js JSON output back into HTML on a different page or app.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.