Skip to content

MantineProvider not provided CSP nonce #997

Open
@instanceofnull

Description

@instanceofnull

Describe the bug

If a nonce has been passed to the component, it is not forwarded to the MantineProvider (as getStyleNonce). This results in the mantine styles not being applied - and the slash menu does not look right.

image

To Reproduce

The difficult part to reproducing this issue is setting up a strict content security policy - default-src 'none'; script-src 'self'; style-src 'self';

Once that is in place, a simple editor will trigger the issue (open the slash menu to see strange styles) -

<BlockNoteView nonce={context.nonce} editor={editor} filePanel={false} slashMenu={false} editable={editable} theme={lightDefaultTheme} />

Misc

  • Node version: v20.9.0
  • Package manager: yarn v1.22.19
  • Browser: Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingprio:midMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions