BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Making @blocknote/mantine compatible with Mantine projects

Open strblr opened this issue 8 months ago • 1 comments

Is your feature request related to a problem? Please describe. When using @blocknote/mantine in projects that already use Mantine, there is a conflict between variables, provider and maybe mantine versions.

Describe the solution you'd like BlockNoteView from @blocknote/mantine wraps the editor in MantineProvider. We should be able to opt-out of this, in case we're already in a Mantine codebase and have such a provider higher up.

This issue became obvious when I tried to customize Blocknote's CSS variables using mantine variables. I expected var(--mantine-color-text) (for example) to refer to the app's variable, but instead it refered to the local variable set up by Blocknote's Mantine provider so it didn't change the color the way I expected. This makes it hard to customize the theme using the app's mantine variables. Things like the default radius will be different from the app's theme as well.

Two additional points:

  • Making mantine packages peer dependencies
  • Having a CSS export that does not include Mantine CSS files, as these are usually already imported in a Mantine codebase

Describe alternatives you've considered Unclear.

Additional context

Bonus [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖

strblr avatar Mar 21 '25 21:03 strblr

@strblr thanks, we want to review our theming setup and we'll take this into account then as well. We haven't prioritized this yet at this moment, though

@matthewlipski fyi, this relates to a discussion we had recently.

YousefED avatar Mar 24 '25 08:03 YousefED

I second this request. When importing the styling CSS for BlockNote there are conflicts that break other default mantine components. This includes Mantine components such as :

  • Tree
  • Unstyled Buttons

Parker-Bergen avatar Apr 07 '25 16:04 Parker-Bergen

Hi, I would love this as well, I'm currently extending some parts of the BlockNote UI using Mantine components, and including Mantine's default styles break BlockNote's own.

ClementEXWiki avatar Jun 19 '25 08:06 ClementEXWiki

I second this, I love this editor, but I use Mantine for all my projects and it breaks many things.

hackntest avatar Sep 14 '25 15:09 hackntest