Hi
I'm trying to add annotations support to Joplin (really, the "last" grand feature Joplin is really missing) via a plugin. But for that I need to be able to hook to the selection context menu and I need to get cursor location (as well as selection text). Is there any chance this can be added to Joplin's plugin APIs?
Thank you
1 Like
That may need to be confirmed, but I think you can already do all that using a content script and the CodeMirror 6 API?
https://joplinapp.org/api/references/plugin_api/enums/contentscripttype.html#codemirrorplugin
Do I understand correctly that you refer to the editor?
I was talking about the viewer only. The use-case is that I read my notes in the viewer mode, not in the editor mode. And I want to be able to select text with a finger or a mouse and in the context menu to click "Highlight" (or equivalent).
Oh ok I see, then I'm not sure if it can be done since there's not much access to the view. But if you want annotations presumably the note needs to be modified and usually it's better to do this from the editor.
Correct, note will have to be modified and I understand it's best to do from the editor, but this is not user experience anybody wants, who reads the note. At least not me. I prefer to _ read _ the note and then highlight something. Otherwise one either needs to read unformatted markdown (e.g. tables?), or to jump back and forth between editor/viewer (and cursor/scroll is not shared), or to sacrifice half of the screen for split view.
I understand that current solutions are rather crutches. Highlights/annotations are such an important part of note-taking that it was best if there was native support, instead of plugins. However, if there was any way, I'd opt for it. With annotations, so many new use-cases of Joplin can appear, that are currently taken by other software.