mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
11 lines
322 B
JavaScript
11 lines
322 B
JavaScript
export default function taskListItems (turndownService) {
|
|
turndownService.addRule('taskListItems', {
|
|
filter: function (node) {
|
|
return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'
|
|
},
|
|
replacement: function (content, node) {
|
|
return (node.checked ? '[x]' : '[ ]') + ' '
|
|
}
|
|
})
|
|
}
|