Skip to content

Conversation

@DeJeune
Copy link
Collaborator

@DeJeune DeJeune commented Jan 9, 2026

What this PR does

Before this PR:

  • Notes page did not have an option to export notes to Word format

After this PR:

  • Users can now export the current note to a Word document (.docx) directly from the Notes page menu

Why we need it and why it was done in this way

The following tradeoffs were made:

  • Reused the existing ExportService which already has markdown-to-Word conversion functionality using the docx library
  • Added the export option to the existing dropdown menu for consistency with other note actions

The following alternatives were considered:

  • Adding a separate export button in the toolbar - decided against this to keep the UI clean and consistent

Breaking changes

None. This is a new feature addition.

Special notes for your reviewer

  • The ExportService.ts already existed and handles the markdown-to-docx conversion
  • The IPC channel Export_Word was already registered in ipc.ts
  • Only needed to add the UI trigger and i18n translations

Checklist

  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required

Release note

feat(notes): Add "Export to Word" functionality to the Notes page, allowing users to export notes as .docx files

Add a menu item in the Notes page to export the current note to a Word document.
The feature leverages the existing ExportService which converts markdown to docx format.

Changes:
- Add "Export to Word" menu item in MenuConfig.tsx
- Add handleExportToWord handler in HeaderNavbar.tsx
- Add i18n translations for all supported languages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
window.toast.warning(t('notes.no_content_to_export'))
return
}
if (!activeNode) {
Copy link
Collaborator

@GeorgeDong32 GeorgeDong32 Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This comment was translated by Claude.

Wouldn't it be more logical to check if a note is selected first before checking the content?


Original Content

这里是不是先检查有没有选中笔记再检查 content 逻辑通畅一些

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.

3 participants