diff --git a/.changeset/cuddly-pants-destroy.md b/.changeset/cuddly-pants-destroy.md deleted file mode 100644 index f3602beb19b..00000000000 --- a/.changeset/cuddly-pants-destroy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tiptap/core": patch ---- - -Fix change criteria for isNodeEmpty to resolve #5415 diff --git a/.changeset/early-singers-begin.md b/.changeset/early-singers-begin.md deleted file mode 100644 index 2b37530faa8..00000000000 --- a/.changeset/early-singers-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tiptap/core": patch ---- - -fix(core): findDuplicates - use Array.from when converting Set diff --git a/.changeset/real-kiwis-double.md b/.changeset/real-kiwis-double.md deleted file mode 100644 index d10f60149c6..00000000000 --- a/.changeset/real-kiwis-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tiptap/core": patch ---- - -This fixes a discrepency between `getMarksBetween` and `isActive(markName)` where the position used for getMarksBetween was off by one diff --git a/.changeset/smooth-rice-obey.md b/.changeset/smooth-rice-obey.md deleted file mode 100644 index 8a73ee788c2..00000000000 --- a/.changeset/smooth-rice-obey.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@tiptap/react": patch ---- - -Optimize `useEditor` and `useEditorState` to reduce number of instances created while still being performant #5432 - -The core of this change is two-fold: - - have the effect run on every render (i.e. without a dep array) - - schedule destruction of instances, but bail on the actual destruction if the instance was still mounted and a new instance had not been created yet - -It should plug a memory leak, where editor instances could be created but not cleaned up in strict mode. -As well as fixing a bug where a re-render, with deps, was not applying new options that were set on `useEditor`. diff --git a/.changeset/wet-terms-fetch.md b/.changeset/wet-terms-fetch.md deleted file mode 100644 index 899f3200fbc..00000000000 --- a/.changeset/wet-terms-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tiptap/extension-placeholder": patch ---- - -add back `considerAsAny` type but mark it deprecated diff --git a/.changeset/wise-beers-reflect.md b/.changeset/wise-beers-reflect.md deleted file mode 100644 index 7815d78912b..00000000000 --- a/.changeset/wise-beers-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tiptap/extension-task-item": patch ---- - -allow task items to be parsed when only having `
  • { if (!editor) { @@ -56,7 +57,7 @@ export default () => { ], content: `

    - That’s a boring paragraph followed by a fenced code block: + That's a boring paragraph followed by a fenced code block:

    for (var i=1; i <= 20; i++)
     {
    diff --git a/demos/src/Examples/CodeBlockLanguage/Vue/index.vue b/demos/src/Examples/CodeBlockLanguage/Vue/index.vue
    index 6a30301cd01..4846fb30c68 100644
    --- a/demos/src/Examples/CodeBlockLanguage/Vue/index.vue
    +++ b/demos/src/Examples/CodeBlockLanguage/Vue/index.vue
    @@ -21,20 +21,19 @@ import css from 'highlight.js/lib/languages/css'
     import js from 'highlight.js/lib/languages/javascript'
     import ts from 'highlight.js/lib/languages/typescript'
     import html from 'highlight.js/lib/languages/xml'
    -// load all highlight.js languages
    -import { lowlight } from 'lowlight'
    +// load all languages with "all" or common languages with "common"
    +import { all, createLowlight } from 'lowlight'
     
     import CodeBlockComponent from './CodeBlockComponent.vue'
     
    -lowlight.registerLanguage('html', html)
    -lowlight.registerLanguage('css', css)
    -lowlight.registerLanguage('js', js)
    -lowlight.registerLanguage('ts', ts)
    +// create a lowlight instance
    +const lowlight = createLowlight(all)
     
    -// load specific languages only
    -// import { lowlight } from 'lowlight/lib/core'
    -// import javascript from 'highlight.js/lib/languages/javascript'
    -// lowlight.registerLanguage('javascript', javascript)
    +// you can also register languages
    +lowlight.register('html', html)
    +lowlight.register('css', css)
    +lowlight.register('js', js)
    +lowlight.register('ts', ts)
     
     export default {
       components: {
    @@ -63,7 +62,7 @@ export default {
           ],
           content: `
             

    - That’s a boring paragraph followed by a fenced code block: + That's a boring paragraph followed by a fenced code block:

    for (var i=1; i <= 20; i++)
     {
    diff --git a/demos/src/Experiments/All/Vue/index.vue b/demos/src/Experiments/All/Vue/index.vue
    index cdd835a237f..5b1e370f7a9 100644
    --- a/demos/src/Experiments/All/Vue/index.vue
    +++ b/demos/src/Experiments/All/Vue/index.vue
    @@ -108,7 +108,9 @@ import TextAlign from '@tiptap/extension-text-align'
     import TextStyle from '@tiptap/extension-text-style'
     import Underline from '@tiptap/extension-underline'
     import { Editor, EditorContent } from '@tiptap/vue-3'
    -import { lowlight } from 'lowlight'
    +import { all, createLowlight } from 'lowlight'
    +
    +const lowlight = createLowlight(all)
     
     export default {
       components: {
    @@ -182,14 +184,14 @@ export default {
             

    • - That’s a bullet list with one … + That's a bullet list with one …
    • … or two list items.

    - Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block: + Isn't that great? And all of that is editable. But wait, there's more. Let's try a code block:

    for (var i=1; i <= 20; i++)
     {
    @@ -203,10 +205,10 @@ export default {
         console.log(i);
     }

    - I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too. + I know, I know, this is impressive. It's only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.

    - Wow, that’s amazing. Good work, boy! 👏 + Wow, that's amazing. Good work, boy! 👏
    — Mom
    @@ -214,9 +216,9 @@ export default {

    first paragraph

    second paragraph

    Color

    -

    Oh, for some reason that’s purple.

    +

    Oh, for some reason that's purple.

    Highlight

    -

    This isn’t highlighted.

    +

    This isn't highlighted.

    But that one is.

    And this is highlighted too, but in a different color.

    And this one has a data attribute.

    diff --git a/demos/src/Nodes/CodeBlockLowlight/React/index.jsx b/demos/src/Nodes/CodeBlockLowlight/React/index.jsx index 6a5264f0c11..2f131dd350f 100644 --- a/demos/src/Nodes/CodeBlockLowlight/React/index.jsx +++ b/demos/src/Nodes/CodeBlockLowlight/React/index.jsx @@ -1,7 +1,3 @@ -// load specific languages only -// import { lowlight } from 'lowlight/lib/core' -// import javascript from 'highlight.js/lib/languages/javascript' -// lowlight.registerLanguage('javascript', javascript) import './styles.scss' import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight' @@ -13,14 +9,29 @@ import css from 'highlight.js/lib/languages/css' import js from 'highlight.js/lib/languages/javascript' import ts from 'highlight.js/lib/languages/typescript' import html from 'highlight.js/lib/languages/xml' -// load all highlight.js languages -import { lowlight } from 'lowlight' +// load all languages with "all" or common languages with "common" +import { all, createLowlight } from 'lowlight' import React from 'react' -lowlight.registerLanguage('html', html) -lowlight.registerLanguage('css', css) -lowlight.registerLanguage('js', js) -lowlight.registerLanguage('ts', ts) +// create a lowlight instance with all languages loaded +const lowlight = createLowlight(all) + +// This is only an example, all supported languages are already loaded above +// but you can also register only specific languages to reduce bundle-size +lowlight.register('html', html) +lowlight.register('css', css) +lowlight.register('js', js) +lowlight.register('ts', ts) + +/** + * Lowlight version 2.x had a different API + * import { lowlight } from 'lowlight' + * + * lowlight.registerLanguage('html', html) + * lowlight.registerLanguage('css', css) + * lowlight.registerLanguage('js', js) + * lowlight.registerLanguage('ts', ts) + */ export default () => { const editor = useEditor({ @@ -34,7 +45,7 @@ export default () => { ], content: `

    - That’s a boring paragraph followed by a fenced code block: + That's a boring paragraph followed by a fenced code block:

    for (var i=1; i <= 20; i++)
     {
    diff --git a/demos/src/Nodes/CodeBlockLowlight/Vue/index.vue b/demos/src/Nodes/CodeBlockLowlight/Vue/index.vue
    index dfd6a3defbb..5ee047ec5a3 100644
    --- a/demos/src/Nodes/CodeBlockLowlight/Vue/index.vue
    +++ b/demos/src/Nodes/CodeBlockLowlight/Vue/index.vue
    @@ -25,13 +25,17 @@ import css from 'highlight.js/lib/languages/css'
     import js from 'highlight.js/lib/languages/javascript'
     import ts from 'highlight.js/lib/languages/typescript'
     import html from 'highlight.js/lib/languages/xml'
    -// load all highlight.js languages
    -import { lowlight } from 'lowlight'
    +// load all languages with "all" or common languages with "common"
    +import { all, createLowlight } from 'lowlight'
     
    -lowlight.registerLanguage('html', html)
    -lowlight.registerLanguage('css', css)
    -lowlight.registerLanguage('js', js)
    -lowlight.registerLanguage('ts', ts)
    +// create a lowlight instance
    +const lowlight = createLowlight(all)
    +
    +// you can also register languages
    +lowlight.register('html', html)
    +lowlight.register('css', css)
    +lowlight.register('js', js)
    +lowlight.register('ts', ts)
     
     export default {
       components: {
    @@ -56,7 +60,7 @@ export default {
           ],
           content: `
             

    - That’s a boring paragraph followed by a fenced code block: + That's a boring paragraph followed by a fenced code block:

    for (var i=1; i <= 20; i++)
     {
    diff --git a/package-lock.json b/package-lock.json
    index 795aab05520..119ba5ec568 100644
    --- a/package-lock.json
    +++ b/package-lock.json
    @@ -60,13 +60,13 @@
             "@lexical/react": "^0.11.1",
             "d3": "^7.3.0",
             "fast-glob": "^3.2.11",
    -        "highlight.js": "^11.6.0",
    +        "highlight.js": "^11.10.0",
             "lexical": "^0.11.1",
    -        "lowlight": "^2.7.0",
    +        "lowlight": "^3.1.0",
             "remixicon": "^2.5.0",
             "shiki": "^1.10.3",
             "simplify-js": "^1.2.4",
    -        "y-prosemirror": "^1.2.9",
    +        "y-prosemirror": "^1.2.11",
             "y-webrtc": "^10.3.0",
             "yjs": "^13.6.18"
           },
    @@ -116,14 +116,6 @@
             "yjs": "^13.6.8"
           }
         },
    -    "demos/node_modules/@types/hast": {
    -      "version": "3.0.4",
    -      "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
    -      "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
    -      "dependencies": {
    -        "@types/unist": "*"
    -      }
    -    },
         "demos/node_modules/@vitejs/plugin-vue": {
           "version": "5.0.5",
           "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz",
    @@ -345,6 +337,14 @@
             "node": ">=8"
           }
         },
    +    "demos/node_modules/highlight.js": {
    +      "version": "11.10.0",
    +      "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.10.0.tgz",
    +      "integrity": "sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ==",
    +      "engines": {
    +        "node": ">=12.0.0"
    +      }
    +    },
         "demos/node_modules/hosted-git-info": {
           "version": "4.1.0",
           "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
    @@ -791,6 +791,29 @@
             }
           }
         },
    +    "demos/node_modules/y-prosemirror": {
    +      "version": "1.2.11",
    +      "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.2.11.tgz",
    +      "integrity": "sha512-MUGMYyokOb9DpBRHr4Cadob2KheDCKW2LHceAM2yrWp9dfX+3HZZUNEubEPd4zszq4DF2fGCFhE3N66zOTLoxA==",
    +      "dependencies": {
    +        "lib0": "^0.2.42"
    +      },
    +      "engines": {
    +        "node": ">=16.0.0",
    +        "npm": ">=8.0.0"
    +      },
    +      "funding": {
    +        "type": "GitHub Sponsors ❤",
    +        "url": "https://github.com/sponsors/dmonad"
    +      },
    +      "peerDependencies": {
    +        "prosemirror-model": "^1.7.1",
    +        "prosemirror-state": "^1.2.3",
    +        "prosemirror-view": "^1.9.10",
    +        "y-protocols": "^1.0.1",
    +        "yjs": "^13.5.38"
    +      }
    +    },
         "demos/node_modules/yallist": {
           "version": "4.0.0",
           "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
    @@ -5043,14 +5066,6 @@
             "@types/hast": "^3.0.4"
           }
         },
    -    "node_modules/@shikijs/core/node_modules/@types/hast": {
    -      "version": "3.0.4",
    -      "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
    -      "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
    -      "dependencies": {
    -        "@types/unist": "*"
    -      }
    -    },
         "node_modules/@sveltejs/vite-plugin-svelte": {
           "version": "2.5.3",
           "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.5.3.tgz",
    @@ -5401,11 +5416,11 @@
           "dev": true
         },
         "node_modules/@types/hast": {
    -      "version": "2.3.10",
    -      "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz",
    -      "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==",
    +      "version": "3.0.4",
    +      "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
    +      "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
           "dependencies": {
    -        "@types/unist": "^2"
    +        "@types/unist": "*"
           }
         },
         "node_modules/@types/json-schema": {
    @@ -8305,6 +8320,14 @@
             "node": ">=0.4.0"
           }
         },
    +    "node_modules/dequal": {
    +      "version": "2.0.3",
    +      "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
    +      "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
    +      "engines": {
    +        "node": ">=6"
    +      }
    +    },
         "node_modules/detect-file": {
           "version": "1.0.0",
           "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
    @@ -8323,6 +8346,18 @@
             "node": ">=8"
           }
         },
    +    "node_modules/devlop": {
    +      "version": "1.1.0",
    +      "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
    +      "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
    +      "dependencies": {
    +        "dequal": "^2.0.0"
    +      },
    +      "funding": {
    +        "type": "github",
    +        "url": "https://github.com/sponsors/wooorm"
    +      }
    +    },
         "node_modules/didyoumean": {
           "version": "1.2.2",
           "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
    @@ -9580,18 +9615,6 @@
             "reusify": "^1.0.4"
           }
         },
    -    "node_modules/fault": {
    -      "version": "2.0.1",
    -      "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz",
    -      "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==",
    -      "dependencies": {
    -        "format": "^0.2.0"
    -      },
    -      "funding": {
    -        "type": "github",
    -        "url": "https://github.com/sponsors/wooorm"
    -      }
    -    },
         "node_modules/fd-slicer": {
           "version": "1.1.0",
           "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
    @@ -9854,14 +9877,6 @@
             "node": ">= 0.12"
           }
         },
    -    "node_modules/format": {
    -      "version": "0.2.2",
    -      "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz",
    -      "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==",
    -      "engines": {
    -        "node": ">=0.4.x"
    -      }
    -    },
         "node_modules/fraction.js": {
           "version": "4.3.7",
           "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
    @@ -12375,27 +12390,19 @@
           }
         },
         "node_modules/lowlight": {
    -      "version": "2.9.0",
    -      "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-2.9.0.tgz",
    -      "integrity": "sha512-OpcaUTCLmHuVuBcyNckKfH5B0oA4JUavb/M/8n9iAvanJYNQkrVm4pvyX0SUaqkBG4dnWHKt7p50B3ngAG2Rfw==",
    +      "version": "3.1.0",
    +      "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.1.0.tgz",
    +      "integrity": "sha512-CEbNVoSikAxwDMDPjXlqlFYiZLkDJHwyGu/MfOsJnF3d7f3tds5J3z8s/l9TMXhzfsJCCJEAsD78842mwmg0PQ==",
           "dependencies": {
    -        "@types/hast": "^2.0.0",
    -        "fault": "^2.0.0",
    -        "highlight.js": "~11.8.0"
    +        "@types/hast": "^3.0.0",
    +        "devlop": "^1.0.0",
    +        "highlight.js": "~11.9.0"
           },
           "funding": {
             "type": "github",
             "url": "https://github.com/sponsors/wooorm"
           }
         },
    -    "node_modules/lowlight/node_modules/highlight.js": {
    -      "version": "11.8.0",
    -      "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz",
    -      "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==",
    -      "engines": {
    -        "node": ">=12.0.0"
    -      }
    -    },
         "node_modules/lru-cache": {
           "version": "5.1.1",
           "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
    @@ -17741,29 +17748,6 @@
             "node": ">=12"
           }
         },
    -    "node_modules/y-prosemirror": {
    -      "version": "1.2.9",
    -      "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.2.9.tgz",
    -      "integrity": "sha512-fThGIVmSqrqnG/ckywEGlHM9ElfILC4TcMZd5zxWPe/i+UuP97TEr4swsopRKG3Y+KHBVt4Y/5NVBC3AAsUoUg==",
    -      "dependencies": {
    -        "lib0": "^0.2.42"
    -      },
    -      "engines": {
    -        "node": ">=16.0.0",
    -        "npm": ">=8.0.0"
    -      },
    -      "funding": {
    -        "type": "GitHub Sponsors ❤",
    -        "url": "https://github.com/sponsors/dmonad"
    -      },
    -      "peerDependencies": {
    -        "prosemirror-model": "^1.7.1",
    -        "prosemirror-state": "^1.2.3",
    -        "prosemirror-view": "^1.9.10",
    -        "y-protocols": "^1.0.1",
    -        "yjs": "^13.5.38"
    -      }
    -    },
         "node_modules/y-protocols": {
           "version": "1.0.6",
           "resolved": "https://registry.npmjs.org/y-protocols/-/y-protocols-1.0.6.tgz",
    @@ -18049,7 +18033,8 @@
           "devDependencies": {
             "@tiptap/core": "^2.5.8",
             "@tiptap/extension-code-block": "^2.5.8",
    -        "@tiptap/pm": "^2.5.8"
    +        "@tiptap/pm": "^2.5.8",
    +        "lowlight": "^2 || ^3"
           },
           "funding": {
             "type": "github",
    @@ -18058,7 +18043,9 @@
           "peerDependencies": {
             "@tiptap/core": "^2.5.8",
             "@tiptap/extension-code-block": "^2.5.8",
    -        "@tiptap/pm": "^2.5.8"
    +        "@tiptap/pm": "^2.5.8",
    +        "highlight.js": "^11",
    +        "lowlight": "^2 || ^3"
           }
         },
         "packages/extension-collaboration": {
    @@ -18068,7 +18055,7 @@
           "devDependencies": {
             "@tiptap/core": "^2.5.8",
             "@tiptap/pm": "^2.5.8",
    -        "y-prosemirror": "^1.2.9"
    +        "y-prosemirror": "^1.2.11"
           },
           "funding": {
             "type": "github",
    @@ -18077,7 +18064,7 @@
           "peerDependencies": {
             "@tiptap/core": "^2.5.8",
             "@tiptap/pm": "^2.5.8",
    -        "y-prosemirror": "^1.2.6"
    +        "y-prosemirror": "^1.2.11"
           }
         },
         "packages/extension-collaboration-cursor": {
    @@ -18086,7 +18073,7 @@
           "license": "MIT",
           "devDependencies": {
             "@tiptap/core": "^2.5.8",
    -        "y-prosemirror": "^1.2.9"
    +        "y-prosemirror": "^1.2.11"
           },
           "funding": {
             "type": "github",
    @@ -18094,7 +18081,55 @@
           },
           "peerDependencies": {
             "@tiptap/core": "^2.5.8",
    -        "y-prosemirror": "^1.2.6"
    +        "y-prosemirror": "^1.2.11"
    +      }
    +    },
    +    "packages/extension-collaboration-cursor/node_modules/y-prosemirror": {
    +      "version": "1.2.11",
    +      "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.2.11.tgz",
    +      "integrity": "sha512-MUGMYyokOb9DpBRHr4Cadob2KheDCKW2LHceAM2yrWp9dfX+3HZZUNEubEPd4zszq4DF2fGCFhE3N66zOTLoxA==",
    +      "dev": true,
    +      "dependencies": {
    +        "lib0": "^0.2.42"
    +      },
    +      "engines": {
    +        "node": ">=16.0.0",
    +        "npm": ">=8.0.0"
    +      },
    +      "funding": {
    +        "type": "GitHub Sponsors ❤",
    +        "url": "https://github.com/sponsors/dmonad"
    +      },
    +      "peerDependencies": {
    +        "prosemirror-model": "^1.7.1",
    +        "prosemirror-state": "^1.2.3",
    +        "prosemirror-view": "^1.9.10",
    +        "y-protocols": "^1.0.1",
    +        "yjs": "^13.5.38"
    +      }
    +    },
    +    "packages/extension-collaboration/node_modules/y-prosemirror": {
    +      "version": "1.2.11",
    +      "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.2.11.tgz",
    +      "integrity": "sha512-MUGMYyokOb9DpBRHr4Cadob2KheDCKW2LHceAM2yrWp9dfX+3HZZUNEubEPd4zszq4DF2fGCFhE3N66zOTLoxA==",
    +      "dev": true,
    +      "dependencies": {
    +        "lib0": "^0.2.42"
    +      },
    +      "engines": {
    +        "node": ">=16.0.0",
    +        "npm": ">=8.0.0"
    +      },
    +      "funding": {
    +        "type": "GitHub Sponsors ❤",
    +        "url": "https://github.com/sponsors/dmonad"
    +      },
    +      "peerDependencies": {
    +        "prosemirror-model": "^1.7.1",
    +        "prosemirror-state": "^1.2.3",
    +        "prosemirror-view": "^1.9.10",
    +        "y-protocols": "^1.0.1",
    +        "yjs": "^13.5.38"
           }
         },
         "packages/extension-color": {
    diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
    index f09355081b1..754a9f5bc73 100644
    --- a/packages/core/CHANGELOG.md
    +++ b/packages/core/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- 84ebd51: Fix change criteria for isNodeEmpty to resolve #5415
    +- 0ec0af6: fix(core): findDuplicates - use Array.from when converting Set
    +- ae0254d: Add `ignoreWhitespace` option to `isNodeEmpty` to ignore any whitespace and hardbreaks in a node to check for emptiness
    +- efb27fa: This fixes a discrepency between `getMarksBetween` and `isActive(markName)` where the position used for getMarksBetween was off by one
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/core/package.json b/packages/core/package.json
    index 3dae731c7b4..b3b0f360894 100644
    --- a/packages/core/package.json
    +++ b/packages/core/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/core",
       "description": "headless rich text editor",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -32,10 +32,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/core/src/helpers/isNodeEmpty.ts b/packages/core/src/helpers/isNodeEmpty.ts
    index 90d94f6eea9..8d9a764006b 100644
    --- a/packages/core/src/helpers/isNodeEmpty.ts
    +++ b/packages/core/src/helpers/isNodeEmpty.ts
    @@ -1,13 +1,34 @@
     import { Node as ProseMirrorNode } from '@tiptap/pm/model'
     
     /**
    - * Returns true if the given node is empty.
    - * When `checkChildren` is true (default), it will also check if all children are empty.
    + * Returns true if the given prosemirror node is empty.
      */
     export function isNodeEmpty(
       node: ProseMirrorNode,
    -  { checkChildren }: { checkChildren: boolean } = { checkChildren: true },
    +  {
    +    checkChildren = true,
    +    ignoreWhitespace = false,
    +  }: {
    +    /**
    +     * When true (default), it will also check if all children are empty.
    +     */
    +    checkChildren?: boolean;
    +    /**
    +     * When true, it will ignore whitespace when checking for emptiness.
    +     */
    +    ignoreWhitespace?: boolean;
    +  } = {},
     ): boolean {
    +  if (ignoreWhitespace) {
    +    if (node.type.name === 'hardBreak') {
    +      // Hard breaks are considered empty
    +      return true
    +    }
    +    if (node.isText) {
    +      return /^\s*$/m.test(node.text ?? '')
    +    }
    +  }
    +
       if (node.isText) {
         return !node.text
       }
    @@ -21,20 +42,20 @@ export function isNodeEmpty(
       }
     
       if (checkChildren) {
    -    let hasSameContent = true
    +    let isContentEmpty = true
     
         node.content.forEach(childNode => {
    -      if (hasSameContent === false) {
    +      if (isContentEmpty === false) {
             // Exit early for perf
             return
           }
     
    -      if (!isNodeEmpty(childNode)) {
    -        hasSameContent = false
    +      if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) {
    +        isContentEmpty = false
           }
         })
     
    -    return hasSameContent
    +    return isContentEmpty
       }
     
       return false
    diff --git a/packages/extension-blockquote/CHANGELOG.md b/packages/extension-blockquote/CHANGELOG.md
    index 0f067b1d01d..2c8557ad91b 100644
    --- a/packages/extension-blockquote/CHANGELOG.md
    +++ b/packages/extension-blockquote/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-blockquote/package.json b/packages/extension-blockquote/package.json
    index 08d7380e2bd..db2b7818939 100644
    --- a/packages/extension-blockquote/package.json
    +++ b/packages/extension-blockquote/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-blockquote",
       "description": "blockquote extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-bold/CHANGELOG.md b/packages/extension-bold/CHANGELOG.md
    index 7aef7790f63..adee1b0d26c 100644
    --- a/packages/extension-bold/CHANGELOG.md
    +++ b/packages/extension-bold/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-bold/package.json b/packages/extension-bold/package.json
    index 656f4767518..70e9bccf099 100644
    --- a/packages/extension-bold/package.json
    +++ b/packages/extension-bold/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-bold",
       "description": "bold extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-bubble-menu/CHANGELOG.md b/packages/extension-bubble-menu/CHANGELOG.md
    index 30f13231097..db637572aed 100644
    --- a/packages/extension-bubble-menu/CHANGELOG.md
    +++ b/packages/extension-bubble-menu/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-bubble-menu/package.json b/packages/extension-bubble-menu/package.json
    index b2afaf1d8ae..4b7590144ef 100644
    --- a/packages/extension-bubble-menu/package.json
    +++ b/packages/extension-bubble-menu/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-bubble-menu",
       "description": "bubble-menu extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -38,12 +38,12 @@
       },
       "sideEffects": false,
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "scripts": {
         "clean": "rm -rf dist",
    diff --git a/packages/extension-bullet-list/CHANGELOG.md b/packages/extension-bullet-list/CHANGELOG.md
    index fba1e882835..1fd11f2d964 100644
    --- a/packages/extension-bullet-list/CHANGELOG.md
    +++ b/packages/extension-bullet-list/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-bullet-list/package.json b/packages/extension-bullet-list/package.json
    index d297794cfdb..40bd282b816 100644
    --- a/packages/extension-bullet-list/package.json
    +++ b/packages/extension-bullet-list/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-bullet-list",
       "description": "bullet list extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-character-count/CHANGELOG.md b/packages/extension-character-count/CHANGELOG.md
    index 7f89fa84cc8..dfd50baa71c 100644
    --- a/packages/extension-character-count/CHANGELOG.md
    +++ b/packages/extension-character-count/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-character-count/package.json b/packages/extension-character-count/package.json
    index 8caa81eb9e3..750b711be37 100644
    --- a/packages/extension-character-count/package.json
    +++ b/packages/extension-character-count/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-character-count",
       "description": "font family extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-code-block-lowlight/CHANGELOG.md b/packages/extension-code-block-lowlight/CHANGELOG.md
    index e2ea1ebe83a..f0826dcf92d 100644
    --- a/packages/extension-code-block-lowlight/CHANGELOG.md
    +++ b/packages/extension-code-block-lowlight/CHANGELOG.md
    @@ -1,5 +1,20 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- d6e56c4: declare lowlight to be a peer dep of extension-code-block-lowlight, update usage to v3
    +- 4b215f7: `defaultLanguage` on Code Block Lowlight was not being respected properly, to address this we added `defaultLanguage` as an option to the code-block extension.
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [4b215f7]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/extension-code-block@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-code-block-lowlight/package.json b/packages/extension-code-block-lowlight/package.json
    index f9dc1502a20..4ddb57e0109 100644
    --- a/packages/extension-code-block-lowlight/package.json
    +++ b/packages/extension-code-block-lowlight/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-code-block-lowlight",
       "description": "code block extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,14 +29,17 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/extension-code-block": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/extension-code-block": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9",
    +    "lowlight": "^2 || ^3"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/extension-code-block": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/extension-code-block": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9",
    +    "lowlight": "^2 || ^3",
    +    "highlight.js": "^11"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-code-block-lowlight/src/code-block-lowlight.ts b/packages/extension-code-block-lowlight/src/code-block-lowlight.ts
    index c1eb4dcbfb1..3b952e32985 100644
    --- a/packages/extension-code-block-lowlight/src/code-block-lowlight.ts
    +++ b/packages/extension-code-block-lowlight/src/code-block-lowlight.ts
    @@ -7,13 +7,6 @@ export interface CodeBlockLowlightOptions extends CodeBlockOptions {
        * The lowlight instance.
        */
       lowlight: any,
    -
    -  /**
    -   * The default language.
    -   * @default null
    -   * @example 'javascript'
    -   */
    -  defaultLanguage: string | null | undefined,
     }
     
     /**
    @@ -25,7 +18,6 @@ export const CodeBlockLowlight = CodeBlock.extend({
         return {
           ...this.parent?.(),
           lowlight: {},
    -      defaultLanguage: null,
         }
       },
     
    diff --git a/packages/extension-code-block/CHANGELOG.md b/packages/extension-code-block/CHANGELOG.md
    index 8a168430398..0ca36dbd753 100644
    --- a/packages/extension-code-block/CHANGELOG.md
    +++ b/packages/extension-code-block/CHANGELOG.md
    @@ -1,5 +1,17 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- 4b215f7: `defaultLanguage` on Code Block Lowlight was not being respected properly, to address this we added `defaultLanguage` as an option to the code-block extension.
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-code-block/package.json b/packages/extension-code-block/package.json
    index 443b673d51d..13e1957e882 100644
    --- a/packages/extension-code-block/package.json
    +++ b/packages/extension-code-block/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-code-block",
       "description": "code block extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-code-block/src/code-block.ts b/packages/extension-code-block/src/code-block.ts
    index 8d6b22d4c99..122e476b402 100644
    --- a/packages/extension-code-block/src/code-block.ts
    +++ b/packages/extension-code-block/src/code-block.ts
    @@ -22,6 +22,12 @@ export interface CodeBlockOptions {
        * @default true
        */
       exitOnArrowDown: boolean
    +  /**
    +   * The default language.
    +   * @default null
    +   * @example 'js'
    +   */
    +  defaultLanguage: string | null | undefined
       /**
        * Custom HTML attributes that should be added to the rendered HTML tag.
        * @default {}
    @@ -71,6 +77,7 @@ export const CodeBlock = Node.create({
           languageClassPrefix: 'language-',
           exitOnTripleEnter: true,
           exitOnArrowDown: true,
    +      defaultLanguage: null,
           HTMLAttributes: {},
         }
       },
    @@ -88,7 +95,7 @@ export const CodeBlock = Node.create({
       addAttributes() {
         return {
           language: {
    -        default: null,
    +        default: this.options.defaultLanguage,
             parseHTML: element => {
               const { languageClassPrefix } = this.options
               const classNames = [...(element.firstElementChild?.classList || [])]
    diff --git a/packages/extension-code/CHANGELOG.md b/packages/extension-code/CHANGELOG.md
    index 3149c764789..478f236e502 100644
    --- a/packages/extension-code/CHANGELOG.md
    +++ b/packages/extension-code/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-code/package.json b/packages/extension-code/package.json
    index 35bda86617f..64dde6db88f 100644
    --- a/packages/extension-code/package.json
    +++ b/packages/extension-code/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-code",
       "description": "code extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-collaboration-cursor/CHANGELOG.md b/packages/extension-collaboration-cursor/CHANGELOG.md
    index c8e2080cee8..84035700031 100644
    --- a/packages/extension-collaboration-cursor/CHANGELOG.md
    +++ b/packages/extension-collaboration-cursor/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- 174aefe: This updates y-prosemirror to a version that no longer has syncing problems and extension collaboration now respects the onFirstRender option
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-collaboration-cursor/package.json b/packages/extension-collaboration-cursor/package.json
    index c596cb07ccb..e4e7a0b99cb 100644
    --- a/packages/extension-collaboration-cursor/package.json
    +++ b/packages/extension-collaboration-cursor/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-collaboration-cursor",
       "description": "collaboration cursor extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "y-prosemirror": "^1.2.9"
    +    "@tiptap/core": "^2.5.9",
    +    "y-prosemirror": "^1.2.11"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "y-prosemirror": "^1.2.6"
    +    "@tiptap/core": "^2.5.9",
    +    "y-prosemirror": "^1.2.11"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-collaboration-cursor/src/collaboration-cursor.ts b/packages/extension-collaboration-cursor/src/collaboration-cursor.ts
    index ed17ad06f1c..3c14708edcf 100644
    --- a/packages/extension-collaboration-cursor/src/collaboration-cursor.ts
    +++ b/packages/extension-collaboration-cursor/src/collaboration-cursor.ts
    @@ -127,6 +127,9 @@ export const CollaborationCursor = Extension.create({
         }
     
         const ySyncPluginOptions: YSyncOpts = {
    -      ...(this.options.ySyncOptions ? { ...this.options.ySyncOptions } : {}),
    -      ...(this.options.onFirstRender ? { ...this.options.onFirstRender } : {}),
    +      ...this.options.ySyncOptions,
    +      onFirstRender: this.options.onFirstRender,
         }
     
         const ySyncPluginInstance = ySyncPlugin(fragment, ySyncPluginOptions)
    diff --git a/packages/extension-color/CHANGELOG.md b/packages/extension-color/CHANGELOG.md
    index 1dc125a73a1..a1666868755 100644
    --- a/packages/extension-color/CHANGELOG.md
    +++ b/packages/extension-color/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/extension-text-style@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-color/package.json b/packages/extension-color/package.json
    index 9724ca81386..332dbc54120 100644
    --- a/packages/extension-color/package.json
    +++ b/packages/extension-color/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-color",
       "description": "text color extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/extension-text-style": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/extension-text-style": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/extension-text-style": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/extension-text-style": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-document/CHANGELOG.md b/packages/extension-document/CHANGELOG.md
    index 0093148e872..1018bbaf53c 100644
    --- a/packages/extension-document/CHANGELOG.md
    +++ b/packages/extension-document/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-document/package.json b/packages/extension-document/package.json
    index 823ccec8818..454f931b5cd 100644
    --- a/packages/extension-document/package.json
    +++ b/packages/extension-document/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-document",
       "description": "document extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-dropcursor/CHANGELOG.md b/packages/extension-dropcursor/CHANGELOG.md
    index ac1b60a662b..f61ecb57070 100644
    --- a/packages/extension-dropcursor/CHANGELOG.md
    +++ b/packages/extension-dropcursor/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-dropcursor/package.json b/packages/extension-dropcursor/package.json
    index e9370db81a4..3446fda508f 100644
    --- a/packages/extension-dropcursor/package.json
    +++ b/packages/extension-dropcursor/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-dropcursor",
       "description": "dropcursor extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-floating-menu/CHANGELOG.md b/packages/extension-floating-menu/CHANGELOG.md
    index 71e028eac00..12295e90883 100644
    --- a/packages/extension-floating-menu/CHANGELOG.md
    +++ b/packages/extension-floating-menu/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-floating-menu/package.json b/packages/extension-floating-menu/package.json
    index 9e2d2f0e19a..e1e61a7ff91 100644
    --- a/packages/extension-floating-menu/package.json
    +++ b/packages/extension-floating-menu/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-floating-menu",
       "description": "floating-menu extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "dependencies": {
         "tippy.js": "^6.3.7"
    diff --git a/packages/extension-focus/CHANGELOG.md b/packages/extension-focus/CHANGELOG.md
    index e90ad054c55..aaf3a11c8af 100644
    --- a/packages/extension-focus/CHANGELOG.md
    +++ b/packages/extension-focus/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-focus/package.json b/packages/extension-focus/package.json
    index 17f79f728c0..5411f8812ab 100644
    --- a/packages/extension-focus/package.json
    +++ b/packages/extension-focus/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-focus",
       "description": "focus extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-font-family/CHANGELOG.md b/packages/extension-font-family/CHANGELOG.md
    index ecf913fdb9a..1f0ccadfb2b 100644
    --- a/packages/extension-font-family/CHANGELOG.md
    +++ b/packages/extension-font-family/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/extension-text-style@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-font-family/package.json b/packages/extension-font-family/package.json
    index 67a5b335cde..991f1f666e1 100644
    --- a/packages/extension-font-family/package.json
    +++ b/packages/extension-font-family/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-font-family",
       "description": "font family extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/extension-text-style": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/extension-text-style": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/extension-text-style": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/extension-text-style": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-gapcursor/CHANGELOG.md b/packages/extension-gapcursor/CHANGELOG.md
    index 3638213a3cc..e384f170eb1 100644
    --- a/packages/extension-gapcursor/CHANGELOG.md
    +++ b/packages/extension-gapcursor/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-gapcursor/package.json b/packages/extension-gapcursor/package.json
    index 4f1850eaa73..efaeded49d5 100644
    --- a/packages/extension-gapcursor/package.json
    +++ b/packages/extension-gapcursor/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-gapcursor",
       "description": "gapcursor extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-hard-break/CHANGELOG.md b/packages/extension-hard-break/CHANGELOG.md
    index 1c867493747..c2d3d8563b0 100644
    --- a/packages/extension-hard-break/CHANGELOG.md
    +++ b/packages/extension-hard-break/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-hard-break/package.json b/packages/extension-hard-break/package.json
    index f4720536a0b..d139dfe06af 100644
    --- a/packages/extension-hard-break/package.json
    +++ b/packages/extension-hard-break/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-hard-break",
       "description": "hard break extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-heading/CHANGELOG.md b/packages/extension-heading/CHANGELOG.md
    index 45ff35a87a3..7847c422504 100644
    --- a/packages/extension-heading/CHANGELOG.md
    +++ b/packages/extension-heading/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-heading/package.json b/packages/extension-heading/package.json
    index 116ac236336..d46b275f2a7 100644
    --- a/packages/extension-heading/package.json
    +++ b/packages/extension-heading/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-heading",
       "description": "heading extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-highlight/CHANGELOG.md b/packages/extension-highlight/CHANGELOG.md
    index 13df29ce67a..778d9fcaff7 100644
    --- a/packages/extension-highlight/CHANGELOG.md
    +++ b/packages/extension-highlight/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-highlight/package.json b/packages/extension-highlight/package.json
    index e5b64b99f55..4dc6f7f125d 100644
    --- a/packages/extension-highlight/package.json
    +++ b/packages/extension-highlight/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-highlight",
       "description": "highlight extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-history/CHANGELOG.md b/packages/extension-history/CHANGELOG.md
    index 2590595d737..ca5869628ab 100644
    --- a/packages/extension-history/CHANGELOG.md
    +++ b/packages/extension-history/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-history/package.json b/packages/extension-history/package.json
    index 61fc1fedb54..e3965f6fbe3 100644
    --- a/packages/extension-history/package.json
    +++ b/packages/extension-history/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-history",
       "description": "history extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-horizontal-rule/CHANGELOG.md b/packages/extension-horizontal-rule/CHANGELOG.md
    index d82790e9928..6bb2ce9eecf 100644
    --- a/packages/extension-horizontal-rule/CHANGELOG.md
    +++ b/packages/extension-horizontal-rule/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-horizontal-rule/package.json b/packages/extension-horizontal-rule/package.json
    index 2e6f0ddc6cd..874907468d5 100644
    --- a/packages/extension-horizontal-rule/package.json
    +++ b/packages/extension-horizontal-rule/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-horizontal-rule",
       "description": "horizontal rule extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-image/CHANGELOG.md b/packages/extension-image/CHANGELOG.md
    index 6f3fbbe352f..225f5529117 100644
    --- a/packages/extension-image/CHANGELOG.md
    +++ b/packages/extension-image/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-image/package.json b/packages/extension-image/package.json
    index 47b42d3855a..7ba2fc27967 100644
    --- a/packages/extension-image/package.json
    +++ b/packages/extension-image/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-image",
       "description": "image extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-italic/CHANGELOG.md b/packages/extension-italic/CHANGELOG.md
    index aab430f4a07..cea723e70d7 100644
    --- a/packages/extension-italic/CHANGELOG.md
    +++ b/packages/extension-italic/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-italic/package.json b/packages/extension-italic/package.json
    index 215cad447ab..e5083adb0c3 100644
    --- a/packages/extension-italic/package.json
    +++ b/packages/extension-italic/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-italic",
       "description": "italic extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-link/CHANGELOG.md b/packages/extension-link/CHANGELOG.md
    index 4f28881f952..06f5b628f35 100644
    --- a/packages/extension-link/CHANGELOG.md
    +++ b/packages/extension-link/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-link/package.json b/packages/extension-link/package.json
    index b7407e85994..dcd5aab6e9b 100644
    --- a/packages/extension-link/package.json
    +++ b/packages/extension-link/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-link",
       "description": "link extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -32,12 +32,12 @@
         "linkifyjs": "^4.1.0"
       },
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-list-item/CHANGELOG.md b/packages/extension-list-item/CHANGELOG.md
    index 5699dfbea25..80507e8a377 100644
    --- a/packages/extension-list-item/CHANGELOG.md
    +++ b/packages/extension-list-item/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-list-item/package.json b/packages/extension-list-item/package.json
    index b7e9880ba01..e084fdf4653 100644
    --- a/packages/extension-list-item/package.json
    +++ b/packages/extension-list-item/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-list-item",
       "description": "list item extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-list-keymap/CHANGELOG.md b/packages/extension-list-keymap/CHANGELOG.md
    index 2be1886c2c4..c13cd69d980 100644
    --- a/packages/extension-list-keymap/CHANGELOG.md
    +++ b/packages/extension-list-keymap/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-list-keymap/package.json b/packages/extension-list-keymap/package.json
    index 9c915bd7361..752ae0d1449 100644
    --- a/packages/extension-list-keymap/package.json
    +++ b/packages/extension-list-keymap/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-list-keymap",
       "description": "list keymap extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-mention/CHANGELOG.md b/packages/extension-mention/CHANGELOG.md
    index 9eff262be85..70d3500822b 100644
    --- a/packages/extension-mention/CHANGELOG.md
    +++ b/packages/extension-mention/CHANGELOG.md
    @@ -1,5 +1,17 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +  - @tiptap/suggestion@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-mention/package.json b/packages/extension-mention/package.json
    index 338dc304d48..7bd17ccbf1e 100644
    --- a/packages/extension-mention/package.json
    +++ b/packages/extension-mention/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-mention",
       "description": "mention extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,14 +29,14 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8",
    -    "@tiptap/suggestion": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9",
    +    "@tiptap/suggestion": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8",
    -    "@tiptap/suggestion": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9",
    +    "@tiptap/suggestion": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-ordered-list/CHANGELOG.md b/packages/extension-ordered-list/CHANGELOG.md
    index 07d006ca12f..0cd7cc0d735 100644
    --- a/packages/extension-ordered-list/CHANGELOG.md
    +++ b/packages/extension-ordered-list/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-ordered-list/package.json b/packages/extension-ordered-list/package.json
    index 39d5ba3e8d9..a61c9761f47 100644
    --- a/packages/extension-ordered-list/package.json
    +++ b/packages/extension-ordered-list/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-ordered-list",
       "description": "ordered list extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-paragraph/CHANGELOG.md b/packages/extension-paragraph/CHANGELOG.md
    index 5a9a20514da..524ecd339be 100644
    --- a/packages/extension-paragraph/CHANGELOG.md
    +++ b/packages/extension-paragraph/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-paragraph/package.json b/packages/extension-paragraph/package.json
    index 935f378d39b..bfbf45f3403 100644
    --- a/packages/extension-paragraph/package.json
    +++ b/packages/extension-paragraph/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-paragraph",
       "description": "paragraph extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-placeholder/CHANGELOG.md b/packages/extension-placeholder/CHANGELOG.md
    index db8437dec64..40f89124daf 100644
    --- a/packages/extension-placeholder/CHANGELOG.md
    +++ b/packages/extension-placeholder/CHANGELOG.md
    @@ -1,5 +1,17 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- c1ff1b0: add back `considerAsAny` type but mark it deprecated
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-placeholder/package.json b/packages/extension-placeholder/package.json
    index 8f4c6b24b5e..14dba9cfd9f 100644
    --- a/packages/extension-placeholder/package.json
    +++ b/packages/extension-placeholder/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-placeholder",
       "description": "placeholder extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-strike/CHANGELOG.md b/packages/extension-strike/CHANGELOG.md
    index b1118047aea..b7f2117ce46 100644
    --- a/packages/extension-strike/CHANGELOG.md
    +++ b/packages/extension-strike/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-strike/package.json b/packages/extension-strike/package.json
    index bb494f3d7c5..05f0ab21cc3 100644
    --- a/packages/extension-strike/package.json
    +++ b/packages/extension-strike/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-strike",
       "description": "strike extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-subscript/CHANGELOG.md b/packages/extension-subscript/CHANGELOG.md
    index c4f65ad2a97..8c4235abf3f 100644
    --- a/packages/extension-subscript/CHANGELOG.md
    +++ b/packages/extension-subscript/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-subscript/package.json b/packages/extension-subscript/package.json
    index 53e6110a283..aa76a2f3d86 100644
    --- a/packages/extension-subscript/package.json
    +++ b/packages/extension-subscript/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-subscript",
       "description": "subscript extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-superscript/CHANGELOG.md b/packages/extension-superscript/CHANGELOG.md
    index 39a32e3734d..8f467e3c223 100644
    --- a/packages/extension-superscript/CHANGELOG.md
    +++ b/packages/extension-superscript/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-superscript/package.json b/packages/extension-superscript/package.json
    index 93a2b8475da..3b96de1b202 100644
    --- a/packages/extension-superscript/package.json
    +++ b/packages/extension-superscript/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-superscript",
       "description": "superscript extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-table-cell/CHANGELOG.md b/packages/extension-table-cell/CHANGELOG.md
    index df03a433011..05320ef424f 100644
    --- a/packages/extension-table-cell/CHANGELOG.md
    +++ b/packages/extension-table-cell/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-table-cell/package.json b/packages/extension-table-cell/package.json
    index 24b4ec8aaa3..0ac19733bd2 100644
    --- a/packages/extension-table-cell/package.json
    +++ b/packages/extension-table-cell/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-table-cell",
       "description": "table cell extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-table-header/CHANGELOG.md b/packages/extension-table-header/CHANGELOG.md
    index 263fb70ff64..3ab1f2c724c 100644
    --- a/packages/extension-table-header/CHANGELOG.md
    +++ b/packages/extension-table-header/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-table-header/package.json b/packages/extension-table-header/package.json
    index 1f40f553c70..a0afa8ae5f1 100644
    --- a/packages/extension-table-header/package.json
    +++ b/packages/extension-table-header/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-table-header",
       "description": "table cell extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-table-row/CHANGELOG.md b/packages/extension-table-row/CHANGELOG.md
    index 35a6dd278e3..b3a912d3b29 100644
    --- a/packages/extension-table-row/CHANGELOG.md
    +++ b/packages/extension-table-row/CHANGELOG.md
    @@ -1,5 +1,15 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-table-row/package.json b/packages/extension-table-row/package.json
    index f99df81210e..0f80056f751 100644
    --- a/packages/extension-table-row/package.json
    +++ b/packages/extension-table-row/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-table-row",
       "description": "table row extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,10 +29,10 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8"
    +    "@tiptap/core": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-table/CHANGELOG.md b/packages/extension-table/CHANGELOG.md
    index 997da14d390..6e681f0776f 100644
    --- a/packages/extension-table/CHANGELOG.md
    +++ b/packages/extension-table/CHANGELOG.md
    @@ -1,5 +1,16 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- Updated dependencies [84ebd51]
    +- Updated dependencies [0ec0af6]
    +- Updated dependencies [ae0254d]
    +- Updated dependencies [efb27fa]
    +  - @tiptap/core@2.5.9
    +  - @tiptap/pm@2.5.9
    +
     ## 2.5.8
     
     ### Patch Changes
    diff --git a/packages/extension-table/package.json b/packages/extension-table/package.json
    index bea539f481a..6955456ac8b 100644
    --- a/packages/extension-table/package.json
    +++ b/packages/extension-table/package.json
    @@ -1,7 +1,7 @@
     {
       "name": "@tiptap/extension-table",
       "description": "table extension for tiptap",
    -  "version": "2.5.8",
    +  "version": "2.5.9",
       "homepage": "https://tiptap.dev",
       "keywords": [
         "tiptap",
    @@ -29,12 +29,12 @@
         "dist"
       ],
       "devDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "peerDependencies": {
    -    "@tiptap/core": "^2.5.8",
    -    "@tiptap/pm": "^2.5.8"
    +    "@tiptap/core": "^2.5.9",
    +    "@tiptap/pm": "^2.5.9"
       },
       "repository": {
         "type": "git",
    diff --git a/packages/extension-task-item/CHANGELOG.md b/packages/extension-task-item/CHANGELOG.md
    index c685af09570..572ffe24123 100644
    --- a/packages/extension-task-item/CHANGELOG.md
    +++ b/packages/extension-task-item/CHANGELOG.md
    @@ -1,5 +1,17 @@
     # Change Log
     
    +## 2.5.9
    +
    +### Patch Changes
    +
    +- 6543f05: allow task items to be parsed when only having `
  • { + describe('ignoreWhitespace=true', () => { + it('should return true when text has only whitespace', () => { + const node = schema.nodeFromJSON({ type: 'text', text: ' \n\t\r\n' }) + + expect(isNodeEmpty(node, { ignoreWhitespace: true })).to.eq(true) + }) + + it('should return true when a paragraph has only whitespace', () => { + const node = schema.nodeFromJSON({ + type: 'paragraph', + content: [{ type: 'text', text: ' \n\t\r\n' }], + }) + + expect(isNodeEmpty(node, { ignoreWhitespace: true })).to.eq(true) + }) + + it('should return true for a hardbreak', () => { + const node = schema.nodeFromJSON({ type: 'hardBreak' }) + + expect(isNodeEmpty(node, { ignoreWhitespace: true })).to.eq(true) + }) + + it('should return true when a paragraph has only a hardbreak', () => { + const node = schema.nodeFromJSON({ + type: 'paragraph', + content: [{ type: 'hardBreak' }], + }) + + expect(isNodeEmpty(node, { ignoreWhitespace: true })).to.eq(true) + }) + }) + describe('with default schema', () => { it('should return false when text has content', () => { const node = schema.nodeFromJSON({ type: 'text', text: 'Hello world!' }) @@ -39,13 +78,15 @@ describe('isNodeEmpty', () => { it('should return false when a paragraph has a mention', () => { const node = schema.nodeFromJSON({ type: 'paragraph', - content: [{ - type: 'mention', - attrs: { - id: 'Winona Ryder', - label: null, + content: [ + { + type: 'mention', + attrs: { + id: 'Winona Ryder', + label: null, + }, }, - }], + ], }) expect(isNodeEmpty(node)).to.eq(false) @@ -120,9 +161,7 @@ describe('isNodeEmpty', () => { content: [ { type: 'heading', - content: [ - { type: 'text', text: 'Hello world!' }, - ], + content: [{ type: 'text', text: 'Hello world!' }], }, ], }) @@ -137,9 +176,7 @@ describe('isNodeEmpty', () => { { type: 'heading' }, { type: 'paragraph', - content: [ - { type: 'text', text: 'Hello world!' }, - ], + content: [{ type: 'text', text: 'Hello world!' }], }, ], }) @@ -162,9 +199,7 @@ describe('isNodeEmpty', () => { it('should return true when a document has an empty heading with attrs', () => { const node = modifiedSchema.nodeFromJSON({ type: 'doc', - content: [ - { type: 'heading', content: [], attrs: { level: 2 } }, - ], + content: [{ type: 'heading', content: [], attrs: { level: 2 } }], }) expect(isNodeEmpty(node)).to.eq(true) diff --git a/tests/cypress/integration/extensions/codeBlockLowlight.spec.ts b/tests/cypress/integration/extensions/codeBlockLowlight.spec.ts index e3b6fd6d13b..00f1df62515 100644 --- a/tests/cypress/integration/extensions/codeBlockLowlight.spec.ts +++ b/tests/cypress/integration/extensions/codeBlockLowlight.spec.ts @@ -5,7 +5,9 @@ import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight' import { Document } from '@tiptap/extension-document' import { Paragraph } from '@tiptap/extension-paragraph' import { Text } from '@tiptap/extension-text' -import { lowlight } from 'lowlight' +import { all, createLowlight } from 'lowlight' + +const lowlight = createLowlight(all) describe('code block highlight', () => { let Frontmatter diff --git a/tests/cypress/tsconfig.json b/tests/cypress/tsconfig.json index ebd9a998fde..7967d1ebd80 100644 --- a/tests/cypress/tsconfig.json +++ b/tests/cypress/tsconfig.json @@ -6,7 +6,7 @@ "sourceMap": false, "types": ["cypress", "react", "react-dom"], "paths": { - "@tiptap/*": ["packages/*/dist", "packages/*/src"], + "@tiptap/*": ["packages/*/src", "packages/*/dist"], "@tiptap/pm/*": ["../../pm/*/dist"] }, "typeRoots": ["../../node_modules/@types", "../../node_modules/"],