File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 9
9
injectKeyProps ,
10
10
} from ' ./types'
11
11
import EditorContainer from ' ./editor/EditorContainer.vue'
12
+ import type * as monaco from ' monaco-editor-core'
12
13
13
14
export interface Props {
14
15
theme? : ' dark' | ' light'
@@ -37,6 +38,7 @@ export interface Props {
37
38
}
38
39
editorOptions? : {
39
40
showErrorText? : string
41
+ monacoOptions? : monaco .editor .IStandaloneEditorConstructionOptions
40
42
}
41
43
}
42
44
Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ const emit = defineEmits<{
35
35
const containerRef = ref <HTMLDivElement >()
36
36
const ready = ref (false )
37
37
const editor = shallowRef <monaco .editor .IStandaloneCodeEditor >()
38
- const { store, autoSave, theme : replTheme } = inject (injectKeyProps )!
38
+ const {
39
+ store,
40
+ autoSave,
41
+ theme : replTheme,
42
+ editorOptions,
43
+ } = inject (injectKeyProps )!
39
44
40
45
initMonaco (store .value )
41
46
@@ -67,6 +72,7 @@ onMounted(async () => {
67
72
enabled: false ,
68
73
},
69
74
fixedOverflowWidgets: true ,
75
+ ... editorOptions .value .monacoOptions ,
70
76
})
71
77
editor .value = editorInstance
72
78
Original file line number Diff line number Diff line change @@ -67,6 +67,11 @@ const App = {
67
67
} ,
68
68
// showCompileOutput: false,
69
69
// showImportMap: false
70
+ editorOptions : {
71
+ monacoOptions : {
72
+ // wordWrap: 'on',
73
+ } ,
74
+ } ,
70
75
} )
71
76
} ,
72
77
}
You can’t perform that action at this time.
0 commit comments