Trilium: FR: Drag and drop documents from file managers

Created on 18 Feb 2019  路  14Comments  路  Source: zadam/trilium

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.

Most helpful comment

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

All 14 comments

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

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

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

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.

Thanks for the additions

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

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

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

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.

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.

Thanks I will take a look at it.

@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

Yes, drag & drop always uses default settings.

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

Was this page helpful?
0 / 5 - 0 ratings