mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-06 21:21:32 +08:00
fix(code): reintroduce indent with tab
This commit is contained in:
parent
3e5e9096d2
commit
385809df84
@ -1,5 +1,5 @@
|
|||||||
import { defaultKeymap } from "@codemirror/commands";
|
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
|
||||||
import { EditorView, keymap, lineNumbers, ViewUpdate, type EditorViewConfig } from "@codemirror/view";
|
import { EditorView, keymap, lineNumbers, ViewUpdate, type EditorViewConfig, type KeyBinding } from "@codemirror/view";
|
||||||
|
|
||||||
type ContentChangedListener = () => void;
|
type ContentChangedListener = () => void;
|
||||||
|
|
||||||
@ -13,7 +13,10 @@ export default class CodeMirror extends EditorView {
|
|||||||
|
|
||||||
constructor(config: EditorConfig) {
|
constructor(config: EditorConfig) {
|
||||||
let extensions = [
|
let extensions = [
|
||||||
keymap.of(defaultKeymap),
|
keymap.of([
|
||||||
|
...defaultKeymap,
|
||||||
|
indentWithTab
|
||||||
|
]),
|
||||||
lineNumbers()
|
lineNumbers()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user