Skip to content

Commit

Permalink
fix: add HTMLAttributes to task item node view
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Oct 18, 2021
1 parent 43a944b commit 81d8097
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/extension-task-item/src/task-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 81d8097

Please sign in to comment.