Plugin: Share note online via HackMD

Hello everyone :wave:
I'm a new user of Joplin since 11 Nov 2021. This is a great app that I've always looked for :raised_hands:

Here's the first plugin I wrote. Basically for myself, because I often share quick notes with my colleagues

Joplin :arrow_right: HackMD

HackMD Joplin Plugin is an unofficial plugin to extend the export tools of Joplin's desktop application.

It allows sharing notes online on the HackMD website

Features

  • Saves HackMD user credentials in secured store
  • Uploads note online using HackMD website (one-way share: Joplin :arrow_right: HackMD)
    • Content: {temporary} text only (see Roardmap)
    • Access for a new note by default: read - everyone; write - owner only;
  • Content of already uploaded note could be updated by re-share

Usage

Register on HackMD.io

Then create personal access token (instruction)

Fill HackMD plugin settings

Open Tools > Options > HackMD sync and fill the HackMD User Access Token field

Share

Select target note and press the Share on HackMD button

Share button

Wait. If everything is ok - note body will contain link to note on HackMD
Result

RoadMap (sorted from high priority to low):

  • Share with pictures
  • Export tags (partially completed)
  • Option to share on private CodiMD server
  • Bulk share
  • Continuous syncing (one-way periodical sync Joplin :arrow_right: HackMD)
  • Both ways sync (Joplin :left_right_arrow: HackMD)
  • Bidirectional links

Thanks

15 Likes

Thanks for making this! It's amazing to see all the different ways people use Joplin.

Have you added the share to HackMD to the command palette? (ctrl shift p)

@whitewall Thanks for your quick feedback

Have you added the share to HackMD to the command palette?

Not yet. But thanks for the idea. I'll add that soon if someone needs it :wink:
UPD Wow. It's actually already added :slight_smile: (automatically by Joplin's command registration)

2 Likes

Congratulations on the plugin, I just installed and tested it and it worked perfectly. The only thing I haven't found, so to speak, is a way for tags added in Joplin to be applied to text in HackMD. Would it be possible to add this feature in a future plugin update?

Again, congratulations and many thanks for this excellent plugin! :wink:

1 Like

@samej Wow. Thanks for the kind feedback :handshake: and congrats on the first comment on the Joplin community forum! :raised_hands:

I've added your feature request to the roadmap (see 1st post) I will add this in the next update, approximately next week

1 Like

@xardbaiz very grateful for the reception and for adding my request to the roadmap (I already checked the edit in the first post above :wink:).

As for the date of the update, let it be in your time.

A great idea, I might consider implementing a github gist in the vscode plugin to quickly share a single note.


Update, someone has already done it in vscode

I was thinking about writing a plugin to share via gist, but gists can't do images (as in I can't upload images), thus I guess I won't write it after all.

This HackMD plugin is a great alternative.

1 Like

@tessus
Thanks :slight_smile:

FYI: HackMD also doesn't support image uploading that's why they use imgur as external image hosting. It's visible in the browser DEV console when image attachment is in progress

1 Like

I wanted to avoid writing a wrapper for imgur when publishing a gist. I wanted to have everything on gh. e.g. I can paste/upload images to issues.

HackMD does not natively do images, but I think they provide an API.

1 Like

I can't find the screen to config - can you help ?

Joplin 2.6.10 (prod, win32)
plugin version : 1.0.1

image

@koyj it should be there. Try to reinstall the plugin

@samej your feature request status:

I've done with tags adding to note metadata but seems like they are appearing on HackMD only after indexation, which can be caused by manual editing (at least one symbol change) on the web interface. See GIF:
jhmd.gif
(test note is here)

So it requires more time to call HackMD indexation from the plugin via WebSockets.
WebSockets operations aren't in the SDK, so I don't even know yet is it possible or not.

If it's ok for you to manually open the note each time after uploading - you can manually install version 1.1.0b

1 Like

@xardbaiz
Out of curiosity, what's your opinion on HackMD open source forks?

  • HedgeDoc: independent fork. It has quite a few public servers aside from the main demo one.
  • CodiMD: the main open source core

I don't follow the main differences, except forks allow much more freedom than HackMD (number of collaborators, size, etc). I'm just curious if you have considered the forks in your project and had a strong opinion about them or they just didn't appear on your radar?

@graphit0 Yes I've explored them. But only Hack MD has a free web version with persistent notes storage. CodiMD & HedgeDoc work only on-premise, in local environment == not global.
That's why I chose HMD. To share links globally

BTW: talking about your feature request: I'm currently trying to run CodiMD or HedgeDoc locally with Docker Compose to check my plugin compatibility. But they don't want to connect to the DB :frowning:
Maybe someone could help me with running those apps in Docker?

Well, once again HedgeDoc does offer demo server/free web version and have a list of intended for public use servers (although they are not so easy to properly register on). But I agree that the service is young and not quite as reliable as HackMD. Infact, they cannot guarantee that the notes won't be deleted. In any case, gotcha!

Here's their support forum where you can describe the problem in detail and have someone guide you through the process.

There's also a matrix chat for quick questions

In fact there's an ongoing tread about the docker image at the moment

1 Like

Hi @xardbaiz, sorry for the delay in responding.
The last week has been extremely unusual for me. :cry:

I liked the result. I downloaded v1.1.0b and will do my tests, then (in the next few hours) I'll bring you feedback.

Thank you very much for your attention and dedication. :wink:

Hello again @xardbaiz, as promised, here I am to bring you my feedbacks.

For some reason (I don't know), the plugin didn't work. The menu for entering HackMD login and password is not displayed in the corresponding location and the share icon does not appear on the toolbar.


Installed Plug-ins

 

Initially, I thought it was something related to the outdated version of Joplin, so I updated the app and it still didn't fix it. I installed other plugins that add icons to the toolbar and they worked perfectly.


Toolbar and About Joplin v2.6.10 (AppImage)

 

I also tested the stable version of your plugin and the result remained the same, no login/password menu and no toolbar icon.

Here are some screenshots of my computer's settings:


Neofetch

 


Screenfetch

 

Note: the last time I tested Joplin-HackMD, it was on another HD that is not installed on my computer at the moment.

If you can guide me to carry out more tests, I would appreciate it! :wink:

Regards.

1 Like

@samej Have you tried to uninstall 1.0.1, restart Joplin and install 1.1.0b manually?

@xardbaiz, yesterday I did this three times, to be exact. And the result was the same.

Today I tested again and the result I reported above remains.