Tooltip External HTML file

Hi,

does anybody have any experience with the tooltip in the radzen components?

I could use it with a simple STRING in my code and also the type documented here for https://blazor.radzen.com/tooltip for ShowTooltipWithHtml works.

But i want to be able to have a complete HTML file as a seperate file which should be shown as a tooltip. If i create a seperate file, it is showing all the HTML tags as string chars.

Is there any possibility to reference a external HTML file?

Regards
Bülent

Blazor does HTML encoding by default. You can check online how to display HTML in Blazor using the MarkupString class.

1 Like

Hi Korchev,

thanks for the quick Reply. MarkupStrings in C# was indeed the last test i also tried to solve my issue but in fact it is the place im stuck.

The TooltipService is not accepting any MarkupString.

I tried this for example:

@code {
MarkupString fileResult = new MarkupString(File.ReadAllText(@"Pages\Test\Test.html"));
}

Do you have me any example, how i can handover a MarkupString to the TooltipService?

I just checked and indeed the Radzen Tooltip currently does not support HTML content. We may add support for this in a future release.