MIT · Built on Tiptap · Versioned JSON

A block editor that hands you JSON.

Notion-style editing on Tiptap — slash menu, drag handles, tables, uploads. No CSS framework, no opinion about where your content lives, and a renderer for the server in the box.

Get startedThe JSON contract
npm i @blockleaf/editor
workspace / interactive-editor.tsx
live
schemaVersion: 1
Blockleaf Surface
Select words for the toolbar · Press /Tiptap Engine
{
  "type": "doc",
  "attrs": {
    "schemaVersion": 2
  },
  "content": [
    {
      "type": "heading",
      "attrs": {
        "level": 2
      },
      "content": [
        {
          "type": "text",
          "text": "Try it"
        }
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "This is a real editor. Type in it. "
        },
        {
          "type": "text",
          "marks": [
            {
              "type": "bold"
            }
          ],
          "text": "Select some words"
        },
        {
          "type": "text",
          "text": " for the toolbar, press "
        },
        {
          "type": "text",
          "marks": [
            {
              "type": "code"
            }
          ],
          "text": "/"
        },
        {
          "type": "text",
          "text": " on an empty line for the block menu, or drag a block by its handle."
        }
      ]
    },
    {
      "type": "callout",
      "attrs": {
        "emoji": "🍃",
        "tone": "info"
      },
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "type": "text",
              "text": "Everything you do here changes the other two tabs. That JSON is the product — it is what lands in your database."
            }
          ]
        }
      ]
    },
    {
      "type": "bulletList",
      "content": [
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Lists, "
                },
                {
                  "type": "text",
                  "marks": [
                    {
                      "type": "italic"
                    }
                  ],
                  "text": "marks"
                },
                {
                  "type": "text",
                  "text": ", and "
                },
                {
                  "type": "text",
                  "marks": [
                    {
                      "type": "link",
                      "attrs": {
                        "href": "https://github.com/zahidshowrav/blockleaf"
                      }
                    }
                  ],
                  "text": "links"
                }
              ]
            }
          ]
        },
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Tables, images, callouts, task lists"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "taskList",
      "content": [
        {
          "type": "taskItem",
          "attrs": {
            "checked": true
          },
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Ship versioned JSON"
                }
              ]
            }
          ]
        },
        {
          "type": "taskItem",
          "attrs": {
            "checked": false
          },
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Tick this box and watch the JSON change"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
Guaranteed schemaVersion invariantapplication/json
Why Blockleaf

A block editor that respects your data layer

Versioned JSON

Every document carries a schema version, and every change to the stored shape ships a migration. Your database stays reliable forever.

Server rendering included

@blockleaf/renderer turns stored JSON into React or static HTML with no editor and no ProseMirror weight.

One stylesheet

Custom properties, no Tailwind requirement, no prose plugin, no build step of its own. It inherits your design tokens.

Headless & unopinionated

Store in Postgres jsonb, SQLite, MongoDB or flat files. No proprietary backend lock-in, no mandatory cloud sync.

Official npm packages

Install modularly according to your client and server architecture.

@blockleaf/editorESM only

The primary interactive block editor React component.

npm install @blockleaf/editor
@blockleaf/rendererESM only

Ultra-lightweight server renderer for headless display.

npm install @blockleaf/renderer