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

RadEditor Problem

1 Answer 88 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sandip
Top achievements
Rank 1
Sandip asked on 05 Jan 2009, 12:15 PM

Hi,

 

I am currently using Telerik  RadControls version 5.5.2.0.

 

I am working on Asp.Net 2.0 framework and preparing a simple listing based application.

 

While using the control telerik:RadEditor, I am facing some of the following difficulties:

 

1.            I can’t handle the control to javascript function.  It is not possible to catch the keypress event of the control.

2.            Changed text of the control is not traceable.  Control.value property always shows load time value and not the current text.

can anyone please suggest me some solution for the above problem?

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 08 Jan 2009, 09:45 AM
Hello Sandip,

I believe you were already provided with an answer from us through the Telerik support pipeline, but for your convenience I will also paste it here:

======================================================

Here is how to detect a keypress on the client-side with RadEditor Classic:

<script> 
function OnClientLoad(editor) 
    editor.AttachEventHandler("onkeypress", function(e) 
    { 
        alert("Pressed key was " + e.keyCode); 
    }); 
</script> 
    <radE:RadEditor  
    OnClientLoad="OnClientLoad" ..../>

As far as your second question - we are not sure what the problem is. The common case, however, when developers report reading an old value on the serverside is when the set the old value themselves. This commonly happens in the Page_Load event where the content is first set - there needs to be a check if (!this.IsPostBack)

If such a check does not exists, then the value is always reset - and if it is subsequently read in another even handler (such as a button click server handler) it shows and old value.

If the case is somewhat different than that, please let us know in more details and we will do our best to help. On a side note, I invite you to consider switching to the newer RadEditor for ASP.NET AJAX which is easier to use, loads much faster and offers extended capabilities compared to RadEditor Classic. The RadEditor for ASP.NET AJAX can be found here:
http://demos.telerik.com/aspnet-ajax/Editor/Examples/Default/DefaultCS.aspx




Kind regards,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Sandip
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or