Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rich-editor

Monorepo for @rinsvent/rich-editor — React rich text editor/viewer on Lexical.

Structure

packages/rich-editor/   # library
apps/demo/              # Vite demo
docs/DESIGN.md          # design doc

Development

From the repo root (recommended — uses npm workspaces):

npm ci
npm run dev

Or install packages separately:

cd packages/rich-editor && npm install && npm run build
cd apps/demo && npm install && npm run dev

Live demo (GitHub Pages)

After enabling GitHub Pages (see below), the demo is published at:

https://rinsvent.github.io/rich-editor/

Build locally the same way CI does:

npm run build:pages
npx vite preview --base /rich-editor/ --outDir apps/demo/dist

One-time GitHub setup

  1. Open repository Settings → Pages.
  2. Under Build and deployment → Source, choose GitHub Actions (not “Deploy from a branch”).
  3. Push to master (or run the Deploy demo to GitHub Pages workflow manually).

The workflow .github/workflows/deploy-demo.yml builds packages/rich-editor, then apps/demo with base: /rich-editor/, and uploads apps/demo/dist.

npm package

Published as @rinsvent/rich-editor on npm.

npm install @rinsvent/rich-editor react react-dom

First-time publish (manual)

npm ci
npm run publish:lib

You need to be logged in (npm login) as rinsvent.

Automated publish (CI)

  1. Create an npm Granular Access Token at npmjs.com/settings/rinsvent/tokens:
    • Packages and scopes: read/write for @rinsvent/rich-editor (or all packages)
    • Enable Bypass 2FA if your account uses 2FA
  2. Add the token to the repo as secret NPM_TOKEN: Settings → Secrets → Actions.
  3. Bump version in packages/rich-editor/package.json, commit, and push to master.

Workflow .github/workflows/publish.yml will test, build, publish to npm (if that version is not published yet), and create a GitHub Release automatically.

Other triggers (optional):

  • Push tag v0.1.1 (must match package.json)
  • Publish a GitHub Release manually
  • Run Publish to npm from Actions

If CI fails with ENEEDAUTH, the NPM_TOKEN secret is missing or invalid — repeat step 1–2.

Docs

See docs/DESIGN.md for API and architecture.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages