mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 14:59:27 +08:00
fix: allow task items to be parsed when only having <li data-checked
instead of only when <li data-checked="true"
(re-fix of #5366) (#5426)
* fix * changeset
This commit is contained in:
parent
0ec0af67b1
commit
6543f059ff
5
.changeset/wise-beers-reflect.md
Normal file
5
.changeset/wise-beers-reflect.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@tiptap/extension-task-item": patch
|
||||
---
|
||||
|
||||
allow task items to be parsed when only having `<li data-checked` instead of only when `<li data-checked="true"` (re-fix of #5366)
|
@ -68,7 +68,7 @@ export const TaskItem = Node.create<TaskItemOptions>({
|
||||
parseHTML: element => {
|
||||
const dataChecked = element.getAttribute('data-checked')
|
||||
|
||||
return dataChecked == null || dataChecked === 'true'
|
||||
return dataChecked === '' || dataChecked === 'true'
|
||||
},
|
||||
renderHTML: attributes => ({
|
||||
'data-checked': attributes.checked,
|
||||
|
Loading…
Reference in New Issue
Block a user