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

unknownBlockStyle is not working / does nothing #116

Open
kodeebo opened this issue Oct 16, 2023 · 0 comments
Open

unknownBlockStyle is not working / does nothing #116

kodeebo opened this issue Oct 16, 2023 · 0 comments
Labels

Comments

@kodeebo
Copy link

kodeebo commented Oct 16, 2023

The component override unknownBlockStyle is not working. It seems that when you provide a block component override, it is merged with the default block-styles, so that there never is an "unknown" block.
For instance if you define

  block: {
    // Ex. 1: customizing common block types
    h1: ({children}) => <h1 className="text-2xl">{children}</h1>,
    blockquote: ({children}) => <blockquote className="border-l-purple-500">{children}</blockquote>,
  },
  unknownBlockStyle: ({children}) => <BlockWrapper>{children}</BlockWrapper>,
}

the block style 'normal' should render with BlockWrapper, but instead gets render with the default component (<p>)

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

No branches or pull requests

2 participants