Skip to content

Comments

Desktop: Support converting multiple notes from HTML to Markdown at once#13802

Merged
laurent22 merged 4 commits intolaurent22:devfrom
personalizedrefrigerator:pr/desktop/support-html-to-md-bulk-convert
Dec 1, 2025
Merged

Desktop: Support converting multiple notes from HTML to Markdown at once#13802
laurent22 merged 4 commits intolaurent22:devfrom
personalizedrefrigerator:pr/desktop/support-html-to-md-bulk-convert

Conversation

@personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Nov 28, 2025

Summary

This pull request adds a right-click and multiselect menu item when only HTML notes are selected that allows converting from HTML to Markdown.

Previously, it was only possible to convert notes from HTML to Markdown one-at-a-time through the "Convert it to Markdown to edit it more easily" banner.

Notes

  • The "Convert to Markdown" option is only shown if at least one of the selected notes are in HTML format.
  • Refactoring: This pull request moves the convertNoteToMarkdown command implementation to packages/lib/commands. In the future, this should simplify adding UI to convert HTML notes to Markdown to the mobile app.

Testing

Screen recording

Screencast.from.2025-11-28.09-54-37.webm

The above screen recording shows:

  1. Selecting multiple HTML notes.
  2. Clicking the "Convert to Markdown" button in the multiselect menu.
  3. The notes being replaced with their Markdown equivalents.

Additional manual testing

It has also been manually verified that:

  1. Selecting multiple notes (where some of the of the notes are Markdown and at least one is HTML) causes the "Convert to Markdown" menu item to be shown.
    • If "Convert to Markdown" is then clicked, only the HTML notes are converted to Markdown.
  2. Selecting multiple notes (where all notes are Markdown) does not cause the "Convert to Markdown" menu item to be shown.

@laurent22
Copy link
Owner

The "Convert to Markdown" option is only shown if all selected notes are in HTML format.

How tricky would it be to make it apply to all notes regardless of format, but then during conversion only process those in HTML format? I think that would be easier for the user, since if you have many notes you might not want to find out which one is or is not already Markdown

@personalizedrefrigerator
Copy link
Collaborator Author

personalizedrefrigerator commented Nov 29, 2025

How tricky would it be to make it apply to all notes regardless of format, but then during conversion only process those in HTML format?

It should be very easy (there's already logic for this!). Perhaps it would make sense to change the enabled condition from allSelectedNotesAreHtml && ... to selectionIncludesHtmlNotes && ... (or similar), so that the option is enabled if at least one HTML note is selected.

@laurent22
Copy link
Owner

Perhaps it would make sense to change the enabled condition from allSelectedNotesAreHtml && ... to selectionIncludesHtmlNotes && ... (or similar), so that the option is enabled if at least one HTML note is selected.

Yes I agree that would be better

@personalizedrefrigerator
Copy link
Collaborator Author

change the enabled condition from allSelectedNotesAreHtml && ... to selectionIncludesHtmlNotes && ... (or similar), so that the option is enabled if at least one HTML note is selected.

Implemented in 4f062db.

@laurent22 laurent22 merged commit f9d5874 into laurent22:dev Dec 1, 2025
11 checks passed
@personalizedrefrigerator personalizedrefrigerator deleted the pr/desktop/support-html-to-md-bulk-convert branch December 10, 2025 15: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.

2 participants