File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 99 injectKeyProps ,
1010} from ' ./types'
1111import EditorContainer from ' ./editor/EditorContainer.vue'
12+ import type * as monaco from ' monaco-editor-core'
1213
1314export interface Props {
1415 theme? : ' dark' | ' light'
@@ -37,6 +38,7 @@ export interface Props {
3738 }
3839 editorOptions? : {
3940 showErrorText? : string
41+ monacoOptions? : monaco .editor .IStandaloneEditorConstructionOptions
4042 }
4143}
4244
Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ const emit = defineEmits<{
3535const containerRef = ref <HTMLDivElement >()
3636const ready = ref (false )
3737const 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 )!
3944
4045initMonaco (store .value )
4146
@@ -67,6 +72,7 @@ onMounted(async () => {
6772 enabled: false ,
6873 },
6974 fixedOverflowWidgets: true ,
75+ ... editorOptions .value .monacoOptions ,
7076 })
7177 editor .value = editorInstance
7278
Original file line number Diff line number Diff line change @@ -67,6 +67,11 @@ const App = {
6767 } ,
6868 // showCompileOutput: false,
6969 // showImportMap: false
70+ editorOptions : {
71+ monacoOptions : {
72+ // wordWrap: 'on',
73+ } ,
74+ } ,
7075 } )
7176 } ,
7277}
You can’t perform that action at this time.
0 commit comments