Add strikethrough a checked box

Hi Takuya and everyone,

I just thought apps like Obsidian has a feature where you can strikethrough your checkbox todo task whenever it’s checked.

How can we achieve the same thing with Inkdrop? I tried a function at init.js to add a custom class to my checkboxes but it does not seem to work.

Hi @Tony_Nguyen,

For v5 (current stable), add the following stylesheet to your styles.less:

.task-list-item.checked {
  text-decoration: line-through;
  text-decoration-color: var(--muted-text-color);

  .task-list-item-checkbox {
    margin-inline-end: 4px;
  }
}

Hope it helps!

Hi Takuya,

Thanks. It works like a charm. At first I looked at markdown screen, but actually the magic is at Preview screen, lol.

It looks like it’s impossible in the Inkdrop markdown renderer since it is nested, unfortunately.
The Reading view on Obsidian has the same issue for the same reason.

1 Like

ok, the v6 editor will support this!

1 Like