Hi I am using the RadRichTextBox as a html editor and using the following to format the html
HtmlFormatProvider htmlFormatProvider =
new
HtmlFormatProvider();
HtmlExportSettings settings =
new
HtmlExportSettings { ImageExportMode = ImageExportMode.ImageExportingEvent, DocumentExportLevel = DocumentExportLevel.Fragment, StylesExportMode = StylesExportMode.Inline };
settings.ImageExporting += (s, e) =>
{
e.Src = e.Image.UriSource.ToString();
e.Alt =
"image"
;
// TODO Prob can't put width and height in.....
};
htmlFormatProvider.ExportSettings = settings;
HtmlData.FormatProvider = htmlFormatProvider;
Where HtmlData is the HtmlDataProvider
When I add an image to the rich text box I do the following
ImageInline img =
new
ImageInline();
img.UriSource =
new
Uri(SelectedImage.Url, UriKind.Absolute);
img.Width = maxwidth;
richTextBox.InsertInline(img);
For large images I want to reset the width so they will display on the page. My question is is there a way to set the width and height of the image so that it gets set in the img tag so when I read the html the image is displayed at the set width.
I thought perhaps putting the image into a Span or Inline and setting the width of that might do the job but I can't see how to set the width of these (I thought it might be in the Style but can't find it...)
Hope this makes sense
Kind Regards
Tracey