Markdown with media

Hi,

I am trying to see if i can replace Evernote with Devonthink. At the moment I run devonthink as my ‘reference manager/database’ and Evernote as my note taking app. I have been testing DTTG and sync and it seems to be ok.
The only problem I still have is that I like to take notes with media and I am not sure how to do that with Devonthink.
E.g. what is the best way to embed images in Markdown in DT? How would one organise such a note, considering that it consists of multiple files?
For PDFs i guess I need to put them somewhere and add a link to it (x-devon…)?

Thank you very much, any help is highly appreciated.

To answer one of my own question:


![](x-devonthink-item://94F9A68A-D3E7-4228-9BC7-D97BEF718F1D)

this works to see it embedded.

no clue about the organisation though

Embedding images can be done with base4-encoded data. However, this will quickly create large (and IMHO, more distracting) files to edit. I write long-form Markdown documents (with images) in DTPO every single day and I advocate linking images. This can be done with a relative or absolute URL.

With my particular approach, I have documents that are housed in their own groups, just like you would for a web page/site. So I would link an image with something like , pointing to a file in the img subgroup.

Another approach, useful for files you commonly re-use, you could get the reference URL (via right-click > Copy Item Link) indeed use something like .

Thanks for the reply.
Just to clarify that I understand you correctly, for each note you create its own independent group that houses the markdown file as well as any ‘reference document’ (pdf, image)?

That is my approach (partially from many years in graphic arts and printing, where data segregation per job was a necessity, so it’s part of my mindset). But beyond my personal preference, it’s still a valid approach for anyone to use.

Here’s an example…

My Group (parent group, titled by day, subject, etc.)

  • TodaysDocument.md (Markdown document)
  • img directory (images pertinent to the day, subject, etc.)
  • resources directory (css, js, etc.)
  • docs directory (miscellaneous linked docs)

And you could also keep the non-Markdown files in the root of the parent group instead of subgroups too. Both are valid.

Note: The resources directory could be in a single location in the database and linked, but I isolate all the data for a given document. Again, part of my mindset, and also it’s due to an ongoing evolution and exploration of the styling and mechanics of Markdown/CSS/JS/etc.

Ok this sounds interesting and doable on the mac, not sure about the ios.
The reason why i am not sure this works is that the DTTG editor is rather ‘simple’, as in, has no editing support whatsoever. Now i copied my MD file over to 1writer but it seems that copying the file back to DT doesn’t really update the original file. I am not sure if this is
I guess on the mac i would just open it in any other editor and it works except for the images.

I know you have explained your workflow quite a bit already but could you expand on the tools you use? Is it exclusively DT(TG) (on both ios/macos)?

I do edit Markdown documents in DTTG, as they are editable there too. I have other some other Markdown apps in iOS but I prefer the simplicity of plain text editing in DTTG. (I’m also not a fan of the hybrid code/rendered views in apps like Bear, but that’s also just a personal preference.)

However, 90% of the time I am creating and editing in DTPO on the Mac. More and better tools plus more flexibility, in general IMHO.

I expect you will have better results using the iOS File Browser. In 1Writer, click on the red circle ‘+’ in the lower-right corner of the screen and select the ‘Open Other…’ option. Select DEVONthink To Go from list of locations and then browse your databases to find the document to edit. Once you are done editing in 1Writer, dismiss the keyboard to save all the changes in the document.

This method is not as convenient as sending a copy of the document using the Share extension while browsing the database in DEVONthink, but in my experience it is by far the most reliable method to edit a document in a DEVONthink to Go database outside of DEVONthink to Go.

Greg, tried this just now and it works beautifully! Thank you, didn’t think of using the Files app. Any idea why when i am in the ‘Browse Files app’ view in 1Writer, the search box doesn’t reveal any of the files i have in DTTG? In the attached screenshot, searching for “amazing” yields an empty list for some reason.

I could be mistaken, but I believe that the search function here is only looking in the document name. I hope I’m wrong about this and someone knows what switch needs to be flipped to enable this, but my searches for tags or document contents turn up nothing in Files.app.

Yea but the document is called “amazing.md”, hence i figured it would find it?

I see, I didn’t scroll the image far enough to see the document name. Perhaps check the Settings.app section for DEVONthink and ensure that the option to enable Search, Suggestions, & Shortcuts is on?

Thanks for the suggestion, and yes, it is on.

I’m seeing the same thing with newly created (in the last hour) documents. Perhaps this is a lag in the Spotlight index update on iOS, so I’m going to check it later myself and see if the results include all documents.

Still can’t find it in Files, 8 hours later :wink:

My markdown documents created recently in DEVONthink are not showing up either. Markdown documents created in other apps are appearing immediately in a Files.app search, so I’m suspecting there may be an issue with DEVONthink to Go.

Edit to add: new plain text files from DEVONthink to Go are not searchable either.

I have filed an issue on this. Thanks for your patience and understanding.

Wondering if it might be iOS related-are you running iOS 11 or the iOS 12 beta. If iOS 12, developer or public release version?

This is a great idea! I started to use this method and will keep using this method until/if text bundles are supported.

@MiWagner: You’re welcome. It has been serving me well for a good long while.

Another benefit of this type of encapsulation, if you’re using relative links (not DEVONthink Item Links), you can drag a group into the Finder and open the Markdown doc and the links, etc. should resolve just as they do in DEVONthink.