add 'markdown-it-task-checkbox' dependency to render checkboxes

This commit is contained in:
Felix Nüsse 2021-12-05 14:30:34 +01:00 committed by GitHub
parent 816717cda8
commit 6bada742fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 4 deletions

12
package-lock.json generated
View File

@ -4,7 +4,6 @@
"requires": true,
"packages": {
"": {
"name": "notes",
"license": "agpl",
"dependencies": {
"@nextcloud/axios": "^1.7.0",
@ -17,6 +16,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",
@ -8002,6 +8002,11 @@
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/markdown-it-task-checkbox": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/markdown-it-task-checkbox/-/markdown-it-task-checkbox-1.0.6.tgz",
"integrity": "sha512-7pxkHuvqTOu3iwVGmDPeYjQg+AIS9VQxzyLP9JCg9lBjgPAJXGEkChK6A2iFuj3tS0GV3HG2u5AMNhcQqwxpJw=="
},
"node_modules/markdown-it/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@ -18924,6 +18929,11 @@
}
}
},
"markdown-it-task-checkbox": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/markdown-it-task-checkbox/-/markdown-it-task-checkbox-1.0.6.tgz",
"integrity": "sha512-7pxkHuvqTOu3iwVGmDPeYjQg+AIS9VQxzyLP9JCg9lBjgPAJXGEkChK6A2iFuj3tS0GV3HG2u5AMNhcQqwxpJw=="
},
"marked": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz",

View File

@ -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",

View File

@ -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,
}
},
@ -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>