Skip to content

Support inline code with formattingToolbar. #510

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

Closed
CharlieCho2017 opened this issue Jan 10, 2024 · 3 comments · Fixed by #531
Closed

Support inline code with formattingToolbar. #510

CharlieCho2017 opened this issue Jan 10, 2024 · 3 comments · Fixed by #531
Labels
enhancement New feature or request prio:high High priority

Comments

@CharlieCho2017
Copy link

Is your feature request related to a problem? Please describe.
These is no inline code in the formattingToolbar.

Describe the solution you'd like
Could add the inline code in the formattingToolbar? Or how to achieve the feature with custom formatting toolbar?

@CharlieCho2017 CharlieCho2017 added the enhancement New feature or request label Jan 10, 2024
@hampak
Copy link

hampak commented Jan 10, 2024

+1 would also love this feature to be implemented

@matthewlipski
Copy link
Collaborator

You can add a code toggle button to the formatting toolbar by copying the default one and adding the <ToggledStyleButton editor={props.editor} toggledStyle={"code"} /> component to it. You can then replace the default formatting toolbar by following these docs: https://www.blocknotejs.org/docs/ui-elements#replacing-ui-elements.

I think it's a good idea to add an example for this in the docs, since it does take a few steps.

@CharlieCho2017
Copy link
Author

CharlieCho2017 commented Jan 18, 2024

Thank you. But there is no background color for Inline code. Could add it?

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

Successfully merging a pull request may close this issue.

3 participants