(chore): update codebase
This commit is contained in:
parent
fd15215f15
commit
4e8d46b20e
106 changed files with 29936 additions and 1023 deletions
|
|
@ -13,6 +13,7 @@ import {
|
|||
placeholder,
|
||||
ViewPlugin,
|
||||
type DecorationSet,
|
||||
type KeyBinding,
|
||||
type ViewUpdate,
|
||||
} from "@codemirror/view";
|
||||
import {
|
||||
|
|
@ -159,6 +160,12 @@ function createEditorExtensions(
|
|||
getInvertEnterBehavior: () => boolean,
|
||||
onSubmit: () => void,
|
||||
): Extension[] {
|
||||
const editorKeymap = [
|
||||
...defaultKeymap,
|
||||
...historyKeymap,
|
||||
indentWithTab,
|
||||
] as unknown as readonly KeyBinding[];
|
||||
|
||||
const customEnterKeymap = keymap.of([
|
||||
{
|
||||
key: "Shift-Enter",
|
||||
|
|
@ -187,7 +194,7 @@ function createEditorExtensions(
|
|||
return [
|
||||
history(),
|
||||
markdown(),
|
||||
keymap.of([...defaultKeymap, ...historyKeymap, indentWithTab]),
|
||||
keymap.of(editorKeymap),
|
||||
Prec.highest(customEnterKeymap),
|
||||
EditorView.lineWrapping,
|
||||
placeholder(getPlaceholder() ?? ""),
|
||||
|
|
|
|||
Loading…
Reference in a new issue