Closed MikeWilliams-UK closed 11 months ago
Might be related to https://github.com/serdarciplak/BlazorMonaco/issues/106
Similar belaviour is seen in Manaco Playground - Issue raised there. https://github.com/microsoft/monaco-editor/issues/4238
Many thanks @da-baranov, My issue is now fixed albeit with a slight tweak required for my app as shown below
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSignalR(e => {
e.MaximumReceiveMessageSize = 1024 * 1024 * 100;
});
I have added the NuGet package BlazorMonaco 3.1.0 to my Blazor App.
When I have short json string (17,426 characters) to render/edit all is ok When I have a long json string (1,731,504 characters) to render/edit I see the above several times.
When I edit the json the OnDidChangeModelContent event is triggered. Inside my code behind the line var val = await _editor.GetValue(); is causing an exception which I see in the Visual Studio Output Window
Exception thrown: 'System.Threading.Tasks.TaskCanceledException' in System.Private.CoreLib.dll