mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 14:41:42 +08: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]' : '[ ]') + ' '
|
||
|
}
|
||
|
})
|
||
|
}
|