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

Html export error

1 Answer 25 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
deepak
Top achievements
Rank 1
deepak asked on 07 Apr 2012, 01:22 PM
hello all
1. When content with images is export to html, some of the images does not show up in ie7.
2. is there any option to export images as relative paths in html.

thanks
Deepak

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 11 Apr 2012, 11:29 AM
Hello Deepak,

Unfortunately your first issue is a known problem and there is no workaround you could use with IE 8 and IE 7. However, the problem does not appear if you use IE 9, Firefox or Chrome.

Regarding your second question, you can check what Iva answered in this forum thread. Using the sample command code for the insert picture button you will be sure that images will have uri source.
Then you should set these settings to the html format provider:
HtmlFormatProvider provider = DocumentFormatProvidersManager.GetProviderByExtension("html") as HtmlFormatProvider;
            HtmlExportSettings htmlExportSettings = new HtmlExportSettings();
            htmlExportSettings.ImageExportMode = ImageExportMode.UriSource;
            provider.ExportSettings = htmlExportSettings;

This is how you can export images as relative paths.

If you modify an image using the ImageEditorDialog, its UriSource will be set to null. This case is handled in the attached project by saving the images on in the Bin folder and setting the Src of the image to the filepath where the image is saved.

Regards,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
deepak
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or