Adding a local image file not working

Hi everybody,

  I am working on a local help system using the RichTextEditor control. The app using this help system is a  .net9 winforms app displaying the help files in razor components in a blazor web view control. This is working fine except displaying images.

How can I embed an image file into an html or md file without using web notation.

htmlString { get; set; } = @"<p>Here is an image: <img src='j:\\pics\\hlp_3.png' alt='hlp_3.png' width='104' height='142' /></p>";

does not seem to do the trick. 

Displaying the md file with the embedded image file in the same directory in vs code using

![alt text](hlp_3.png)

works as expected. RichTextEditor fails unfortunately.

  Maybe you can give me some advice on how to embed local image files into html or md files.

      regards

          Uwe


2 Replies

UH Uwe Hein December 18, 2024 01:40 PM UTC

Found out by myself ....

In my situation the root dir for my razor pages is:

WinDesk/wwwroot 

The wwwroot dir of my desktop app holding the index.html file for the Blazor app. 

   Sorry for the confusion

       regards

         Uwe



KP Kokila Poovendran Syncfusion Team December 20, 2024 04:42 AM UTC

Hi Uwe Hein,

We’re glad to hear that you were able to resolve the issue. Thank you for sharing your findings regarding the root directory setup for your Razor pages.

If you have any further questions or need assistance in the future, please don’t hesitate to reach out to us. We’re here to help!


Regards,

Kokila Poovendran.


Loader.
Up arrow icon