Directory structure:
BlockNote
├── packages/core - The core of the editor, which includes all logic to get the editor running in vanilla JS.
├── packages/react - A React wrapper and UI for the editor. Requires additional components for the UI.
├── packages/ariakit - UI components for the `react` package, made with Ariakit.
├── packages/mantine - UI components for the `react` package, made with Mantine.
├── packages/shadcn - UI components for the `react` package, made with Shadcn.
├── packages/server-util - Utilities for converting BlockNote documents into static HTML for server-side rendering.
├── packages/dev-scripts - A set of tools for converting example editor setups into components for the BlockNote website.
├── examples - Example editor setups used for demos in the BlockNote website and playground.
├── docs - Code for the BlockNote website.
├── playground - A basic page where you can quickly test each of the example editor setups.
└── tests - Playwright end to end tests.
An introduction into the BlockNote Prosemirror schema can be found in packages/core/src/pm-nodes/README.md.
To run the project, open the command line in the project's root directory and enter the following commands:
# Install all required npm modules
pnpm install
# Start the example project
pnpm devAll commands are run from the project root with pnpm, which
wraps the vp (vite-plus) task runner. The ones you'll
use day to day:
| Command | Description |
|---|---|
pnpm install |
Install all dependencies. |
pnpm dev |
Start the example editor with live reload. |
pnpm start |
Build the packages, then preview the example editor. |
pnpm test |
Run the unit tests across all packages. |
pnpm lint |
Lint and type-check the codebase. Run this before pushing. |
pnpm run check |
Auto-fix lint and formatting issues across the project. |
pnpm build |
Build all packages. |
pnpm e2e |
Run the Playwright end-to-end tests. |
To run the unit tests for a single package, run pnpm test from inside that
package's directory; append -u to update snapshots.
- Add the dependency to the relevant
package.jsonfile (packages/xxx/package.json) - Double check
pnpm-lock.yamlto make sure only the relevant packages have been affected
| Package | Size | Version |
|---|---|---|
| @blocknote/core | ||
| @blocknote/react | ||
| @blocknote/ariakit | ||
| @blocknote/mantine | ||
| @blocknote/shadcn | ||
| @blocknote/server-util |
All packages under packages/ are released in lockstep (same version).
- You must be on the
mainbranch with a clean working tree - CI must be green
- NPM trusted publishing must be configured for all public packages (see below)
Run the interactive release script:
vp run deployThe script will:
- Verify preconditions (clean tree, on main, up to date with origin)
- Present an interactive version picker (patch / minor / major / prerelease / custom) via bumpp
- Bump the version in all
packages/*/package.jsonfiles - Sync the lockfile
- Run a smoke test build (
vp run -r build) - Generate a changelog from conventional commits via changelogen
- Open
$EDITORso you can review and edit the changelog before committing - Commit, tag (
v{version}), and push
Once the tag is pushed, the CI publish workflow automatically:
- Builds all packages
- Publishes the 13 public packages to npm with OIDC provenance
- Creates a GitHub Release with the changelog content
Each public @blocknote/* package must have a trusted publisher configured on npmjs.com:
- Go to
https://www.npmjs.com/package/@blocknote/{name}/access - Under "Trusted Publisher", select GitHub Actions
- Set: Owner =
TypeCellOS, Repo =BlockNote, Workflow =publish.yaml
No NPM_TOKEN secret is needed — publishing uses GitHub's OIDC tokens.
When adding a new public package to the monorepo:
- Ensure its
package.jsonhas"private": falseand arepositoryfield pointing to the BlockNote repo - Configure a trusted publisher for it on npmjs.com (see above)
- The next release will automatically include it in the publish loop