mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-22 20:42:40 +00:00
Allow adding multiple empty lines in editor. (#345)
This commit is contained in:
parent
6959929094
commit
798a0bfc28
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import {EditorView, gutter, keymap, lineNumbers} from "@codemirror/view";
|
||||
import {Compartment, EditorState, Facet, Line, SelectionRange} from "@codemirror/state";
|
||||
import {indentLess} from "@codemirror/commands";
|
||||
import {defaultKeymap, indentLess} from "@codemirror/commands";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
EditorView.theme({}, {dark: true});
|
||||
|
@ -27,7 +27,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
extensions: [
|
||||
lineNumbers(),
|
||||
gutter({class: "cm-mygutter"}),
|
||||
keymap.of([{key: "Tab", run: customIndentMore, shift: indentLess}]),
|
||||
keymap.of([
|
||||
{key: "Tab", run: customIndentMore, shift: indentLess},
|
||||
...defaultKeymap,
|
||||
]),
|
||||
indentSize.of(EditorState.tabSize.of(2)),
|
||||
wrapMode.of([]),
|
||||
indentType.of(txtFacet.of("space")),
|
||||
|
|
Loading…
Reference in a new issue