Skip to content

Live markdown editor for note body - #88

Merged
thermcampos merged 4 commits into
mainfrom
feat/live-markdown-editor
Sep 25, 2026
Merged

thermcampos merged 4 commits into
mainfrom
feat/live-markdown-editor

Conversation

@thermcampos

Copy link
Copy Markdown
Owner

Summary

Second step of spec ai/specs/003-live-markdown-editor.md (stacked on #87). Replaces the note body textarea with a Notion-style live markdown editor; content is still stored and sent as plain markdown, so the API, existing notes, and shared-note links are untouched.

  • New MarkdownEditor component (client/src/components/MarkdownEditor/index.tsx) built on Milkdown with CommonMark + GFM presets: headers, lists, task lists, bold, italic, code, blockquotes, tables, links, and strikethrough render inline as you type; paste converts rich content and markdown text
  • Body serializes to markdown on every change, feeding the existing draft autosave and save payload unchanged
  • "Preview Markdown" is removed from the editor; ModalMarkdown stays for the Home note view and SharedNote page
  • Character counter appears past 45k chars and saving is blocked client-side at 50k (server limit remains the source of truth)
  • Editor styling maps to Bootstrap theme variables and works in light and dark modes
  • Cypress: new e2e verifies live rendering of #, **bold**, and lists, and that the saved payload is plain markdown

Notes

  • Stacked on Split note editor into hybrid document form #87 (hybrid note form); merge that first
  • Milkdown's serializer normalizes markdown, so saving an old note may reformat untouched sections (accepted in the spec)
  • Bundle grows by ~106 kB gzip due to the editor; code-splitting is a possible follow-up
  • Verified with the frontend quality gate: lint, build, and 152/152 tests pass

💘 Generated with Crush

Turn the note editor into dedicated title, URL, and tags fields arranged
to read as one document, replacing the in-text title/url/tags line syntax.
This prepares the editor for a live markdown body (spec 003) without any
API or storage changes, and migrates existing localStorage drafts to the
new field-based shape. The markdown toolbar spec (002) is superseded and
removed.

💘 Generated with Crush

Assisted-by: Crush:kimi-k3
Swap the plain textarea for a Milkdown editor so markdown renders inline
as the user types, while content is still stored and sent as plain
markdown. Removes the separate Preview Markdown step, adds a character
counter near the 50k limit with client-side save blocking, and themes
the editor for both light and dark modes.

💘 Generated with Crush

Assisted-by: Crush:kimi-k3
Base automatically changed from feat/hybrid-note-form to main September 25, 2026 14:56
@thermcampos thermcampos self-assigned this Sep 25, 2026
@thermcampos
thermcampos merged commit aa8e88b into main Sep 25, 2026
2 checks passed
@thermcampos
thermcampos deleted the feat/live-markdown-editor branch September 25, 2026 16:58
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