HTML Editor progammatic creation

Feb 25, 2009 at 2:21 PM
I am trying to use the HTMLEditor as part of a port of a WinForm content management system to Silverlight. Based on the data field types I create an editor control on the fly with appropriate HTML, DateTime, Numeric etc UI controls.

If I use the following construction the HTMLEditor is added OK, and the editor works fine. However, the initial HTML text is show shown

var control = new SLExtensions.Controls.HtmlEditor();
control.Text = "<h1>Some html text</h1>";
grid.Children.Add(control);

 

 

 

In the debugger I can see that the problem is the text cannot be set as the _iframeInitialized is false.

So my question is, is there a way to set the text value when the HTMlEditor control is created programmatically. Do I have to wait for some event to fire to let me know the control is ready? or does the control not suport this usage?

Thanks

Developer
Feb 25, 2009 at 3:18 PM
Hi,

I have updated the HtmlEditor control. Now it's OK.

I just commit this update.

Regards
Feb 27, 2009 at 10:16 AM
Thanks for looking into this, I can confirm the fix works.
Jul 19, 2009 at 10:45 AM

How can I set _iframeInitialized to true ?

I've added a HtmlEditor to my Page and tried to set .Text to any value...

But he won't show it :x