adam-p / markdown-here

Google Chrome, Firefox, and Thunderbird extension that lets you write email in Markdown and render it before sending.
https://markdown-here.com
MIT License
59.65k stars 11.26k forks source link

Add support for GFM-style checkbox task list #259

Open adam-p opened 9 years ago

adam-p commented 9 years ago

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:

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 commented 9 years ago

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...)

chabad360 commented 8 years ago

Would be sooooo appreciated! :+1:

11rchitwood commented 6 years ago

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

Edit: Is this feature in development?

stephen147 commented 4 years ago

+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 commented 4 years ago

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