TIP: Markdown+Links Example Syntax activates `[link](url)` Markdown Links

In the default Markdown syntax highlighting definition in Drafts, URLs are not activated to make it easier to edit the text, instead relying on link mode to activate URLs. If you use many [link](url) style Markdown links, however, you might prefer those links be tap/clickable directly in the editor.

The Markdown+Links example custom syntax enables just that capability. When installed and assigned to a draft, the link portion of a [link](url) Markdown link becomes active and can be tapped/clicked to open that URL.

DEMO

Usage

To use the Markdown+Link syntax:

  • Open the Markdown+Link syntax page in the Directory
  • Use the “Install” button to open Drafts and install the Syntax.
  • Select the syntax for use on a draft.
    • On iOS: Tap the Aa below the editor, then in the “Syntax Highlighting” section, tap “Current Draft”, and select the “Markdown+Links” syntax.
    • On Mac: Select “Markdown+Links” from the drop-down menu below the editor.

Once selected, your Markdown links in the draft will activate automatically.

About Custom Syntaxes

Drafts custom syntaxes enable a variety of advanced customization possibilities. One is the ability to create link definitions that control activation of tappable links in the editor. The are the same configurations that enable [[wiki-style]] cross-links.

9 Likes

Nice, very nice. Anyway, I can incorporate the ~~ strike through feature using this syntax. Else, it gets confusing, if I want that feature (I can’t code at all), I’ve to use the GitHub version, and keep switching syntaxes. If you can add that feature, I can kill two birds with one stone.

It is superb but not too recommended for distracted guys!

1 Like

You have inspired me to look into/modify the custom multimarkdown syntax to include the links and strikethrough. I love the syntaxes, and perhaps I’ll even extend it to be able to make more in depth ConTeXt markup/markdown hybrid. It would be just a theme template at first, not a syntax validator, I would require lots of help for that to work out.
Anyone else working on that?

This doesn’t seem to have strikethrough support — is there a way to add that?

I have a Workspace called read-later. This syntax would be really useful if it will auto-apply to all the Drafts in this Workspace. Otherwise, I am not sure I want to change each of the individually using the aA button. There’s just too many of them over the years.

That is possible through the usual inbuilt batch operations.

I’ll describe for iPhone as that is what I have to hand, but it is similar on the Mac.

  1. In your workspace
  2. Open the Drafts list.
  3. Tap and hole on Select.
  4. Choose Select All.
  5. Tap on the cogs icon next to Select.
  6. Tap Change syntax
  7. Select the syntax to apply.
  8. Select Cancel to deselect your Drafts and return to editing.

Hope that helps.

2 Likes

Sometimes, I’ve forgotten about this part of Drafts. Thanks @sylumer , you have been very helpful, as always!