---
title: "Scientific Editor"
description: "TipTap publications editor — equations, version history, AI research assistant (distinct from TipTap news authoring)"
locale: "en"
---
# Scientific Editor

Ring Platform ships a **TipTap** scientific publication editor for structured long-form work (research notes, technical articles, cooperative reports). It is **not** the news ArticleEditor — news uses a leaner TipTap NewsEditor with slash commands, embeds, and community revise. See [News Module](/docs/features/news.md).

> **Info**
> Use the **Founder** / **Developer** tabs in the docs sidebar to filter this page.

  
- **[News Module](/docs/features/news.md)** — TipTap news authoring, My News, and pending-revision amendments.

  
- **[Locale system](/docs/features/locale-system.md)** — next-intl bundles including `editor.json`.

  
- **[Real Time](/docs/architecture/real-time.md)** — Tunnel transport — foundation for gated publication CRDT collab.

## Shared vs news TipTap

| Concern | Scientific Editor | News TipTap NewsEditor |
|---------|-------------------|-------------------------|
| Content store | Publications TipTap **JSON** (`publications` collection) | News **HTML** string (`news.content`) |
| Route | Authenticated `/editor` | `/news/create`, admin news, `/news/[slug]/revise` |
| Math / citations | LaTeX + citation detector | Not included |
| Version history | `publication_versions` API + panel | Side-channel `news_revisions` (community propose) |
| Slash `/` menu | Toolbar-first today | Notion-style slash shipped |
| Live CRDT | Scaffolded (`useCollaboration`, snapshot API) — not TipTap-wired | Same gate; news channel `collab:news:{id}` planned |

### For founders

## When to use it

Use the Scientific Editor when your community needs **papers and long technical docs** with equations, citations, and snapshot/restore. Use **News** for newspaper-style articles, embeds, Mood Player, and community revise on published posts.

Typical flow: open `/editor` → write → autosave creates/updates a publication → snapshot versions when you need a restore point → publish when your product workflow allows.

### For developers

## Components

| Path | Role |
|------|------|
| `components/editor/scientific-editor.tsx` | TipTap main surface (`@tiptap/*` 3.x) |
| `components/editor/editor-toolbar.tsx` | Formatting toolbar |
| `components/editor/equation-editor.tsx` | LaTeX equations |
| `components/editor/version-history-panel.tsx` | Document versions UI |
| `components/editor/ai-research-assistant.tsx` | AI-assisted research |
| `components/editor/extensions/latex-extension.tsx` | Math node |
| `components/editor/extensions/citation-detector-extension.ts` | Citation detection |
| `app/[locale]/(protected)/editor/page.tsx` | Authenticated editor route (platform) |

## Publications API

- `GET/POST /api/publications` — list and create  
- `GET/PUT/DELETE /api/publications/[id]` — single publication  
- `GET/POST /api/publications/[id]/versions` — list / snapshot / restore  

Backed by `features/publications/services/publication-service.ts` and `DatabaseService` `*Doc` methods. Content field is TipTap JSON (`Record<string, unknown>`).

## Collaboration scaffolding

| Piece | Status |
|-------|--------|
| `hooks/use-collaboration.ts` | Y.Doc + `YjsTunnelProvider` when `NEXT_PUBLIC_COLLAB_ENABLED` + native WSS |
| `app/api/collab/[publicationId]/snapshot` | Gated stub — snapshot persistence TODO |
| TipTap Collaboration / CollaborationCaret | **Not** mounted on ScientificEditor yet |

Do not document live multi-cursor editing as shipped. Channel pattern for publications: `collab:{publicationId}`.

## Internationalization

Editor UI copy lives in `locales/{en,uk,ru}/editor.json` via `next-intl` (`useTranslations('editor.*')`). See [Locale system](/docs/features/locale-system.md).

## Citations

`components/editor/extensions/citation-detector-extension.ts`, `lib/citation-detector/`.

## Related

- [News Module](/docs/features/news.md)
- [Development: code structure](/docs/development/code-structure.md)
- [Locale system](/docs/features/locale-system.md)
- [Real Time](/docs/architecture/real-time.md)
