Skip to content

How to apply styles to inner CodeMirror elements like ".cm-selectionBackground"? #202

Closed Answered by janriemer
janriemer asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I think I've found the answer thanks to AI search phind:
https://www.phind.com/search?cache=5d629319-43c5-4111-b8f5-498d9bdf0308

The gist is: You need to provide a custom theme and provide it as a :theme prop into the vue-codemirror component.
When you create a custom theme, you have access to the inner classes of codemirror. See an example for the oneDark theme here:
https://github.com/codemirror/theme-one-dark

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by janriemer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant