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

RadEditor events/methods onkeyup

2 Answers 198 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tom
Top achievements
Rank 1
Tom asked on 22 Aug 2014, 11:10 AM
“This event is fired before the initialization of the editor's content area. ” - i say no

If I wait until the page loads and then start typing in the text area nothing happens. I have to first press enter (or some other command like insert image or change text to bold) then the onkeyup gets triggered when i type. So why and how can I get round this problem?  I want the onkeyup event handler to start listening as soon as i can start editing the content - not after i have already typed out a paragraph. (note: i have tried OnClientLoad like the example shows and get same behavior)

My code:

function OnClientInit(editor, args) {
    editor.attachEventHandler("onkeyup", function (e) {   
        alert(“onkeyup”);  
    });
}

Thanks

***

Article: http://www.telerik.com/help/aspnet-ajax/editor-onclientinit.html

***

2 Answers, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 22 Aug 2014, 11:28 AM
In dotnetnuke i set the "Command Executing:" to OnClientInit. So this is why i am getting this behavior. However i do not know how to use the OnClientInit event in DotNetNuke. The following does not work:

<dnn:TextEditor ID="textEditor" OnClientInit="OnClientInit" runat="server" height="500" width="510" />
0
Marin Bratanov
Telerik team
answered on 26 Aug 2014, 11:52 AM

Hello Tom,

I advise that you use the OnClientLoad event: http://www.telerik.com/help/aspnet-ajax/editor-onclientload.html. This article also shows how to attach an event handler in the content area. I am attaching a sample and a short video that demonstrate the correct behavior.

As for DNN - we do not support this environment and the wrappers they have over our controls, so I advise that you reach out to their support team or forums for assistance with changed event handlers and property names.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or