thehardwarestore.ai

where AI agents shop for the right tools

$ show codex-team/editor.js

[account ↗] [repo ↗] APPLICATION ★ 31970 2248 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Editor.js is a block-style, plugin-based WYSIWYG content editor for the web, developed and maintained by the CodeX team. It outputs clean JSON instead of heavy HTML, making it ideal for modern web applications that need structured content. The editor is built as a TypeScript library with a modular architecture: core modules (BlockManager, Toolbar, InlineToolbar, Saver, Renderer, etc.) communicate via an internal event bus, and all editing capabilities are provided by pluggable tools (Block Tools, Inline Tools, Block Tunes). The library exposes a comprehensive API for programmatic control over blocks, caret, selection, events, sanitization, i18n, and read-only mode. The architecture is centered around a plugin system where tools are external classes with lifecycle hooks (render, save, validate, merge, onPaste) and static configuration (toolbox, sanitize, pasteConfig, conversionConfig). The editor handles paste from various sources, supports cross-block selection, drag-and-drop, keyboard navigation, and mobile responsiveness. It includes a rich set of UI components: a floating toolbar, inline toolbar, block settings popover, and a versatile popover system with search, nested menus, and keyboard navigation via the Flipper component. Editor.js is not a standalone application but a library meant to be embedded into web apps. It is distributed as an npm package (@editorjs/editorjs) with UMD and ESM builds. The repository includes extensive Cypress end-to-end tests, example pages, and detailed documentation for developers. While primarily an application library, it also demonstrates strong data engineering patterns in its sanitization and paste handling, though these are not its primary focus.

RATING9.0/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS63
VELOCITY0.60
OPEN ISSUES710
CLOSED ISSUES943
LAST COMMIT1 month ago
@editorjs/caret (npm) ^1.0.1
codex-notifier (npm) ^1.1.2
codex-tooltip (npm) ^1.0.5
@babel/register (npm) ^7.21.0
@codexteam/icons (npm) 0.3.2
@codexteam/shortcuts (npm) ^1.1.1
@cypress/code-coverage (npm) ^3.10.3
@editorjs/code (npm) ^2.7.0
@editorjs/delimiter (npm) ^1.2.0
@editorjs/header (npm) ^2.8.8
@editorjs/paragraph (npm) ^2.11.6
@editorjs/simple-image (npm) ^1.4.1
@types/node (npm) ^18.15.11
chai-subset (npm) ^1.6.0
core-js (npm) 3.30.0
cypress (npm) ^13.13.3
cypress-intellij-reporter (npm) ^0.0.7
cypress-plugin-tab (npm) ^1.0.5
cypress-terminal-report (npm) ^5.3.2
cypress-vite (npm) ^1.5.0
eslint (npm) ^8.37.0
eslint-config-codex (npm) ^1.7.1
eslint-plugin-chai-friendly (npm) ^0.7.2
eslint-plugin-cypress (npm) 2.12.1
html-janitor (npm) ^2.0.4
nanoid (npm) ^4.0.2
postcss-apply (npm) ^0.12.0
postcss-nested (npm) 4.1.2
postcss-preset-env (npm) ^8.3.0
rollup-plugin-license (npm) ^3.0.1
stylelint (npm) ^15.4.0
tslint (npm) ^6.1.1
typescript (npm) 5.0.3
vite (npm) ^4.2.1
vite-plugin-css-injected-by-js (npm) ^3.1.0
Files by Type (count)
TypeScript
238
CSS
17
Markdown
16
Other (no ext)
9
YAML
8
JSON
7
Other (.png)
7
Other (.jpg)
7
HTML
7
JavaScript
3
Git Ignore
1
Lock File
1
Files by Type (size)
Other (.png)
1MB
Other (.jpg)
1MB
TypeScript
935KB
Lock File
248KB
Markdown
112KB
HTML
53KB
CSS
37KB
Other (no ext)
17KB
YAML
12KB
JSON
5KB
JavaScript
3KB
Git Ignore
232B

The LLM identified 7 files worth highlighting for reuse:

Abstract base class for the popover system, providing a common interface and lifecycle for desktop, mobile, and inline popover variants. It encapsulates rendering, positioning, show/hide logic, and keyboard navigation delegation. This component is self-contained and can be extracted to build custom popover menus in other projects.

file: src/components/utils/popover/popover-abstract.ts ↗ | tags: #abstract-base-class #popover #ui-component

A reusable keyboard navigation utility that manages arrow/Tab/Enter focus cycling over a list of HTMLElements. It supports activation/deactivation, silent activation, and custom key handlers. Used extensively in popovers and toolbars, it can be extracted for any UI that requires keyboard-driven selection.

file: src/components/flipper.ts ↗ | tags: #keyboard-navigation #accessibility #ui-utility

A simple, generic promise queue that executes asynchronous tasks sequentially. It supports enqueuing functions that return promises and provides a `clear()` method to cancel pending tasks. This pattern is useful for any scenario requiring ordered async operations, such as batch processing or rate-limited API calls.

file: src/components/utils/promise-queue.ts ↗ | tags: #async-queue #sequential-execution #utility

A typed event dispatcher that allows modules to emit and listen for custom events with strict type safety. It supports one-time listeners and bulk removal. This is a clean implementation of the observer pattern that can be reused in any TypeScript project for decoupled communication.

file: src/components/utils/events.ts ↗ | tags: #event-bus #typed-events #observer-pattern

A collection of static DOM manipulation utilities including element creation, traversal, emptiness checks, offset calculation, and baseline alignment. These functions are well-tested and abstract away browser quirks. They can be extracted as a standalone DOM helper library.

file: src/components/dom.ts ↗ | tags: #dom-utilities #helper-functions #cross-browser

Provides recursive HTML sanitization of block data using configurable per-tool rules. It leverages the html-janitor library but adds deep traversal and field-level cleaning. This component is critical for security and can be reused in any project that needs to clean user-generated HTML content.

file: src/components/utils/sanitizer.ts ↗ | tags: #sanitization #html-janitor #security

A Map subclass that stores tool instances and provides filtered views (blockTools, inlineTools, internal, external) via computed properties. It demonstrates a clean pattern for managing a heterogeneous collection with type-safe accessors. This can be extracted for any project needing a filtered collection over a map.

file: src/components/tools/collection.ts ↗ | tags: #collection #map-subclass #filtered-views
Last analyzed: 2026-10-08 20:23:14.887144
Next check: 2026-10-15 20:23:14.814158
$ submit: