mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-30 21:05:12 +08:00
feat: add auto line wrap for code input
This commit is contained in:
parent
4550058a90
commit
28bf3b1179
@ -6,7 +6,7 @@ import { powerShell } from "@codemirror/legacy-modes/mode/powershell";
|
||||
import { shell } from "@codemirror/legacy-modes/mode/shell";
|
||||
import { basicSetup } from "@uiw/codemirror-extensions-basic-setup";
|
||||
import { vscodeDark, vscodeLight } from "@uiw/codemirror-theme-vscode";
|
||||
import CodeMirror, { type ReactCodeMirrorProps, type ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
||||
import CodeMirror, { EditorView, type ReactCodeMirrorProps, type ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
||||
import { useFocusWithin, useHover } from "ahooks";
|
||||
import { theme } from "antd";
|
||||
import DisabledContext from "antd/es/config-provider/DisabledContext";
|
||||
@ -47,6 +47,7 @@ const CodeInput = ({ className, style, disabled, language, readOnly, ...props }:
|
||||
allowMultipleSelections: false,
|
||||
indentOnInput: false,
|
||||
}),
|
||||
EditorView.lineWrapping,
|
||||
];
|
||||
|
||||
const langs = Array.isArray(language) ? language : [language];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user