Plain Text Notes with Images

What’s Azog from The Hobbit: The Desolation of Smaug doing here? Besides reminding us that another Tolkien movie is coming out soon, he is here to demonstrate that writing in plain text doesn’t mean you have to give up images. nvALT on the Mac and Notesy on the iPad have you covered.

azog in desolation of smaug

Putting Images into Plain Text Notes

There is a simple code with nvALT on the MAc to get an image to display in markdown, and it automatically appears as soon as you drag an image into a note. It looks like this:

![](file:///Users/christophermayo/Desktop/131018_desolation_smaug.jpg)

The note will appear as seen below when you press the shortcut key combination CMD + CTRL + P.

azog

That’s pretty useful, right? It’s a plain text file that displays images with little or no fuss. Before I stumbled upon this feature of nvALT, I was uploading stuff to the web and linking to it there, which didn’t do me much good when I was offline.

Tweaking the Process

As you can see by the image code, though, it isn’t terribly elegant. It also requires the images to remain in the same location, so it isn’t very flexible. As long as you are only using your notes on the Mac, this works well enough. What if you want to use your notes on the iPad as well, though? Fortunately, there is a little known way to clean up the code, make everything easier to manage, and make it compatible with the iOS environment.

Modifying the Template

First, you’ll need to modify nvALT so that the link can be shortened to just the file name (make sure not to have any spaces in the name). Follow the directions given by Brett Terpstra for the “All-purpose base folder.” Instead of the Application Support folder that Brett first mentions, my template is located at /Applications/nvALT.app/Contents/Resources/template.html. See the screenshots below — note that you have to open the application package contents to get at the template, and then copy it to /Library/Application Support/nvalt/ (the third screenshot).

1. Find the nvALT application and open the package.
folder 01

2. Locate the template file and copy it.
folder 03

3. Paste the template file into the nvalt folder located at /Library/Application Support/nvalt/.
nvalt folder

4. Modify the file.
folder 03

Syncing with Notesy

Second, you’ll need to put all of your notes and images into a folder inside your Dropbox folder. I use the same one that stores my notes for Notesy. As far as I know, Notesy is the only app that will display your images in markdown on the iPad.

notesy 01

The first image above shows Notesy in text editing mode. No images are visible, but you can see the code that was used on the Mac with nvALT. It looks similar to nvALT, and the writing experience is about the same, but there are at least two crucial differences when it comes to navigating your notes. One is that Notesy does not allow for internal note linking, so you cannot create a personal wiki out of it on the iPad. Second, searching is difficult if you have a lot of data — Notesy can take quite a long time to search through thousands of notes for something, but nvALT returns results immediately.

notesy 02

When you press the “md” (markdown) icon in Notesy it displays the note in markdown with any images that are linked to from the notesy folder.

Using other File Formats

Notesy is pretty flexible and will display the first page of various file types as well. In the case of a PDF, you can see the first page, and if you need to open it to see more, just search for it and tap on the file to open it.

Drawbacks

The nvALT and Notesy combination I described above requires a little bit of manual effort to setup (naming images correctly), a little bit to keep going (having to find an image when you want to link to it again), and a little bit to use (it can be tedious to leave a note to go hunting for a PDF). For some people, this might all add up to a little too much. For others, especially those who want to retain tight control over their text display and availability, it might be worth the effort. At any rate, it is good to know that the option is out there thanks to the folks working on nvALT and Notesy.