serdarciplak / BlazorMonaco

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

Unable to editor.GetValue() with more than ~500 lines of code #118

Closed MMZAID01GitHub closed 6 months ago

MMZAID01GitHub commented 6 months ago

Hello, I'm using a ref to my editor to get the value and then copy it to the clipboard, but this seems to fail when there is more than 500-600 lines of code. I get a task cancelled exception on the GetValue() call image

async void CopyToClipboard() { var scriptToCopy = await _editor.GetValue(); await ClipboardService.CopyToClipboard(scriptToCopy); var msg = new NotificationMessage { Summary = "Copied!", Detail = "Copied AOR script to clipboard", Severity = NotificationSeverity.Info, Duration = 4000 }; notificationService.Notify(msg); }

Has anyone else experienced this or know of a way around this? Thank you

MMZAID01GitHub commented 6 months ago

This turns out was a duplicate of #109 , adding:

 builder.Services.AddSignalR(e => {
    e.MaximumReceiveMessageSize = 1024 * 1024 * 100;
});

worked!