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

[Solved] SetHtm Javascript method in Firefox

5 Answers 149 Views
Editor
This is a migrated thread and some comments may be shown as answers.
emanuele
Top achievements
Rank 1
emanuele asked on 09 May 2008, 04:29 PM
Hi,
I'm Emanuele and I work for an Italian web-development company. I'm actually using your RadEditor tool in a .Net-based web application. It occurred an error, which seams to be a bug in the javascript API provided with tool: I'd like to use RadEditor in a new window and then, when I'm done, I want the generated html to be copied in the opener page, in a proper textarea. Viceversa, I also would like to transfer the self-scripted html code from the textarea to the  RadEditor, which is in  an other window. That's the problem: once I've loaded up the code from the textarea with "SetHtml" javascript method, it became uneditable, so I won't be able to modify/cancel any of previous-written code.
I must specify that this error occours only on Firefox, as the tool works right in IE7
(I wasn't able to test it in other browsers).
Is there a bug in the library or am I making any mistake?

Thanks


Emanuele

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 May 2008, 03:39 PM
Hi Emanuele,

Could you please tell us which version of RadEditor you use in your web application: RadEditor Classic (/bin/RadEditor.Net2.dll) or RadEditor for ASP.NET AJAX (/bin/Telerik.Web.UI.dll)?

Since I am not sure which version you are using and you have not sent an example, I decided to attach a sample example how to achieve your scenario with RadEditor Classic. Please, test it and let me know if it does not work as expected on your side.

If you still experience any problems, just open a support ticket and send a sample running project that demonstrates the problem. I will examine it and provide a solution.


All the best,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
emanuele
Top achievements
Rank 1
answered on 12 May 2008, 01:30 PM
Hi,
I'm actually using the library named "RadsEditor.Net2.dll". I've built a project based on the two aspx files you gave me, and it doesn't work well at all on Firefox. Nobody noticed this problem before?
0
Rumen
Telerik team
answered on 12 May 2008, 02:40 PM
Hi Emanuele,

To fix the Firefox problem you need to put "return false;" after the OpenEditor() function executed when the button s' onclick event is fired, e.g.

<button onclick="OpenEditor('ContentArea1');return false;">Click to edit</button>

<button onclick="OpenEditor('ContentArea2');return false;">Click to edit</button>

This should fix the problem.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
emanuele
Top achievements
Rank 1
answered on 15 May 2008, 10:33 AM
It actually doesn't work. In my opinion, there's a problem in focusing the writable-area in the text editor, as the trouble doesn't appear in code mode. Have you tried to create a project and test it?
0
Rumen
Telerik team
answered on 15 May 2008, 11:39 AM
Hi,

Yes, the provided code in my previous reply was tested in Firefox. For your convenience I have attached a video demonstrating my test as well as my sample project. You can see the video and test the project on your side. Does the example works properly at your end?


Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
emanuele
Top achievements
Rank 1
Answers by
Rumen
Telerik team
emanuele
Top achievements
Rank 1
Share this question
or