That's brilliant, thanks for sharing this. I'll give it a try soon.
As for publishing it to the add-on store, if it's like Firefox add-ons it shouldn't be too difficult. We had some issues because we need full access to the page (so they ask for the source code, etc.) but in this particular case it should be fine.
On first try it seems to work well. It even imports HTML emails and convert them to Markdown and includes images.
There are some possible improvements, like the ability to export only the selected part of the email (since often you don't want to have all the quotes below), and more status info when there's an error, but other than that it's already very good.
It took some time until I realized that the email can be in HTML or text format. The user can chose a preferred type at the settings. If it's not available, there is a fallback to the other type.
I will add your suggestions to my todo list. Not sure whether Thunderbird provides a method to get the current selection, but I will check it.
Btw. which OS did you use? I'm not too confident that everything works on windows/mac, since I only use linux.
I will wait until it is available to test because I don't understand how to install it manually. Usage question: is it possible to share a mail as a todo?
You could download it from here, unzip it and import it as shown in the demo video in the readme. As you said, it's not really intuitive. However, I plan to release the addon this month, dependent on how much free time I have and how long the Thunderbird release process takes.
About the todo: Currently it's not possible to export as todo, but it should be trivial to add it. I will do that soon. Note that there is a limitation: For switching between "export as note" and "export as todo", you would have to navigate to the settings everytime.
I just installed and tested it, it seems to work very well. Thanks to you, it's very useful.
Maybe something to add sometime. I am one of the people who hide the mail toolbar in Thunderbird. It would be useful for this use case to have the possibility to configure a keyboard shortcut.
Edit: Probably I misunderstood the link. Adding a shortcut is possible via the commands API. Since "Ctrl+J" and "Ctrl+Shift+J" are taken already, I would add "Ctrl+Alt+J" for now. Or maybe there is a more convenient option?
I think it must be possible. I use for example an extension (cb_thunderlink) that plays the role of callback links to open messages from another application (often Joplin) and that allows keyboard shortcuts.
That's a good example, since the addon is open source (and I understand what's happening in the code ). It should be possible to add the shortcut like it's done there.
Short update: The following features should be available at upstream now:
Export a selected part of the email. For now it's only possible to export text. Images are a bit tricky and not working, yet.
Export an email as todo.
Export by hotkey. Default is "Ctrl+Alt+J".
Trim the subject by a regex. This is useful for removing "Re:"/"Fwd:"/... from the start of the subject. For me particularly ^(((Re|Fw|Fwd):|(\[.*\])) ?)* was useful.
Thanks for this! It's just what I've wanted! I'm running Thunderbird 91.7.0 under openSUSE Tumbleweed. Here are two suggestions for your list:
Ability to select the Joplin folder for each export. (I don't mind the extra interaction, particularly if the extension remembers the last selected folder.
An option to include mail headers, as displayed by Thunderbird.