Coder
January 15, 2021, 8:31pm
1
Line numbers in CodeMirror 6 are displaying incorrectly (look at the photo)
I do not add any style to CM6, my code:
import {EditorState, EditorView, basicSetup} from “@codemirror /basic-setup”;
state=EditorState.create({
extensions: basicSetup
});
editor = new EditorView({
parent: document.getElementById("editor"),
state: state
})
I don’t know why gutters are too small, is that a bug or I am doing something wrong?
marijn
January 16, 2021, 6:43pm
2
That is pretty much how the editor on the website is being created, so I’m not sure what is going wrong. Which browser is this and does it help you disable other stylesheets on the page?
Coder
January 16, 2021, 7:01pm
3
Disable my stylesheet helps. Now CM6 gutters are displaing correctly, but what I should to edit in stylesheet?
marijn
January 16, 2021, 9:17pm
4
I don’t know—I’d be curious to know too. You should be able to find out via the browser devtools.
Coder
January 16, 2021, 9:53pm
5
Problem solved, remove declaration:
body
{
overflow: hidden;
}
helped. Thank for help!