diff --git a/docs/src/demos/Experiments/Details/details.ts b/docs/src/demos/Experiments/Details/details.ts index a58dadf7..457a56b3 100644 --- a/docs/src/demos/Experiments/Details/details.ts +++ b/docs/src/demos/Experiments/Details/details.ts @@ -1,5 +1,4 @@ import { Node, mergeAttributes } from '@tiptap/core' -// import { update } from 'cypress/types/lodash' export interface DetailsOptions { HTMLAttributes: { @@ -33,7 +32,9 @@ export default Node.create({ HTMLAttributes, }) => { const item = document.createElement('details') - let open = false + + // TODO: Why does that have to be true? + let open = true item.addEventListener('click', event => { // @ts-ignore @@ -58,24 +59,8 @@ export default Node.create({ dom: item, contentDOM: item, ignoreMutation: (updatedNode: MutationRecord) => { - // @ts-ignore - console.log({ updatedNode }, 'ignoreMutation', updatedNode.attributeName === 'open') - return updatedNode.attributeName === 'open' }, - // update: updatedNode => { - // if (updatedNode.type !== this.type) { - // return false - // } - - // if (updatedNode.attrs.open) { - // item.setAttribute('open', 'open') - // } else { - // item.removeAttribute('open') - // } - - // return true - // }, } } }, diff --git a/docs/src/demos/Experiments/Details/index.vue b/docs/src/demos/Experiments/Details/index.vue index 37044446..0a4dfa97 100644 --- a/docs/src/demos/Experiments/Details/index.vue +++ b/docs/src/demos/Experiments/Details/index.vue @@ -31,7 +31,7 @@ export default { ], content: `
Here is a details list:
-More info about the details.