CE

Craft beautiful text editors, just like Notion

Learn how to build advanced rich-text editors using Prosemirror and React.

Book cover for "Crafting Rich-Text Editors, Standard Edition"
Book cover for "Crafting Rich-Text Editors, Enhanced Edition"
Book cover for "Crafting Rich-Text Editors, Complete Edition"
Texture
The Book

400 pages of lovingly-typeset prose, distilled into clear and concise chapters. Avaiable in dark and light mode.

The Code

Build a framework-agnostic library with separate React bindings. Write every line of code from scratch.

The Site

Take advantage of a shared online experience, packed to the brim with author notes and editor cuts.

The Guides

Enjoy 4 additional guides, spanning design notes, cheat sheets, extra challenges and testing.

The future of text needs better editors

The ecosystem has changed. Rich-text editors have now become table stakes in modern web development. Users expect rich formatting options, inline-comments, activity-tracking, spell-checking, collaborative-editing, and more. Despite these needs, there's an upsetting number of resources on how to build these tools. Additionally, most "batteries-included" frameworks are stuck in time and can't respond to changing environments. In this book, we'll use the Prosemirror toolkit to create a custom rich-text editor. We'll write every line of code from scratch to support a user's modern needs. By the end, we'll have a framework-agnostic editor (I've called mine Pine) with performant React-bindings to improve developer productivity. It'll be great! - Isaac Aderogba

Howard Rheingold

Language As Trance

“Language is a marvelous tool for understanding and manipulating the universe by throwing a kind of grid or map over a highly complex cosmos.”

Azlen Elza

The Architecture of Writing

“I like to think of writing as a sort of alchemy, a transmutation of ideas into words […] Every discipline is like this: writers translate thoughts onto the page, painters translate onto a canvas, and architects onto the built environment.”

Chris Gebhardt

Decentralizing Text in a Global Information Graph

“Architecting the future of digital text must be a pursuit of permanence, not expedience. […] Anything we bake in must be supported indefinitely. Modularity and extensibility are thus critical.”

Adam Kampff

The Brain's Past Will Define Text's Future

“What began with pictures and ideograms, would evolve c. 5,000 years ago into the first visual depiction of the mental abstractions created in cortex, the first text, and the rest is (by definition) history.”

Katie Baynes

Words That You Can Feel

“What if the word chaos felt chaotic. An earthquake actually s h o o k. A heartbeat THUMPED. Imagine what the mind could learn then? Activating all the senses with text; the digital and written world could be brighter, louder, stronger than ever before.”

James Blustein

Text as Process

“As an author/creator I imagine that in the future authors will use a framework to describe how their text will be presented. That framework would contain not only the words of the text but also suggestions for the layout (in space and time) of the text.”

Andy Matuschak & Michael Nielsen

Timeful Texts

“The most powerful books reach beyond their pages […] and indelibly transform how serious readers see the world. Few books achieve such transcendent impact, yet given their physical constraints, it’s remarkable that any do.”

01The Book

Learn everything you need to implement a full-featured rich-text editor.

We'll start with an introduction of Pine, struggle through the depths of Prosemirror, and emerge at our destination with React. Take a look at all of the content that we'll cover:

I. Pine

Begin your journey with a high-level overview of what we'll learn along the way.

1Introduction
2Editor
3Journey
II. Prosemirror

Become deeply familiar with Prosemirror, building modules such as history management and editor keymaps from scratch. We'll leave no stone unturned and conclude with a composable library that we can bind to any framework.

4Libraries
5Schemas
6Parsers
7Serializers
8Plugins
9Commands
10Transactions
11Transforms
12Steps
13Decorations
14Extensions
III. React

Learn best practices for integrating Prosemirror with React. We'll also tackle advanced functionality such as activity tracking and spell-checking. The last chapter will stitch everything together into a final application.

15Renderers
16Node Views
17Design Systems
18Components
19Toolbars
20Comments
21Activity Tracking
22Spell Checking
23Application
PDF Viewer
02The Code

Thoroughly understand every line of code with step-by-step walkthroughs.

Apart from the boilerplate starter repo, you'll write every line of strongly-typed Typescript from scratch. Take a look at some of the finer details of your editor:

Support for block-based editing.
Block-level nodes such as blockquotes, headings, and lists.
Inline-level marks that support bolding, italicising, and linking.
Support for converting to and from Markdown.
Ability to toggle between a large and small editor.
Ability to toggle between dark and light mode.
Ability to leave inline comments.
Activity tracking, spell-checking, and the list goes on...
Code examples
03The Site

Engage with easter eggs and other learners in a non-linear reading experience.

Not only can you explore related chapters and sections without losing context, you'll find that each paragraph acts as a mini-discussion board that encourages you to communicate with other learners or the author.

Non-linear reading

Freely follow the trail of breadcrumbs to see how certain concepts relate to different chapters.

Editor cuts

While the PDF book is intentionally concise, the interactive site is sprawling with notes on why certain architectural choices were made.

Contextual troubleshooting

With the interactive site, you'll have the ability to leave comments on every single line of text. If you're stuck on a particular concept, I'll do my best to support you.

Site Preview
04The Guides

Progress even further with four accompanying guides.

Each companion guide will either solidify knowledge, offer unique observations, or encourage you to expand the Pine editor in an interesting way.

Texture
Cheat sheets

Cheat sheets are one-page summaries attached to every chapter. Great for if you need a refresher on key concepts or code snippets.

Texture
Design notes

Design notes accompany each chapter and expand on interesting design directions for the future of text editors.

Texture
Challenges

Challenges accompany the code chapters and demonstrate how to expand the editor with new block-level nodes and inline marks.

Texture
Testing

TypeScript really is just JavaScript in the end, so we'll write tests to confirm that our editor behaves as expected.

Choose your edition

“Crafting Rich-Text Editors” is available in three different editions with varying features. Pick the one that's right for you.

Typewriter
Early access perks
Weekly book chapters
Troubleshoot support
Name inscription
Book
400-page PDF book
Dark mode version
Code
Forkable starter code
Code walkthroughs
Site
Non-linear reading
Editor cuts
Contextual troubleshooting
Guides
Cheet sheets
Design notes
Challenges
Tests
Standard Edition
$29
Early access perks
Weekly book chapters
Troubleshoot support
Name inscription
Book
400-page PDF book
Dark mode version
Code
Forkable starter code
Code walkthroughs
Site
Non-linear reading
Editor cuts
Contextual troubleshooting
Guides
Cheet sheets
Design notes
Challenges
Tests
Enhanced Edition
$59
Early access perks
Weekly book chapters
Troubleshoot support
Name inscription
Book
400-page PDF book
Dark mode version
Code
Forkable starter code
Code walkthroughs
Site
Non-linear reading
Editor cuts
Contextual troubleshooting
Guides
Cheet sheets
Design notes
Challenges
Tests
Complete Edition
$99
Early access perks
Weekly book chapters
Troubleshoot support
Name inscription
Book
400-page PDF book
Dark mode version
Code
Forkable starter code
Code walkthroughs
Site
Non-linear reading
Editor cuts
Contextual troubleshooting
Guides
Cheet sheets
Design notes
Challenges
Tests
Crafting Editors