Rich-text editors are everywhere β notes apps, documentation tools, knowledge bases.
Tools like Notion made block-based writing feel natural, flexible, and powerful.
As an experiment (and learning project), I built a Notion-style rich text editor using modern web technologies, focusing on clean UX, extensibility, and developer clarity.
π GitHub Repo:
https://github.com/oathanrex/notion-style-editor
β¨ What Is This Project?
This project is a block-based rich text editor inspired by Notionβs writing experience.
Itβs designed to be:
- Modular
- Extendable
- Easy to embed into other web apps
Instead of being a monolithic editor, the goal was to keep the architecture flexible so new blocks, plugins, or behaviors can be added later.
π Core Features
π§± Block-Based Editing
- Paragraphs, headings, lists, quotes
- Each piece of content is treated as a block
- Easy to reason about and extend
βοΈ Rich Text Formatting
- Bold, italic, underline, inline code
- Keyboard shortcuts for fast writing
- Clean separation between content and UI
β‘ Slash (/) Command Menu
- Quickly insert blocks and components
- Familiar Notion-style workflow
- Designed to be extensible
π― Design Goals
When building this editor, I focused on a few core principles:
- Clarity over complexity No unnecessary abstractions or magic.
- Extensibility first Custom blocks and plugins should be easy to add.
- Framework-friendly Can be adapted for React, Next.js, or Vanilla JS projects.
- Good UX by default Keyboard-first, minimal UI, predictable behavior.
π οΈ Tech Stack
This project uses a modern but lightweight stack:
- JavaScript (ES6+)
- Modular editor architecture
- Block-based content model
- CSS / utility-first styling (Tailwind-ready)
The editor is intentionally kept framework-agnostic so it can evolve in different directions.
π¦ Project Structure (High-Level)
src/
βββ components/ # UI (toolbars, menus)
βββ editor/ # Core editor logic & block schema
βββ plugins/ # Slash menu, shortcuts, extensions
βββ utils/ # Helpers & shared logic
βββ styles/ # Editor styling
`
Keeping responsibilities separated makes experimentation much easier.
π§ Getting Started
bash
git clone https://github.com/oathanrex/notion-style-editor.git
cd notion-style-editor
npm install
npm run dev
`
Open http://localhost:3000 to see the editor running locally.
π§ What I Learned
Building a rich-text editor teaches you a lot about:
- Cursor and selection management
- Block vs inline content models
- Keyboard accessibility
- Balancing UX with technical constraints
- Designing systems meant to be extended later
Itβs a deceptively deep problem space.
π Use Cases
This editor can serve as a foundation for:
- Note-taking apps
- Documentation platforms
- Knowledge bases
- Blog CMS systems
- Internal tools
π€ Open Source & Contributions
The project is open source and intentionally structured for experimentation.
If youβd like to:
- Add new block types
- Improve the slash menu
- Enhance accessibility
- Experiment with collaboration features
Feel free to fork the repo or open a pull request.
π Links
If youβre interested in editor architecture, block-based systems, or building complex UI tools from scratch, Iβd love to hear your thoughts or feedback in the comments.
`
Top comments (0)