markdown-here icon indicating copy to clipboard operation
markdown-here copied to clipboard

Add support for GFM-style checkbox task list

Open adam-p opened this issue 10 years ago • 5 comments
trafficstars

This is from a Google Group post.

Github supports an extension to Markdown for creating checkbox task lists. This MD:

- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> are supported
- [x] list syntax is required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item

Turns into this:

  • [x] @mentions, #refs, links, formatting, and tags are supported
  • [x] list syntax is required (any unordered or ordered list supported)
  • [x] this is a complete item
  • [ ] this is an incomplete item

In case this isn't obvious: An important aspect of the Github feature that won't (and can't) be supported is the the updating of the email (etc.) if the checkboxes are clicked. This makes sense for GH issues, not for email.

adam-p avatar Mar 09 '15 15:03 adam-p

This was also requested in #242, and the user wants to use it in Evernote. Unlike email, maybe Evernote will save the checkbox state? (I was thinking that they would be disabled, but maybe not...)

adam-p avatar Mar 12 '15 01:03 adam-p

Would be sooooo appreciated! :+1:

chabad360 avatar Jan 06 '16 01:01 chabad360

Looks like this and #242 got closed. Are there any plans to implement checkboxes?

Edit: Is this feature in development?

11rchitwood avatar Apr 19 '18 14:04 11rchitwood

+1 for this.

Here's some info from here and looks fairly straight forward to implement.

http://blog.winddweb.com/implement-github-like-checkbox

stephen147 avatar Mar 12 '20 21:03 stephen147

You can paste this into the raw text:

<input type="checkbox" class="task-list-item-checkbox" disabled checked>Test line 1
<input type="checkbox" class="task-list-item-checkbox" disabled>Test line 2

It displays like so when converted:

image

Now, to find a way to change: - [] to <input type="checkbox" class="task-list-item-checkbox" disabled checked>

and

- [x] to <input type="checkbox" class="task-list-item-checkbox" disabled>

This does seem to be possible by wrapping html in the css code as per this: https://www.quora.com/How-do-I-write-CSS-within-HTML https://www.w3schools.com/html/html_css.asp

Same link to where the checkbox code is: http://blog.winddweb.com/implement-github-like-checkbox

stephen147 avatar Mar 18 '20 22:03 stephen147