Tip: Using Semantic Text and Markdown with DEVONthink

Using Semantic Text and Markdown with DEVONthink

As an introduction, for the most part I have switched from writing and taking notes in Rich Text (RTF) to using plain text files as editing RTF files on an iOS device is not possible at this time. What I missed with plain text files is the ability to add meaning to the text such as:

  • Bold and italic styles;
  • Headers;
  • Simple lists;
  • URLs, images, etc.

I began using Markdown (and it’s super-charged cousin, MultiMarkdown) to add semantic structure to these plain text documents and I’ve really settled in nicely to this workflow. I was already familiar with semantic writing as I was introduced to the concept years ago with the word/text processor Ulysses and John Gruber’s Markdown *1 (and Fletcher Penny’s MultiMarkdown) is currently very popular when writing for the Web. It is not my intent to go into detail here on using Markdown, other than to demonstrate how I am using it with DEVONthink Pro.

The first thing that you will notice about markdown with .txt documents is that using Quick Look with the documents produces a viewer with all the Markdown tags still visible.

Quick Look of a .txt document in DEVONthink:

Fortunately, Fletcher Penny *2 has created Quick Look viewers for MultiMarkdown that can be used anywhere on the Mac where you want to preview a document with Quick Look. As MultiMarkdown is an extension of Markdown, this also works with any document that uses plain MarkDown syntax. Plain text documents must be saved with a .markdown or .md extension to be recognized by the Quick Look viewer. They are still plain text files and can be edited with a plain text editor, such as the built-in editor in DEVONthink.

Viewing the same text document, saved with a .md extension, in DEVONthink, using Penny’s Quick Look viewers:

As well as this workflow works for me, today it gets even better. Brett Terpstra *3 has just released Marked (available in the Mac App Store) that shows an HTML preview of Markdown text in any text file (.txt, .md, .markdown, etc.) while being edited in any text editor, including DEVONthink. The preview is live as the document is saved, and includes document statistics, exports to HTML, prints to PDF, and the Marked window floats above other windows.

This allows you to open a text document in a new window in DEVONthink, open the document in Marked, view the windows side-by-side (Flexiglass *4 is a nice utility to position the windows), and see the preview of the text document as you edit it-sweet!

Here is a view of the text document in DEVONthink on the left, and the same document viewed with Marked on the right. I’ve intentionally overlapped the Marked window so that the image will be a manageable sized when viewed here on the forum.

And here is the PDF document, printed from Marked to the DEVONthink Global Inbox.

While I’ve only touched on how Markdown and Marked can be used in DEVONthink, I should mention briefly how this all relates to the iOS, which is where the utility gets really exciting. I save all these text files to Dropbox and index the Dropbox folder in DEVONthink. I also sync the indexed Dropbox folder to DEVONthink To Go, so I can also view and edit documents in DEVONthink To Go and keep the text files together with other related project documents from DEVONthink.

When I create new text files or text snippets in DEVONthink, I use the ‘Move to External Folder’ command to move them to Dropbox. The text files are then available to other applications, such as nvALT, Brett Terpstra’s fork of Notational Velocity. nvALT recognizes OpenMeta tags, which means that tags assigned in DEVONthink will appear in nvALT and vise-versa. The text files in Dropbox are available in a nearly countless number of text editing applications available for iOS, which makes creating and editing documents on the go very painless. Many of the iOS applications, such as Notsey, also have Markdown preview.

The use of Markdown has been very helpful to me and I am really excited about using Marked with my text documents. If you want another look at how this works, the .txt document of this post that I created in DEVONthink can be downloaded from CloudApp here (click on Direct Link to download), and the PDF output from Marked can be downloaded here. Enjoy!

  1. John Gruber on Markdown

  2. Fletcher Penny’s MultiMarkdown Quick Look plug-ins

  3. Brett Terpstra’s Marked App

  4. Flexiglass

As an aside, Notability on the iPad does RTF

Not in a way that is useful to me. Notability can import from and export to RTF, but as far as I can tell you can’t sync RTF documents. That’s where plain text has the edge-there is no import/export, just sync via Dropbox and the changes appear everywhere.

awesome post, thanks for sharing. I do a fair bit of writing in MMD myself but haven’t committed myself fully for my general purpose writing.

How do you go about documents containing images and the like, i.e. assets that would be embedded in RTF documents but aren’t in MD or MMD? I hate to keep tracking of associated files or seeing broken links etc.


Greg, thank you for the excellent post and advice. Your tips always lead me to the App Store to find the latest goodies :wink:

I noticed that the Fletcher Penny link to the MD QuickLook plugins is not the most recent version that Penny has posted.


If you need to fix some file-app-associations, as I did, RCDefaultApp can help:



One more thing: I had trouble getting the quicklook plugin to actually trigger on .markdown-files. Something about type identifier (UTIs). Maybe I screwed it up by setting the default app for those files in the first place …

Anyways, what I had to do was:

  • Figure out the ITU for .markdown-files on your machine. I used PathFinder’s info panel, which shows you a file’s UTI. In my case, it was dyn.ah62d4rv4ge8042pwrrwg875s.
  • Open the plist-file in the quicklook generator bundle (I used Xcode).
  • In the LSItemContentTypes-array just below CFBundleTypeRole, add the UTI from the first step.

The dynamic UTIs seem to be consistent among multiple files with the same extension.