We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello! Love the component and especially the highlight feature. However, when using the highlight prop, text becomes not selectable.
Works fine with the normal component:
However, I cannot select any text when highlighting a line:
Would be amazing to see a fix for this.
The text was updated successfully, but these errors were encountered:
It seems the css attribute user-select is set to none in this particular use-case, causing the unexpected behavior.
user-select
none
If you are looking for a quick patch, you can wrap the CodeBlock element in a div with a custom class, ex: code-block, and add this CSS to your page:
CodeBlock
div
code-block
.code-block span[style] { user-select: auto !important; }
Ideally somebody should submit a pull request for this, since passing codeBlockStyle={{ userSelect: 'auto' }} does not work.
codeBlockStyle={{ userSelect: 'auto' }}
Sorry, something went wrong.
No branches or pull requests
Hello! Love the component and especially the highlight feature. However, when using the highlight prop, text becomes not selectable.
Works fine with the normal component:
However, I cannot select any text when highlighting a line:
Would be amazing to see a fix for this.
The text was updated successfully, but these errors were encountered: