-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support github style checkboxes #640
Comments
maybe https://github.com/revin/markdown-it-task-lists is worth a try (as slidev uses markdown-it) |
@twitwi Is there a doc on how to install such plugins? I find doc to customize almost everything but not the parsing itself, a plugin would be perfect |
See https://sli.dev/custom/config-vite.html#configure-internal-plugins I think this will work import { defineConfig } from 'vite'
import taskLists from 'markdown-it-task-lists'
export default defineConfig({
slidev: {
vue: {
/* vue options */
},
markdown: {
/* markdown-it options */
markdownItSetup(md) {
/* custom markdown-it plugins */
md.use(taskLists)
},
},
/* options for other plugins */
},
}) |
Works ok in PDF as well. You'd probably want the doc to have a "Configure Markdown" section that points to this, since that's one of the common thing you'd want to configure 3 last issues:
|
I think it makes sense to have the plugin built in. PR welcome if anyone wants to work on that! |
This PR on the package repo should help but it doesn't seem well maintained: revin/markdown-it-task-lists#34 |
We are now using https://github.com/hedgedoc/markdown-it-better-task-lists and shipped in v0.34.3 As for built-in support from markdown-it, I guess they are aware of it and must have some reason to not support it builtin otherwise I think it should be supported on day one. |
Is your feature request related to a problem? Please describe.
I use checkboxes to indicate when something as to be done, when writing slides for courses/practical applications.
According to GitHub, this belongs to their "tasklist" extension: https://github.github.com/gfm/
Describe the solution you'd like
This syntax:
Should translate to:
and render like this (in the web version but also when exported in PDF/PNG):
I am not sure about the bullet point though, however GitHub works this way currently (just using [ ] without a dash does nothing).
Describe alternatives you've considered
Adding
- <input type="checkbox" />
manually. Not sure how it will behave after export. It doesn't render very well however, because you need a bullet point to have correct line jumps, and the text won't support inline code anymoreUsing a square emoji also works https://emojipedia.org/search/?q=square but is not interactive
The text was updated successfully, but these errors were encountered: