DT3b3: Drag and drop into Markdown doc does not create a Markdown formatted link

I have been wanting to use Markdown more in DT3 so I have gone through the page in the help document titled “Markdown Documents”. That page discusses how to create Markdown formatted links by dragging items into the Markdown document.

This is not working for me and I have been playing around with it trying the different methods described in the help page.

I started with drag/drop and what I found is that nothing I tried to drag into the document created a link. The only exception was an image which created a wikilink not a Markdown formatted link. dragging in any kind of text file (plain text, rtf, pdf+Text, md, html, webarchive) all just pastes in the text contents of the doc, not a link.

If I press Control after starting the drag operation it does create a link but it is a wikilink style, not Markdown.

However, the help doc say I can Control-click in the md doc and choose “Insert Link To” and that does create a Markdown formatted link but it creates a link with an x-devonthink-item link, not something like ![link](item.png) which I guess is understandable, but not good for exporting to a website.

By the way, I’m using beta3 and I have enabled automatic WikiLinks > Names & Aliases in preferences. Also all of the documents I am trying to link to are in the same group as the Markdown document.

Just curious whether anyone else has seen this issue. Perhaps I misunderstand the Help documentation on how this is supposed to work. The help page on this subject was changed between DTPO2 and DT3 to add information about using drag and drop to create markdown formatted links so I assume it is supposed to work.

This is what the help doc says in the Markdown chapter:

If you have enabled automatic WikiLinks > Names & Aliases , documents can be detected as you write your Markdown. These WikiLinks are active when previewing the file and are also preserved in a website export or conversion to other formats. Drag items into the Markdown document in edit mode and have links automatically created. If the dropped file is an image, add an exclamation point before the dropped item’s name, it will create a proper Markdown formatted image link.

You can ignore my comment about website export, the help is not real clear on how to export markdown to a website, I was trying to export the markdown file only, I didn’t realize I had to select all the files that are linked to in md file at the same time…

If you have enabled automatic WikiLinks > Names & Aliases , documents can be detected as you write your Markdown. These WikiLinks are active when previewing the file and are also preserved in a website export or conversion to other formats. Drag items into the Markdown document in edit mode and have links automatically created. If the dropped file is an image, add an exclamation point before the dropped item’s name, it will create a proper Markdown formatted image link.

This is working, however it is only a WikiLink (note the change in emphasis I made.).
It does not create a Markdown formatted link.

As a daily user of Markdown, I would love to see items dragged into a Mardkown document resolve as proper, if basic, Markdown links. However, @cgrunenberg would have to assess that and the amount of interest.

Thanks for the response. But back to my OP…

The help doc says Drag items into the Markdown document in edit mode and have links automatically created. That is not working. If I drag any file other than an image file, the actual contents of the file are copied into my Markdown document. Even dragging a PDF in copies the OCR text into my document. There are no links created, just a block of text from the file.

Dragging an image into the MD doc will create a wikilink, but the help doc indicates:

If the dropped file is an image, add an exclamation point before the dropped item’s name, it will create a proper Markdown formatted image link.

It sounds like from your response that the help doc is incorrect because this creates a wikilink not a Markdown formatted link. Also it does not export to a website correctly.

The only thing that generates a “proper Markdown formatted link” that I could find is to use Control-click in the Markdown doc and choose “Insert Link To”. Unfortunately that is very tedious since that bring up a a huge list of every open database and then you have to navigate through the groups to find the doc you want linked, this takes a very long time even to find a doc that is inside the group you are currently working in.

I have a attached a zip file with a Markdown file and support files I used to test this, it shows more clearly step by step what I’m trying to explain. I have also included the website created with the website export. Hopefully it explains a bit more what I’m seeing…

Markdown_Drag_Drop_Issue.zip (284.5 KB)

Sorry to resurrect this topic, but I agree with @jdharper. My expectation of the [[wikilink]] behaviour is that it would do what Bear, Notion, etc do, which is essentially to create a link to a document that doesn’t exist. If DT created the page being linked to in order to make a link that would be fine, but its extremely tedious to manually create the destination pages and then link them back.

The example I have is as follows:

I had a meeting with a sales person whom I was helping with approaches to reach new customers. I documented my meeting in a markdown note and wanted to create a bulleted list of customer accounts he was targeting. After this I wanted to start researching each customer and collecting information for him.

So I had this kind of structure:

  • [[Customer One]]
  • [[Customer Two]]
  • [[Customer Three]]

and so on. Having typed each of the customers, I expected DT to create a hanging link which, when I clicked on it would create a new document and link it to the original so I could continue with my research.

I found the only real way to do this was to switch on the smart linking on name and create documents for each customer. When I went back to the original meeting note I found that DT had linked them up for me. This is a bit counter-intuitive, and I hope you’ll consider making DT work like other products in this respect.