Hi all,
I’m new to CodeMirror (really enjoying it!) and I’m using codemirror-react "@uiw/react-codemirror": "^4.19.9"
.
I’m having difficulty doing two things:
- Unhighlight the current line
- Setting the height and enabling vertical scroll.
For current line unhighlight, I’ve tried the SO suggestion of this in my css and doesn’t resolve:
.CodeMirror-activeline-background {
background: transparent !important;
}
.CodeMirror-focused .CodeMirror-activeline-background {
background: rgba(100, 100, 100, 0.1) !important;
}
and I’ve tried to style the parent div containing the CodeMirror component so it adjusts to the height and that doesn’t work.
This is what my current .js looks like:
import CodeMirror from '@uiw/react-codemirror';
...
<CodeMirror
value={form.code_snippet}
extensions={[python({ jsx: true })]}
editable={false}
theme={material}
/>
Thanks!