Support checkboxes syntax from GitHub Flavoured Markdown

- [ ] 123
  - [ ] foo
  - [x] bar
- [ ] ~~456~~

could be rendered as:

image

Why not TODO/DONE:

  1. It’s not widely supported Markdown syntax (i.e. might be less convenient to work with external editors)
  2. It doesn’t allow to conveniently cancel tasks (you still can do TODO ~~foo~~, but since DONE is crossed as well that’s confusing)
  3. It only makes sense for tasks, while checkboxes can have different meaning

There is canceled keyword.

image

For now, you can insert org-mode check boxes as Logseq supports it.

image image

The above example might not be consistent with markdown syntax, so you can try using plain lists starting with +.

- Today tasks,
  + [ ] foo
  + [ ] bar
2 Likes

There is canceled keyword

Oh, I didn’t realize that, thanks

For now, you can insert org-mode check boxes as Logseq supports it

I see, then my request should be rephrased to extend checkbox syntax to allow treating a regular block as a checkbox, i.e. - [ ] foo that is treated as a separate block rather than + [ ] foo that is a line in a single multi-line block.

2 Likes

Note for anyone else looking for how to use checkboxes in markdown mode: You can have a list of plain clickable checkboxes if you put a * before each one, making a bulleted list. You also have to have a line of plain text before the checkbox, and do it all in one block. Pretty inconvenient, but it works.

Like:

subtasks
* [ ] do a thing
* [ ] do another thing
* [ ] do the last thing

Looks like it also works with + instead of * as mentioned above.

1 Like

The checkbox feature is still very buggy and incomplete. Once you start creating a checkbox list, pressing enter should create a new checkbox automatically. This does not happen in the linux app. The checkbox also toggles incorrectly: Markdown checkboxes toggle incorrect ones if they start with the same text · Issue #7113 · logseq/logseq · GitHub

Checkbox is a very basic feature which should have been taken care of early on. I don’t even understand why the simple "- [ ] " markdown cannot be supported by design. Regardless, at least an alternative syntax should work properly.

3 Likes

Yes. Please. I’m new to logseq but this is one of the barriers making me hesitant to fully embrace it. I make a lot of checklists: shopping, packing, etc. The fact that 5 identical keystrokes are required on every line is too much, on mobile it’s a straight up deal breaker.

2 Likes

What works is in config.erb

 :macros {
   "cx" "[:input {:type \"checkbox\" :checked :1}]"
   "c" "[:input {:type \"checkbox\"}]"
 }

This works then:

- {{c}} not done
- {{cx}} done

Clicking does not change the macro. But a quite nice workaround.
For some reason the macro is rendered with a extra new line, which does not happen when I use the syntax allone. Seems to be a <div class=macro><div class=hicupp> problem

I changed your macro into commands, in config.edn:

 :commands [
    ["checkbox" [[:editor/input "[:input {:type \"checkbox\"}]"]]]
    ["checkbox-checked" [[:editor/input "[:input {:type \"checkbox\" :checked true}]"]]]
]

Then instead of typing /todo we can type /checkbox and it works as expected.

1 Like

Bumping this feature request

Up for this feature :slight_smile: