Remove hardcoded language ID
This commit is contained in:
parent
ee569ada7f
commit
3f2e13af74
@ -136,7 +136,7 @@ export const Mainframe = <RS extends {}>({ langName, provider }: Props<RS>) => {
|
||||
renderEditor={() => (
|
||||
<CodeEditor
|
||||
ref={codeEditorRef}
|
||||
languageId="brainfuck"
|
||||
languageId={langName}
|
||||
readOnly={execController.state === "processing"}
|
||||
defaultValue={providerRef.current.sampleProgram}
|
||||
tokensProvider={providerRef.current.editorTokensProvider}
|
||||
|
@ -98,7 +98,7 @@ const CodeEditorComponent = (props: Props, ref: React.Ref<CodeEditorRef>) => {
|
||||
return (
|
||||
<Editor
|
||||
theme={isDark ? "ep-dark" : "ep-light"}
|
||||
defaultLanguage="brainfuck"
|
||||
defaultLanguage={props.languageId}
|
||||
defaultValue={props.defaultValue}
|
||||
beforeMount={(monaco) => {
|
||||
monaco.editor.defineTheme("ep-dark", darkTheme as any);
|
||||
|
Loading…
x
Reference in New Issue
Block a user