fix(editor): set default id of tasklist items

This fixes a bug where all tasklist items would have the same id which would check all of them when checking one of them.
This commit is contained in:
kolaente 2024-02-17 11:38:08 +01:00
parent 44c1f0d281
commit 32edef2d38
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ const editor = useEditor({
return {
...this.parent?.(),
id: {
default: createRandomID,
default: () => createRandomID(),
parseHTML: element => element.getAttribute('data-id'),
renderHTML: attributes => ({
'data-id': attributes.id,