fix: make blockquote shortcut work in starter-kit (#4995)

* fix: make blockquote shortcut work in starter-kit

Because blockquote uses Mod-Shift-b, and bold uses Mod-b,
the bold shortcut will override the blockquote shortcut if added
to the extensions later.

Fixes #4994

* chore: add changeset

---------

Co-authored-by: Nick Perez <nicholas.perez@tiptap.dev>
This commit is contained in:
Mathias Stang 2024-07-03 18:43:35 +02:00 committed by GitHub
parent 5ccc2ad68f
commit d5e10dc4b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/starter-kit": patch
---
fix(starter-kit): make blockquote shortcut work in starter-kit

View File

@ -139,14 +139,14 @@ export const StarterKit = Extension.create<StarterKitOptions>({
addExtensions() {
const extensions = []
if (this.options.blockquote !== false) {
extensions.push(Blockquote.configure(this.options?.blockquote))
}
if (this.options.bold !== false) {
extensions.push(Bold.configure(this.options?.bold))
}
if (this.options.blockquote !== false) {
extensions.push(Blockquote.configure(this.options?.blockquote))
}
if (this.options.bulletList !== false) {
extensions.push(BulletList.configure(this.options?.bulletList))
}