Open 0x100001 opened 5 months ago
I have tested MudBlazor (6.16.0) together with BlazorMonaco (3.2.0) and it works:
A specific *.blazor
file:
<MudTabPanel Text="..." Icon="...">
<StandaloneCodeEditor ConstructionOptions="@this..." OnDidChangeModelContent="@this..." />
</MudTabPanel>
Imports:
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using MudBlazor
@using BlazorMonaco
@using BlazorMonaco.Editor
@using BlazorMonaco.Languages
App.razor
(I use the latest template of .NET 8):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<base href="/"/>
<link rel="stylesheet" href="app.css"/>
<link rel="icon" type="image/png" href="favicon.png"/>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<HeadOutlet/>
</head>
<body>
<Routes @rendermode="new InteractiveServerRenderMode(prerender: false)"/>
<script src="_content/BlazorMonaco/jsInterop.js"></script>
<script src="_content/BlazorMonaco/lib/monaco-editor/min/vs/loader.js"></script>
<script src="_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js"></script>
<script src="_framework/blazor.web.js"></script>
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="app.js"></script>
</body>
</html>
@SommerEngineering Thank you for your contribution. That's strange. I was using an older template & just updated MudBlazor. I double checked and it still doesn't work. I will look into it further when the time is right. Thank you!
Hey there,
I haven't been working with Blazor for that long. I currently use MudBlazor and am trying to integrate BlazorMonaco.
If I test the following code:
<StandaloneCodeEditor Id="my-editor-instance-id" />
The following error message appears:
I followed the guide. My _Layout.cshtml currently looks like this:
My Imports like this:
Is there possibly a problem with MudBlazor used in combination, or am I missing something simple? Help is really appreciated.