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

RichText, html, import export

1 Answer 109 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kyle Watson
Top achievements
Rank 1
Kyle Watson asked on 30 Jan 2011, 08:00 PM

Greetings,

First, I just upgraded my controls today to build v.2010.3.1314.1040 [Download] [Trial] and I am now recieving an error when tryin to import using the htmlformatprovider:

 

html =

 

@"<img alt="" src=""http://www.google.com/images/logos/ps_logo2.png"" height=""20"" width=""20"" />";

 

 

 

HtmlFormatProvider provider = new HtmlFormatProvider();

 

 

 

 

 

var doc = provider.Import(html); <--- Throwing object reference not set to an instance of an object.

Second. I really am trying my best to get our company to switch to silverlight with your UI suite. And, unfortunately I have been experiencing drawback after drawback. We are coming from a windows forms world but we're finding a lot of functionality is missing. For example, We do all of our confirmations and corresponance to our customers through html email for starters, and there is no good way to edit our html in a wysiwyg editor. I am trying to get the richtextbox editor to work for me, however it's not easy. I have to import the html, display it in another format, and export the html and hope that it rendors the same. On top of that, simple things like getting images to show up from url's doesn't work because supposedly there is a cross domain security policy. All the easy things that work now for us, do not work at all in silverlight. If you have any suggestions let me know. I am trying to my best to push your UI, but the little snags are giving management the no go.

 

1 Answer, 1 is accepted

Sort by
0
Ivailo Karamanolev
Telerik team
answered on 31 Jan 2011, 12:33 PM
Hello Kyle Watson,

Trying to load an image from an URL without cross-domain policy is impossible just using Silverlight\s WebClient. Gladly, the HtmlFormatProvider exposes an event, LoadImageFromUrl, through the ImportSettings property which will allow you to load necessary images yourself. This way, you can create a server-side WCF service to fetch images for you or any other way to load images without using the native Silverlight WebClient.

Greetings,
Ivailo
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
RichTextBox
Asked by
Kyle Watson
Top achievements
Rank 1
Answers by
Ivailo Karamanolev
Telerik team
Share this question
or