This project is read-only.

HTML Editor progammatic creation

Feb 25, 2009 at 3: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>";




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?


Feb 25, 2009 at 4:18 PM

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

I just commit this update.

Feb 27, 2009 at 11:16 AM
Thanks for looking into this, I can confirm the fix works.
Jul 19, 2009 at 11: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