Simple List+ Example Syntax

I posted a Simple List+ example syntax in the Directory. This example is designed to suggest how some minor modifications to syntaxes and tailor the experience in Drafts.

Drafts ships with a “Simple List” syntax. Its primary purpose is to provide an alternate list syntax that is simplified just for handling tasks. Works great with shopping lists, for example, (don’t miss our separate tip on working with shopping lists). It supports only Markdown style headings and lists.

The Simple List+ syntax differs from the standard version in the following ways:

  • It supports three state tasks using { } curly braces. Like the [ ] square bracket version, typing { } will create a task you can tap. Instead of just toggling between on-off states, it toggles through three states: { }, {-}, and {x}. Great for keeping up with items that have an “in-progress” state.
  • When a task list item is completed, (e.g. in the [x] state), the text of the line gets crossed-off with strikethrough formatting.
  • When using Drafts navigation feature (down arrow at the top right of editor), in addition to headings, it will display incomplete tasks, allowing you to navigate directly to them in a longer draft.
  • It has [[wiki-style]] cross-linking enabled, like the Markdown syntaxes.

To use the Simple List+ syntax:

  • Be sure you have updated to Drafts v26 or greater to get custom syntax support.
  • Open the Simple List+ syntax in the Directory, tap the “Install” button. Drafts will open and offer to install the syntax.
  • Create a new draft, and assign it the “Simple List+” syntax:
    • On Mac: Select the syntax from the dropdown at the lower left of the editor
    • On iOS: Change the current draft syntax in the “Aa” editor preferences.

For more details on installing and using custom syntax, see the User Guide.

5 Likes

Thanks to this example, I’ve updated my Draftsdown syntax with the completed checkbox visual distinction, three-state tasks, and navigation markers for incomplete tasks. Not difficult to do!

1 Like

Frustrating introduction to themes and syntaxes for me, I’ve installed the Example Syntax and various themes including Draftsdown but the three state tasks look pretty much like plain text to me. What am I missing, is anyone else experiencing this? (Drafts version 26.2.4)

Show as normal, strike through and bolded for me.

Ok now it works but I have a new problem… iCloud sync has stopped working :frowning:
It’s back! and all is good. Thank you for you help.

I want a shortcut to use ‘strikethrough’. I can’t seem to find it. I always thought there was a keyboard shortcut for that, but it seems to have disappeared. To be sure, I don’t want any shopping list formatting or anything of the sort. Just plain text, which I am done with and I want to strike through it. TaskPaper format isn’t the answer for me. Can anyone help me?

There’s an action in the directory that does GitHub-style strikethrough markup, which is adding ~~ around text. Is that what you are looking for?

You would have to be using the “GitHub Markdown” syntax for that to have an visual effect in the syntax highlighting - it’s not markup that is part of the standard Markdown spec.

Thanks, I’ll try that. But, If I’m using Draftsdown or any other syntax, there isn’t any way of getting the job done? I tried the ~~ but the syntax wasn’t Git. Hence the question.

The action will work anywhere to wrap text in ~~, it’s just a matter of what you want that do to. If you are happy just having that markup in your text, that’s fine.

If you want to output that somewhere as HTML that adds <strikethrough> tags, you have to use GitHub markdown as your Markdown parser (in Settings) because that markup is an addition only supported by that processor.

If you want the syntax to be highlighted and appear as strikethrough text in the editor when you type, then your syntax definition needs to have patterns that support that. The built-in GitHub Markdown syntax does. If you have another syntax you prefer that currently does not do that, it could have to be customized to support those patterns…which isn’t too hard. The patterns could pretty much be copied from the GitHub example syntax and pasted into another custom syntax. It means editing JSON, but isn’t too hard.

Got it, but wasn’t strikethrough a feature of ios or Mac at some point? Or, maybe I’m imagining things, I always thought it was available either in the services menu or by right clicking on the text and selecting the option. Anyway, this is good enough for me. I don’t know how to code, so the rest is all Greek for me at this point! Thanks a ton