TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
5.89k stars 381 forks source link

Add option to disable individual built in extensions #855

Closed fridaystreet closed 1 week ago

fridaystreet commented 1 week ago

Without completely needing to refactor the way tiptap extensions and core blocknote extensions are added, this should be fairly simple approach to just allow a list of extension names to be passed in that will then be removed from the inbuiult extensions before being passed to tiptap.

This will allow you to the override these extensions if you wish without completely disbaling blocknote via

const editor = useCreateBlockNote({
    disableBlockNoteExtensions:['link'],
    _tiptapOptions: {
      extensions: [
        Link,
      ]
    }
  })
vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ❌ Failed (Inspect) Jun 20, 2024 10:12am
vercel[bot] commented 1 week ago

@fridaystreet is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

fridaystreet commented 1 week ago

Apologies I closed this as I raised it as a different PR without all the unclean commits. I should have left a comment

This is the newer one that you merged. https://github.com/TypeCellOS/BlockNote/pull/858

matthewlipski commented 5 days ago

No worries, I figured as much haha. Next time don't worry about having messy commits btw, we always squash when merging PRs either way👍