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

Text Changed Client Side Event in RadEditor

4 Answers 467 Views
Editor
This is a migrated thread and some comments may be shown as answers.
VEDA VIDVA NARAYANAN SATTANATHAN
Top achievements
Rank 1
VEDA VIDVA NARAYANAN SATTANATHAN asked on 27 Jan 2009, 12:27 PM
Hi,
 I am  using rad editor as a custom control in which i want to know  the text changed event in the control. I want to get the value of the control (i.e Text typed in the radeditor). I want to get the changed value of the Radeditor. so by uisng the  Which client event shall i get the text of the value.
Please Help me in this process.

Thanks
Veda

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 Jan 2009, 03:27 PM
Hello VEDA,

I suggest to attach a handler for the keydown event of the content area as shown below:

 
        <script type="text/javascript">  
         
        function OnClientLoad(editor, args)     
        {                       
           editor.attachEventHandler("onkeydown", function(e)     
           {     
           setTimeout(function(){  
               alert("Content changed! Current content: " + $find("<%=RadEditor1.ClientID %>").get_text()); }, 0);    
           });     
        }     
        </script> 
 
        <telerik:radeditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad">  
        </telerik:radeditor> 

For your convenience I attached a sample demo page.


Sincerely yours,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
VEDA VIDVA NARAYANAN SATTANATHAN
Top achievements
Rank 1
answered on 30 Jan 2009, 03:32 PM
Hi
 Thanks for your Reply which satisfied part of my requirement. 
I have Created a custom control using Rad Editor(CustRADEditor) in which i have to do validation  based on the (CustRADEditor). If change any of the toolbar icon then the RadCustom control, i  need to fire a client event in which i have to validate the control. It tried using  OnClientCommandExecute method which doesnot work out. Can U just provide me the Event with the same sample in order to do my validation.
Please suggest me a Client  Event to validate  in the mouse click of the RADEditor.

 Thanks
Veda   
0
Rumen
Telerik team
answered on 02 Feb 2009, 04:22 PM
Hi Veda,

Please, see the following help articles on the subject:
attachEventHandler (see the $telerik.addExternalHandler(element, "click", function(e) code)
and
OnClientCommandExecuting and OnClientCommandExecuted.


All the best,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Krishnakanth
Top achievements
Rank 1
answered on 16 Feb 2009, 04:37 AM
Hi,
I am facing problem when using RAD Editor in Sharepoint pages. This control is removing spaces b/w my content because of this issue i ma loosing the styles of the content. can any one help me in this issue.

Thanks & Regards,
Krishnakanth.E
Tags
Editor
Asked by
VEDA VIDVA NARAYANAN SATTANATHAN
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
VEDA VIDVA NARAYANAN SATTANATHAN
Top achievements
Rank 1
Rumen
Telerik team
Krishnakanth
Top achievements
Rank 1
Share this question
or