fix: add HTMLAttributes to task item node view

This commit is contained in:
Philipp Kühn
2021-10-18 23:20:20 +02:00
parent 43a944b897
commit 81d8097959

View File

@@ -108,6 +108,10 @@ export const TaskItem = Node.create<TaskItemOptions>({
}
})
Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {
listItem.setAttribute(key, value)
})
listItem.dataset.checked = node.attrs.checked
if (node.attrs.checked) {
checkbox.setAttribute('checked', 'checked')