Closed XStarlink closed 11 months ago
Adding automaticLayout: true
should fix this.
<MonacoEditor
ref="monacoEditor"
v-model="editor"
lang="typescript"
:options="{
theme: 'vs-dark',
+ automaticLayout: true,
lineNumbers: 'on',
roundedSelection: true,
scrollBeyondLastLine: false,
readOnly: false,
}"
:style="{
height: '100%',
width: '100%',
}"
/>
Adding
automaticLayout: true
should fix this.<MonacoEditor ref="monacoEditor" v-model="editor" lang="typescript" :options="{ theme: 'vs-dark', + automaticLayout: true, lineNumbers: 'on', roundedSelection: true, scrollBeyondLastLine: false, readOnly: false, }" :style="{ height: '100%', width: '100%', }" />
Thanks a lot for your answer, it works!
Maybe we can put it somewhere in the documentation, for future users who encounter the same problem?
Hello, thank you for this module!
I'm trying to use the editor but I have a problem, when the page loads the first time, the editor loads badly, it looks like there's an mounting problem in the dom.
But after making any modification in the code, the nuxt HMR reloads the view and now the editor appears.
I've made a reproduction here: https://stackblitz.com/edit/node-nxxysk?file=nuxt.config.ts,app.vue,components%2FAppTopbar.vue,components%2FAppSidebar.vue
Here's a screenshot of the problem
After any code modification, the editor loads