Skip to content

feat: add markdown editing mode to the rich-text editor - #3466

Open
ngoc-minh-do wants to merge 1 commit into
go-vikunja:mainfrom
ngoc-minh-do:feat/editor-markdown-toggle
Open

feat: add markdown editing mode to the rich-text editor#3466
ngoc-minh-do wants to merge 1 commit into
go-vikunja:mainfrom
ngoc-minh-do:feat/editor-markdown-toggle

Conversation

@ngoc-minh-do

@ngoc-minh-do ngoc-minh-do commented Aug 9, 2026

Copy link
Copy Markdown

Summary

Adds a Visual / Markdown toggle to the rich-text editor so a task description (or comment, project description, etc.) can be edited as raw GFM Markdown instead of through the WYSIWYG toolbar.

  • Frontend (TipTap.vue): a segmented Visual | Markdown toggle appears next to the Save button while editing. In Markdown mode the toolbar and WYSIWYG surface are replaced by a monospace textarea. Switching modes is instantaneous and draft autosave (localStorage storageKey) works in both modes.
  • Backend (pkg/routes/api/v2/richtext.go): new POST /api/v2/richtext/convert endpoint ({from: "html"|"markdown"}) reusing the existing richtext.HTMLToMarkdown / richtext.MarkdownToHTML converters. It is stateless — mentions survive as plain text, matching the editor's lossy-format contract. Content remains stored as canonical HTML.

Testing

  • Backend: added TestHumaRichText_Convert covering HTML→Markdown, Markdown→HTML, task-list conversion, and an invalid from value (422). go test -run 'TestHumaRichText' ./pkg/webtests/ passes.
  • Frontend: pnpm lint:fix (0 errors), pnpm lint:styles:fix, pnpm typecheck (no new errors).
  • Manual: toggled between modes in the task description editor; content round-trips correctly.

Screenshots

image

AI disclosure: this change was generated with AI assistance and reviewed locally before opening.

@github-actions github-actions Bot added area/api-v2 Huma-backed /api/v2 API surface area/frontend Frontend-only code or UI work area/task-editor Task detail view, inline editing, rich text labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api-v2 Huma-backed /api/v2 API surface area/frontend Frontend-only code or UI work area/task-editor Task detail view, inline editing, rich text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant