You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working from a Blazor server side project aspNetCore 3.0 latest preview
I just got started on this tech so please be gentle! The following works on an Index.cshtml page in the project:
Which renders a variable on the page as formatted html. included javascript also works fine in this html string (which is ultimately what my project needs to do - math equations with MathJAX work fine here).
But the exact same lines in an Index.razor page in the same project renders the text string rather than formatted html. But that is Ok, by moving to MarkupString in .razor page it works again:
But of course now an html string with javascript works but ignores javascript, Which I presume is related to the on-going divorce of Blazor/Razor from javascript and/or security concerns.
So a couple of quick questions about what Blazor will or won't do going into the future:
Can I expect in the future HtmlString with javascript to stop working even though it currently works in the first .cshtml example above?
What is/will be best practice for me to serve up dynamic legacy html files with embedded javascript? (in my case they are .htm files with MathJax javascript formatting of LaTex Math equations. And currently MathJax/javascript is the only non-browser specific way of displaying such equations given the failure to support html5 MathML directly. I do not really want to include them as static files in the Blazor project as they can be added to /modified going into the future.
The text was updated successfully, but these errors were encountered:
Working from a Blazor server side project aspNetCore 3.0 latest preview
I just got started on this tech so please be gentle! The following works on an Index.cshtml page in the project:
Which renders a variable on the page as formatted html. included javascript also works fine in this html string (which is ultimately what my project needs to do - math equations with MathJAX work fine here).
But the exact same lines in an Index.razor page in the same project renders the text string rather than formatted html. But that is Ok, by moving to MarkupString in .razor page it works again:
But of course now an html string with javascript works but ignores javascript, Which I presume is related to the on-going divorce of Blazor/Razor from javascript and/or security concerns.
So a couple of quick questions about what Blazor will or won't do going into the future:
The text was updated successfully, but these errors were encountered: