Add option to wrap text (#20)
This commit is contained in:
@@ -62,6 +62,7 @@ export interface EditorTextAreaProps {
|
||||
language: string;
|
||||
fontSize: number;
|
||||
readOnly: boolean;
|
||||
wordWrap: boolean;
|
||||
resetFunction: MutableRefObject<ResetFunction | null>;
|
||||
}
|
||||
|
||||
@@ -73,6 +74,7 @@ export default function EditorTextArea({
|
||||
language,
|
||||
fontSize,
|
||||
readOnly,
|
||||
wordWrap,
|
||||
resetFunction,
|
||||
}: EditorTextAreaProps) {
|
||||
const [editor, setEditor] = useState<editor.IStandaloneCodeEditor>();
|
||||
@@ -166,7 +168,7 @@ export default function EditorTextArea({
|
||||
fontFamily: 'JetBrains Mono',
|
||||
fontSize: fontSize,
|
||||
fontLigatures: true,
|
||||
wordWrap: 'on',
|
||||
wordWrap: wordWrap ? 'on' : 'off',
|
||||
renderLineHighlight: 'none',
|
||||
renderValidationDecorations: 'off',
|
||||
readOnly,
|
||||
|
||||
Reference in New Issue
Block a user