Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making @blocknote/mantine compatible with Mantine projects #1555

Open
strblr opened this issue Mar 21, 2025 · 2 comments
Open

Making @blocknote/mantine compatible with Mantine projects #1555

strblr opened this issue Mar 21, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@strblr
Copy link

strblr commented Mar 21, 2025

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 strblr added the enhancement New feature or request label Mar 21, 2025
@YousefED
Copy link
Collaborator

@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.

@Parker-Bergen
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants