Skip to content

feat: add document publishing pipeline (HTML export, rich text copy, PDF)#4

Merged
gdilla merged 1 commit intomainfrom
feat/publish-pipeline
Mar 10, 2026
Merged

feat: add document publishing pipeline (HTML export, rich text copy, PDF)#4
gdilla merged 1 commit intomainfrom
feat/publish-pipeline

Conversation

@gdilla
Copy link
Owner

@gdilla gdilla commented Mar 10, 2026

Summary

  • Export as HTML (Cmd+Shift+H): serializes Tiptap content with embedded theme CSS, pre-renders math (KaTeX) and mermaid diagrams to static HTML/SVG
  • Copy as Rich Text (Cmd+Shift+C): puts text/html on clipboard for rich paste into Slack/Notion/Google Docs
  • Print / Export PDF (Cmd+P): triggers native macOS print sheet with Save as PDF option
  • Status toast shows export progress/success/error with auto-dismiss

Test plan

  • 17 new tests (12 utility + 5 store), all passing
  • pnpm check passes (typecheck + lint + rust:lint)
  • Manual: open a markdown doc with headings/code/tables → Cmd+Shift+H → save HTML → open in browser
  • Manual: Cmd+Shift+C → paste into Google Docs → formatting preserved
  • Manual: Cmd+P → native print sheet appears → Save as PDF works

🤖 Generated with Claude Code

…PDF print)

Add three new publishing actions accessible from the File menu:
- Export as HTML (Cmd+Shift+H): renders math/mermaid, embeds theme CSS, saves standalone HTML
- Copy as Rich Text (Cmd+Shift+C): puts rendered HTML on clipboard for pasting into Slack/Notion/Docs
- Print / Export PDF (Cmd+P): triggers native macOS print sheet with Save as PDF option

New files:
- src/utils/publishDocument.ts — core rendering and export utilities
- src/stores/publish.ts — Pinia store with status tracking and auto-reset timers
- src/components/ExportToast.vue — transient toast for publish status feedback
- Tests for both the utility module and the store

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gdilla gdilla merged commit b79de39 into main Mar 10, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant