Good to know if it goes down we all go down
I had tried OnAfterAsync as well. I pasted my code below. Maybe I have something wrong. when the first Render is called and I try the underline and it uses the css
<span style="text-decoration: underline;">Enter Text Here</span>
Then on Second Render it works properly (after I also clear out the previous html)
<u>Enter Text Here</u>
I'm guessing what is happening is the code below is running before the html editor renders.
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if(firstRender)
{
await JsRuntime.InvokeVoidAsync("Clearcss");
Console.WriteLine("Does not work on first loop");
}
else
{
await JsRuntime.InvokeVoidAsync("Clearcss");
Console.WriteLine("Works on second loop");
}
}