BerryEditor is a React-first rich text editor built with a TypeScript editor engine and HTML as the canonical content format, designed for apps that need customizable authoring controls and predictable HTML persistence.
BerryEditor/
packages/berryeditor Publishable package (`@appberry/berryeditor`) with React components, editor engine, styles, and tests.
apps/docs Next.js docs/playground app with App Router and Pages Router integration examples.
- Node.js
>=20 - Corepack (recommended by pnpm for project-pinned package manager versions)
pnpm
engines.node in package.json is advisory by default in npm unless users enable engine-strict, so verify local Node before running workspace scripts.
This workspace pins pnpm@10.6.4 via the root packageManager field. The pnpm installation docs recommend using Corepack so contributors use the expected pnpm version.
npm install --global corepack@latest
corepack enable pnpm
pnpm --versionIf Corepack reports outdated signatures, update Corepack and run corepack enable pnpm again.
pnpm install
pnpm devpnpm dev starts the docs app used for local development and manual testing.
-
pnpm buildbuilds all workspace packages and apps. -
pnpm lintruns ESLint across the workspace. -
pnpm typecheckruns TypeScript checks with--noEmit. -
pnpm testruns workspace test suites (Vitest-based package tests plus app placeholders). -
pnpm test:e2eruns Playwright editor E2E tests via the docs app.
- Unit and integration tests are implemented with Vitest in
packages/berryeditor/tests. - End-to-end coverage is implemented with Playwright in
packages/berryeditor/tests/e2eagainst the docs app runtime.
- Package usage and API docs:
packages/berryeditor/README.md - Local integration references in the docs app:
- App Router example:
/app-router - Pages Router example:
/pages-router
- App Router example:
- Official docs used by this repo:
- pnpm installation and Corepack usage: https://pnpm.io/installation
- npm
package.jsonfields (engines,packageManager): https://docs.npmjs.com/cli/v11/configuring-npm/package-json - Next.js client component boundary (
'use client'): https://nextjs.org/docs/app/api-reference/directives/use-client - Next.js transpiling external/workspace packages: https://nextjs.org/docs/pages/api-reference/config/next-config-js/transpilePackages
Apache-2.0