WYSIWYG editor for MarkDown

I’ve considered using MarkDown for my text documents. I’ve used RTF files extensively for my notes, and MD would be better since it’s more interoperable and transparent. However – I hate editing MarkDown directly, for one reason: editing MD in DTPO is a pain. Switching back and forth between the “code” (which can be edited) and the “display” is annoying. This is especially true for links, since I use links extensively (to link to other DTPO documents). When you look at a MarkDown document, links are very disruptive because they take up space and instead of seeing them as a link you are seeing them as code.

I would love to see an integrated WYSIWYG markdown editor, where you can treat MarkDown like rich text - but behind the scenes it is saved as MarkDown. There are a number of these which are built using HTML - for instance http://sofish.github.io/pen/. I would not be opposed to using essentially a web-view to display MarkDown code as WYSIWYG (by default) and then have a button that allows you to view the “code” itself.

1 Like

Thanks for the suggestion! A WYSIWYG editor is unlikely in the near future but improvements are definitely in the pipeline.

I’m curious about this assessment. What is “painful” about it?

There’s a few tricks to work around this.

Part of why Markdown works is it doesn’t try to be anything other than plain text.

I like DEVONthink’s approach, to present it as formatted output but switch to plain text for editing; and it can be a little grating, to lose the formatting and to be dumped into a fixed-width single-size editor when doing so.

I usually edit Markdown outside DEVONthink, though - software like Ulysses and IA Writer (and even the venerated Byword) are reasonably cheap and very good markdown editors, providing the formatting functionality required. If you use Launchbar, you can select a file in DEVONthink and use instant-send to fire up an external markdown editor in a couple of keypresses. Even using ⌘⌥P to switch to edit mode then using something like the QuickCursor macros for KeyboardMaestro (github.com/chauncey-garrett/key … ckcursorkm) works well.

Where it gets messy is when you have inline media assets in your Markdown; I suspect, like many others, the ‘clip as Markdown’ has become an indispensible part of DEVONthink, but runs the risk of losing online images and assets. For keeping key figures, I download these and tag into a DEVONthink folder, then manually replace their URLs with a link to the x-devonthink://UUID - which works inside DEVONthink, but turns those links to broken references outside the DEVONthink environment. I’m not sure there’s much that can be done about that, but that’s the only weak point I find.

Personally, I use DEVONthink as a kind of smart document finder alternative, rather than as a universal editing environment. If I want to work on a document, I’ll generally pull it into an external tool than work inside DEVONthink on it (even with DTTG). However, I appreciate that with as all-things-to-all-people tool like DEVONthink, not everyone has the same usage patterns. I’m just sharing my approach. Personally, I’d rather not have a complex JS runtime embedded in DEVONthink to manage Markdown editing, as this brings about its own tower of complexities and unintended consequences.

(I must also add, I was so pleased to see the Clip-as-markdown and Markdown support enter into DEVONthink - it’s made it possible to capture and work with vast amounts of text whilst avoiding proprietary data formats and the huge amounts of cruft that contemporary websites accrue - megs of data to capture a few kilobytes of text seems to be the norm).

  • Dave
2 Likes

There’s a much easier way. If your favorite markdown editor is configured in Finder’s Get Info dialog to be the default “open with” application for documents with markdown extensions (.md, .mmd., .markdown) then ⇧⌘O executes DEVONthink’s Data > Open With on the selected document and calls that editor defined in Finder’s Get Info. And you can also add to the DEVONthink toolbar the built-in “Open in external editor or view” command, click it, and get the file open in your external editor.

I recommend Microsoft’s free Visual Studio Code editor for markdown and any plain text document. There are dozens of extensions that make VSC more powerful than any free or paid markdown editor on macOS.

@davem:

Exactly. Thanks for bringing up this very important point. People too often assume how they use an application is standard operating procedures. But given DEVONthink’s flexibility, it can be used and organized in very personalized ways. For example, though I admire the external Markdown editors, I write long-form Markdown documents in Pro Office every single day. I can’t assume everyone else does.
However, like yourself, I think sharing the experiences is good. You never know when you might inspire someone to try something and inadvertently educate someone! :smiley:

Here is another solution for live previews –

I use Marked 2 by Brett Tepstra as a live preview (in my preferred output style). I edit the document in Devonthink, after having it dragged onto the Marked 2 icon in the dock (which opens & previews it).

Any changes in Devonthink are now displayed “live” and formatted in Marked 2. Once complete, I export in the desired format from Marked 2.

Regards,
Greg

1 Like

Just to piggyback on this to add another perspective. I’ve been using Roam Research a lot lately and playing with Devonthink to duplicate some of the experience. The backlinks in Devonthink are fantastic. The one issue I have with using an external WYSIWYG editor is that the links, of course, do not work in them. This breaks this type of experience for me and leave me using the built in editor which I find not to be as enjoyable as a WYSIWYG one.

Personally, I’d like to see Devonthink head in this Roam-esque second brain note taking direction. I realize that this is not the primary use case for Devonthink. I just think that perhaps having an integrated note taking solution like this inside the thing that contains all your sources and has the power to connect all manner of things would be super powerful for anyone doing research or developing ideas.

Just my opinion.

1 Like

There are no such plans at this time, but your opinion is noted.

Hello,
I use DT 3.7 under OSX 10.14. I have activated the WYSIWYG option in the settings for Markdown in Media, but I do not observe any difference in the editor pane, except the headings that are slightly bigger when I activate this option. But no bold or italic, for example.
I also observe a jumping cursor: as soon as I push Return, the cursor jumps a few lines higher on the screen but if I start to type, the characters go to the correct place and the cursor get reasonable until I push again Return.

You can see the screenshots of the DT window (with the misplaced cursor) and of my options in DT 3.7:

Oups, the answer was here: WYSIWYG editing not work on DTP 3.7

I could not find it by searching but I have seen it by looking at the recent messages. I have changed the Text police (it was set to a fixed-length font) to a more flexible police and it works now.

1 Like