Editor document schema in packages/shared #24
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#24
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Editor, server derivation, exports, and plugin validation must agree on one document schema (ADR 0004).
Scope
Define the ProseMirror schema in
packages/shared/src/editor-schema/: doc, paragraph, headings 1–4, bullet/ordered/task lists, blockquote, code block, table, image (attrs: fileId, alt, width), horizontal rule, hard break; marks: bold, italic, code, strikethrough, link (href, protocol-allowlisted). Reserve node nameswikilinkandplugin_block(added later). ProvidedocToMarkdown,markdownToDoc,docToPlainText,docToHtml,extractOutlinebuilt on prosemirror-markdown/model, with fixture-based unit tests.Acceptance criteria
docToHtmlescapes everything and allowlists link protocols (security.md)Technical notes
Dependencies
Depends on #1.
Size: ~1.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Note: the initial commit (
b89aa6b) auto-closed this issue via theCloses #24keyword on push, but CI'sLint, typecheck, testjob actually failed (Prettier formatting was not checked locally before pushing, only ESLint). Fixed inb0d9a00— full pipeline is now green: https://gitea.101010.cloud/stwaidele/dorfteich/commit/b0d9a00Lesson for future sessions: run
pnpm lint(ESLint and Prettier) locally before pushing, not just ESLint on the changed files.