zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.27k stars 1.91k forks source link

Copy link to book/note/... for external program #1012

Open DimitriyPro opened 4 years ago

DimitriyPro commented 4 years ago

Hi team, I've just find Trilium notes and it's best program for note taking, I suppose. So, I can't find an easy way to copy a link on book/note/ etc. If I choose edit a link, I can copy something like this http://127.0.0.1:37840/#root/WJgHkuKn9kSy/svHxOLcYwmIs/AAsx4NSZiqc4/Hwnc96O7wlg2 But I can't get an access via this link. For example in OneNote links looks like this: onenote:///C:\Notes\OneNote\lib\cpp.one#build&section-id={14B3EE87-2BD1-4804-8E25-CA10FEC5352B}&page-id={363824B7-6167-4715-9EA1-EE87B5BBD0E8}&object-id={231F4F9E-BB85-01DD-2368-26AE922C4AB6}&1E Trilium approach is more usefull, since this type of links can be used in different software like TheBrain but how to fix it? Thank you!

zadam commented 4 years ago

Hello, so the reason why onenote can be opened externally is because it registers custom "onenote://" protocol handler.

This has not been implemented yet. This has been already reported but unfortunately can't find the exact issue.

DimitriyPro commented 4 years ago

You have all for done it - local web-server on port 37840 is more powerfull and cross-platform then OneNote solution - just return a note as web-page.

zadam commented 4 years ago

The problem is that this would be quite unsecure - any application running on your computer could steal your notes by just querying for the port 37840 and following the links. The better way would be the protocol handler - the link just opens the Trilium app and so data stealing is not that easy ...

DimitriyPro commented 4 years ago

Ok, but I hope you agree that users want usefull feature right now, migrare from discomfort notetaking software and support your project. For example, when you think about my security and don't add this feature I still use OneNote ((( I think there is three steps to solve this trouble (I hope it will be usefull for you): add option "start web-server by your own risk" -> add password request (floating window) with session -> add two-factor auth with token (file on usb or mobile app).

zadam commented 4 years ago

Ok, but I hope you agree that users want usefull feature right now

Well, I would like to have all the features implemented right now as well :-)

My time is limited and I have to use it with thought. Part of that is that I don't want to implement temporary half hack/half solution when a real solution is in sight (even if it takes more time).

gerroon commented 4 years ago

@zadam

Why not create a special link that can be opened in a browser? That is how Nextcloud does shares, it just creates a special link which can be opened by anyone who has that particular link.

It would be even better if the link can be linked to the hosted server, that way we can sahres note with the external world.

Joplin also has a NC component where one can share a note via NC shares.

zadam commented 4 years ago

What you describe would indeed work for sharing between people.

But I think this is a different use case - Dimitry is not trying to send note to somebody else, only link locally and for that reusing "share" functionality would not lead to expected result (since it would open a read only page in a browser instead of an app).

DimitriyPro commented 4 years ago

Yes, you are right dear @gerroon I mean that web-access to notes is killing feature: for private using and for share it. Custom protocol handler it is not so good way to do it (sorry for it). For example, users can get all benefits of url instant view. TheBrain (c) example: 2020-05-13_9-55-35

OneNote with custom handler looks strange: 2020-05-13_9-59-37

Trilium with web-access looks perfect and native: 2020-05-13_9-59-07

DimitriyPro commented 3 years ago

Obsidian implemented this feature((( obsidian://open?vault=Test&file=%D0%9B%D0%B5%D0%B2%20%D0%A2%D0%BE%D0%BB%D1%81%D1%82%D0%BE%D0%B9 @zadam can I donate for it?

r-nd-m commented 2 years ago

+1 for the feature to copy note link to be used in external application and directly open specific note in Trilium application

grotesque commented 1 year ago

+1 for the feature

meichthys commented 1 year ago

This has not been implemented yet. This has been already reported but unfortunately can't find the exact issue.

@zadam I think you may be referring to this issue: https://github.com/zadam/trilium/issues/649

meichthys commented 1 year ago

Interestingly enough, when in readOnly mode, the file:\\\ links work as expected (They open the local directory when using desktop client). If readOnly mode is off, the directory will not open.

zadam commented 1 year ago

@meichthys yes, this is actually a CKEditor problem. Read only doesn't use CKEditor, it just renders the HTML directly, that's why it works.