Hello codemirror team,
When I press “Enter” key, I want to run insertNewLine
whereas right now it runs insertNewlineAndIndent
. Is something missing in the config for this?
I am using Codemirror 6 with following extensions -
this.view = new EditorView({
doc: this.props.value,
extensions: [
eventHandlers,
basicSetup,
language,
keymap.of([defaultKeymap, indentWithTab, {key: "Enter", run: insertNewline}]),
placeholder(this.props.control.additionalText),
this.handleUpdate(),
],
parent: this.editorRef.current
});