This is a migrated thread and some comments may be shown as answers.

Empty UriSource

1 Answer 96 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bjorn
Top achievements
Rank 1
Bjorn asked on 25 Jun 2011, 05:40 PM

Hi,

 

When I want to export the contents of my richtextbox to html I have the following problem:

 

When I insert a picture in the document and set the Html export settings to
ImageExportMode.UriSource and I watch in the string that is returned I don’t see a <img> tag.

When I set the properties so he has to go trough a eventhandler, I see that the
UriSource property is empty.

Code :

public string ExportToHtml(RadDocument document)

{

       HtmlFormatProvider provider = new HtmlFormatProvider();

       HtmlExportSettings settings = new HtmlExportSettings();

       settings.ImageExporting += new EventHandler<ImageExportingEventArgs>(settings_ImageExporting);

       settings.ImageExportMode = ImageExportMode.ImageExportingEvent;

       provider.ExportSettings = settings;

return provider.Export(document);

}

void settings_ImageExporting(object sender, ImageExportingEventArgs e)

{

        e.Src = e.Image.UriSource.AbsoluteUri;

}

Kind regards,

Bjorn

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 30 Jun 2011, 09:08 AM
Hello Bjorn,
We did not manage to reproduce the problem. I am sending you attached working project to verify at your side. If this doesn't help, you could open a support ticket and send us attached sample project that reproduces the problem.

Don't hesitate to contact us if you have other questions.

All the best,
Boby
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Bjorn
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or