FR: Drag and drop documents from file managers #4277

Closed
opened 2025-10-01 16:37:22 -05:00 by giteasync · 14 comments
Owner

Originally created by @gerroon on GitHub.

Hi

It would be very helpful if one can drag documents and drop into Trilium, both as an attachment and as a new document. If it is a recognized attachment and it is text based it would insert is the content.

At the moment when I try such action, it pretends that it will do it but I get a pop up that says "moving cloning here would create cycle"

I am using the Linux version.

Originally created by @gerroon on GitHub. Hi It would be very helpful if one can drag documents and drop into Trilium, both as an attachment and as a new document. If it is a recognized attachment and it is text based it would insert is the content. At the moment when I try such action, it pretends that it will do it but I get a pop up that says "moving cloning here would create cycle" I am using the Linux version.
Author
Owner

@gerroon commented on GitHub:

Thanks for the additions

@gerroon commented on GitHub: Thanks for the additions
Author
Owner

@gerroon commented on GitHub:

Also my request is abit more extended than the one you opened. I personoanlly would like to be able to drop documents as content of a note.

thanks

@gerroon commented on GitHub: Also my request is abit more extended than the one you opened. I personoanlly would like to be able to drop documents as content of a note. thanks
Author
Owner

@gerroon commented on GitHub:

Thanks I appreciate it, this would make it great for documentation

@gerroon commented on GitHub: Thanks I appreciate it, this would make it great for documentation
Author
Owner

@zadam commented on GitHub:

This is planned, I created an issue for this a week ago in #407

@zadam commented on GitHub: This is planned, I created an issue for this a week ago in #407
Author
Owner

@zadam commented on GitHub:

Import support is now more extended - drag & drop on tree (or note detail) works and HTML & MD files are by default imported as new text notes (not attachments). Will be released soon.

@zadam commented on GitHub: Import support is now more extended - drag & drop on tree (or note detail) works and HTML & MD files are by default imported as new text notes (not attachments). Will be released soon.
Author
Owner

@zadam commented on GitHub:

Thanks for report, looks like your issues were caused by the windows not giving correct MIME types (I was developing on linux which worked fine). I fixed that by detecting from the file extensions instead which works on windows as well. Fix is in 0.30.3-beta.

@zadam commented on GitHub: Thanks for report, looks like your issues were caused by the windows not giving correct MIME types (I was developing on linux which worked fine). I fixed that by detecting from the file extensions instead which works on windows as well. Fix is in 0.30.3-beta.
Author
Owner

@zadam commented on GitHub:

If you right-click on the tree and then Import, you can configure the import - specifically if you uncheck "Import HTML, Markdown and TXT as text notes if it's unclear from metadata" then .md file will be imported as a code note.

Drag & drop uses default settings which imports markdown as text file.

@zadam commented on GitHub: If you right-click on the tree and then Import, you can configure the import - specifically if you uncheck "Import HTML, Markdown and TXT as text notes if it's unclear from metadata" then .md file will be imported as a code note. Drag & drop uses default settings which imports markdown as text file.
Author
Owner

@gerroon commented on GitHub:

@zadam

Thanks for the new fix. It works, almost. I can import an .md as a regular not but it imports as text file. And the issue with that is this, then I need to convert it to .md from regular text, and that totally messes up the note and converts to that html thing.

thanks for the new fixes and additions again.

@gerroon commented on GitHub: @zadam Thanks for the new fix. It works, almost. I can import an .md as a regular not but it imports as text file. And the issue with that is this, then I need to convert it to .md from regular text, and that totally messes up the note and converts to that html thing. thanks for the new fixes and additions again.
Author
Owner

@gerroon commented on GitHub:

MD files are by default imported as new text notes (not attachments

Ok I just tested the latest release and I am not getting that work properly. It still adds it as an attachment. I just dragged and dropped an README.md

I am on Win 10 0.30.2-beta

@gerroon commented on GitHub: > MD files are by default imported as new text notes (not attachments Ok I just tested the latest release and I am not getting that work properly. It still adds it as an attachment. I just dragged and dropped an README.md I am on Win 10 0.30.2-beta
Author
Owner

@gerroon commented on GitHub:

Ok I did a bit more testing, it is a bit confusing

D&D of an .md onto the tree creates an attachment file

D&D of an .md into an empty document area imports the content but it still creates an attachment file in the tree

@gerroon commented on GitHub: Ok I did a bit more testing, it is a bit confusing D&D of an .md onto the tree creates an attachment file D&D of an .md into an empty document area imports the content but it still creates an attachment file in the tree
Author
Owner

@gerroon commented on GitHub:

Sure but that does not make things easy, One always end up needing to use the import menu to get the right format.

Will it be possible to change those defaults so the user can actually utilize the drag and drop approach?

thanks

@gerroon commented on GitHub: Sure but that does not make things easy, One always end up needing to use the import menu to get the right format. Will it be possible to change those defaults so the user can actually utilize the drag and drop approach? thanks
Author
Owner

@gerroon commented on GitHub:

Thanks I will take a look at it.

@gerroon commented on GitHub: Thanks I will take a look at it.
Author
Owner

@gerroon commented on GitHub:

@zadam

Ok I tried your recommendation. It works only if I go through that right click import, otherwise those settings are not remembered for drag and drops on Windows as far as I can tell.

thanks

@gerroon commented on GitHub: @zadam Ok I tried your recommendation. It works only if I go through that right click import, otherwise those settings are not remembered for drag and drops on Windows as far as I can tell. thanks
Author
Owner

@zadam commented on GitHub:

Yes, drag & drop always uses default settings.

@zadam commented on GitHub: Yes, drag & drop always uses default settings.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TriliumNext/Trilium#4277
No description provided.