NoteCove NoteCove

The Editor

Why rich text?

Plain Markdown editors store text as a string and render it visually. This works well for simple documents but creates friction for complex content: tables require ASCII art, images need reference syntax, and formatting is interleaved with content.

NoteCove uses a structured document model. The editor stores content as a tree of typed nodes (paragraphs, headings, lists, tables, images) with marks (bold, italic, code) on text ranges. You type naturally and formatting is applied visually — but you can also use Markdown shortcuts (type ## for a heading, ** for bold) for the speed of Markdown with the reliability of structured editing.

TipTap and ProseMirror

NoteCove’s editor is built on TipTap, which is built on ProseMirror. ProseMirror provides:

  • A schema-based document model that enforces structural rules
  • A transaction system where every edit is an atomic operation
  • A plugin architecture for extending behavior (spellcheck, collaboration, code highlighting)

TipTap adds an ergonomic API on top, making it easy to compose extensions. NoteCove uses custom extensions for features like collapsible headings, link unfurling, mentions, task checkboxes, and file attachments.

The document model

A NoteCove document is a tree:

doc
├── heading (level: 1, collapsed: false)
│   └── text "Project Notes" [bold]
├── paragraph
│   └── text "Status update for Q2."
├── bulletList
│   ├── listItem
│   │   └── paragraph
│   │       └── text "Item one"
│   └── listItem
│       └── paragraph
│           └── text "Item two"
└── codeBlock (language: "javascript")
    └── text "console.log('hello')"

Every node has a type (heading, paragraph, codeBlock, etc.) and attributes (level, language, collapsed state). Text nodes carry marks (bold, italic, code, link).

This model is what makes features like collapsible headings, table cell alignment, and drag-and-drop reordering possible — the editor knows the structure of the document, not just its text.

CRDT integration

The document model maps directly to a Yjs CRDT document. Each node and mark becomes a CRDT operation, so changes merge naturally across devices. This is why concurrent editing works: two people can edit different parts of the same document and the CRDT layer handles merging the structural tree.

Markdown shortcuts

You can use familiar Markdown syntax while typing:

TypeResult
# Heading 1
## Heading 2
* or - Bullet list
1. Numbered list
[] Task list
> Blockquote
```Code block
**text**Bold
*text*Italic
`text`Inline code

These shortcuts are converted to structured nodes on the fly — the document never stores raw Markdown.

Attachments and media

Images, videos, PDFs, and other files are stored as co-located attachments alongside the note in your storage directory. When you drag an image into the editor, NoteCove copies it to storage, generates a thumbnail, and inserts an image node. The attachment syncs with the note through the same CRDT mechanism.