Skip to content

Commit

Permalink
add 'markdown-it-task-checkbox' dependency to render checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton authored Dec 5, 2021
1 parent 816717c commit 6bada74
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
12 changes: 11 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"diff": "^5.0.0",
"easymde": "^2.15.0",
"markdown-it": "^12.2.0",
"markdown-it-task-checkbox": "^1.0.6",
"vue": "^2.6.14",
"vue-fragment": "1.5.1",
"vue-material-design-icons": "^4.13.0",
Expand Down
24 changes: 21 additions & 3 deletions src/components/EditorMarkdownIt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ export default {
},
data() {
const md = new MarkdownIt({
linkify: true,
})
md.use(require('markdown-it-task-checkbox'), {
disabled: true,
liClass: 'task-list-item',
})
return {
html: '',
md: new MarkdownIt({
linkify: true,
}),
md,
}
},
Expand Down Expand Up @@ -127,5 +135,15 @@ export default {
& table td:empty::after {
content: '\00a0';
}
.task-list-item {
list-style-type: none;
input {
min-height: initial !important;
}
label {
cursor: default;
}
}
}
</style>

0 comments on commit 6bada74

Please sign in to comment.