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

[Solved] The Editor control does not work properly inside the Silverlight HtmlPlaceHolder on IE7...

3 Answers 79 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 13 Aug 2009, 07:23 PM

I have a silverlight project that uses a Telerik HTMLPlaceHolder control to host a Telerik ASP.NET Ajax Editor.

I am able to successfully bridge between the silverlight app to client side javascript.  This makes it possible for me to control the Editor from my Silverlight app and make calls from javascript back to my silverlight app.  All this seems to work in IE and Firefox.

But...in IE7 I get a couple of problems that I am hoping you can help me with:

1.  When I launch my silverlight application, if I click inside the AJAX RadEditor control, it seems to steal the focus and I cannot get focus back to the controls on the hosting silverlight application.  This works in IE 8 and Firefox but not in IE7.

2. When I attempt drop down any of the comboboxes in the Rad Editor (for instance the font selector) the dropdown does not appear.  Again, this works fine in IE8 and Firefox.

3. In javascript, when I call: this.editor.fire("ToggleScreenMode");  I get the following error:
Sys.ArgumentOutOfRangeException: Value must be an integer.

 

Parameter name: x

Actual value was NaN

This again, only happens in IE7 and works in IE8 and Firefox.

 

All three of the above problems only happen in IE7 when I host the AJAX RadEditor control inside your HTMLPlaceHolder control. 

Please help !!!

Thanks,
Ed McPadden

P.S. I have a test app that I can send to you that clearly shows the problem.  Let me know if you want me to send it to you.

I also posted this on the Telerik Silverlight HTMLPlaceHolder control forum since the problem involves that control as well.

[SOME ADDITIONAL INFO that I just added to this post]...
I just tried setting the RespectSilverlightLayoutMeasure="True" to  the HtmlPlaceHolder control and now in IE7 I get the following result:

  • It still fails on the call to ToggleScreenMode
  • Now it throws the following exception when I dropdown the font selections dropdown:

Line: 2810
Error: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: x
Actual value was NaN.

It looks like this occurs in the javascript that comes down with the Ajax RadEditor control (i think)

But ... it no longer steals focus.  With this property set to true, I am able to go back and forth between the controls in the silverlight app and the Ajax Rad Editor control ... unless, of course, I try the font or size drop down :(


3 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 14 Aug 2009, 06:54 AM
Hi Ed,

Please open a formal support ticket and send us the sample app. This way we will be able to quickly track down the JavaScript errors and fix them in the editor code. By the way, is there a reason why you are using the ASP.NET AJAX editor in HTMLPlaceHolder control and not the native Silverlight RadEditor control (http://demos.telerik.com/silverlight/#Editor/FirstLook)? Perhaps there are some tools that you wish to use that are only present in the ASP.NET AJAX version?

All the best,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ed
Top achievements
Rank 1
answered on 14 Aug 2009, 04:54 PM
Hi Lini,

Thanks for getting back to me so quickly!

I would really rather use the silverlight html editor but when I mentioned using this control to the project manager, they were very concerned that there would be small inconsistencies between how the silverlight editor control would render the html versus how the hosting browser would render that html.

The silverlight application I am working on allows the user to create html content that will later be sent out to others thru email so they want to make sure that the html the silverlight control creates looks the same in the silverlight app as it does in the end product ... small inconsistencies could be a big problem for our users.

Does this control use the underlying hosting browser to render the HTML in the preview mode? 

Anything you can tell me to sell this approach would be greatly appreciated :)

I think I created a support ticket (in fact I tried twice) but i don't see it when I look in "My Account | Support Tickets" ... could you see if they actually got my support ticket?  If not ... I will try again ... its not clear on the web site that the ticket actually got posted.

...Ed 

 

0
Valentin.Stoychev
Telerik team
answered on 17 Aug 2009, 07:33 AM
Hello Ed,

In fact the Silverlight editor is using the browser engine to edit the page. Then the produced html is displayed using an HtmlPlaceholder, which is also using the browser engine to render the html.

You can see a working example of this scenario here:
http://demos.telerik.com/silverlight/#Editor/FirstLook

Please let us know if you have any other questions.

Greetings,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Ed
Top achievements
Rank 1
Answers by
Lini
Telerik team
Ed
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or