When I am trying to integrate the verion6 into my code, it’s hard to integrate for me. The document I cannot understand well. No sample code available for reference.
I spent about afternoon trying to understand the doc CodeMirror System Guide, State and Updates make me confused. I still don’t know how to replace all text to another piece of text.(the document shows update({changes: {from: 0, insert: ''})
)
For example:
I take an hour to integrate the below code:
let editorState = EditorState.create({
doc: "",
});
let editorView = new EditorView({
state: editorState,
parent: editorContainer,
});
But I don’t know how to finish the next steps. For example, If I want to enable line number, the document gives me these:
### Gutters
Functionality for showing "gutters" (for line numbers or other purposes) on the side of the editor. See also the [gutter example](https://codemirror.net/examples/gutter/).
`lineNumbers(config?: Object = {}) → Extension`
Create a line number gutter extension..........
I don’t know how to use the gutter. it doesn’t show the belong module and no example code.