serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
458 stars 98 forks source link

.NET 8 FluentUIBlazor (Server-side) #128

Closed stogoh closed 7 months ago

stogoh commented 7 months ago

I would like to use this module in combination with FluentUI Blazor on .NET 8. Unfortunately I cannot get the editor working. Others have had similar issues in the past which I was able to reproduce in .NET Core 3.1, but these fixes don't work for .NET 8.

Has anyone an idea what I am missing here?

App.razor <!DOCTYPE html>

```

**Home.razor**

@page "/" @using BlazorMonaco.Editor

Home

<StandaloneCodeEditor Id="editor" @ref="_editor" ConstructionOptions="EditorConstructionOptions" CssClass="editor-class" />

@code { private StandaloneCodeEditor _editor = null!;

private StandaloneEditorConstructionOptions EditorConstructionOptions(StandaloneCodeEditor editor)
{
    return new StandaloneEditorConstructionOptions
        {
            Language = "json",
            GlyphMargin = true,
            Value = string.Empty,
            Minimap = new EditorMinimapOptions
            {
                Enabled = false
            }
        };
}

}