N
Nuxt2w ago
Luex

Monaco in Nuxt is always empty

I have a nuxt 3 application with the nuxt-monaco-editor module. The editor is displaying, but it is always empty. I already tried to hardcode the value prop of the editor with a given string. Despite it being empty on load, i am able to type text: My component:
<MonacoEditor v-model:value="localCode" :options="MONACO_EDITOR_OPTIONS" class="h-[500px]">
Loading...
</MonacoEditor>
<MonacoEditor v-model:value="localCode" :options="MONACO_EDITOR_OPTIONS" class="h-[500px]">
Loading...
</MonacoEditor>
No description
2 Replies
kapa.ai
kapa.ai2w ago
Hi @Luex. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, I don't have specific information about the nuxt-monaco-editor module or issues with Monaco Editor in Nuxt 3. The knowledge sources don't contain details about this particular module or common issues with it. From your description, it seems that the Monaco Editor is rendering but not displaying the initial value, even though you can type in it. This suggests there might be an issue with how the value binding is working. Since the knowledge sources don't provide specific information about this issue, I can offer some general troubleshooting suggestions: 1. Check if there are any console errors when the component loads 2. Verify that localCode is properly defined and reactive in your component 3. Try using a direct value instead of v-model to see if that works 4. Check the documentation for nuxt-monaco-editor to see if there are any specific requirements for initialization If you're using Nuxt 3, make sure you're using a version of the Monaco Editor module that's compatible with Nuxt 3, as some modules might still be designed for Nuxt 2. For more specific help, you might want to check the GitHub repository or documentation for the nuxt-monaco-editor module, or consider opening an issue there if you believe it's a bug with the module itself. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@691330584991236137> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?