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

Get a Client Side Reference to MOSSRadEditor Instance

4 Answers 169 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Tyler
Top achievements
Rank 1
Tyler asked on 21 May 2009, 08:48 PM
I have several MOSSRadEdtior controls on a MOSS publishing page. How can I get a reference to each instance? Is there a global function that I can pass in the ClientID of the control? I saw a GetRadEditor() function in the client API, but it did not seem defined when I tried to call  it.

Thanks!

4 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 22 May 2009, 01:13 PM
Hi Tyler,

Could you please confirm us what version of RadEditor for MOSS are you using? Is it the light classic ASP.NET version or the full 5.x ASP.NET AJAX version of the control.

Thank you.


Kind regards,
Stanimir
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
Tyler
Top achievements
Rank 1
answered on 22 May 2009, 04:31 PM
Hi Stanmir -- it is the full 5.x version.
0
Tyler
Top achievements
Rank 1
answered on 22 May 2009, 04:33 PM
Basically, we have a couple of these controls on a MOSS publishing page. We need to do some custom validation before page check-in, and I need access to each control and the document object so we can examine the contents.
0
Stanimir
Telerik team
answered on 25 May 2009, 07:29 AM
Hi Tyler,

You can use the following code to get reference to all the RadEditors on the page.
if ($telerik && Telerik.Web.UI.RadEditor)    
{    
    var len = $telerik.radControls.length; 
    for (var i=0;i<len;i++)    
    {    
        var control = $telerik.radControls[i];    
        if (Telerik.Web.UI.RadEditor.isInstanceOfType(control))    
        {    
            alert(control);  
            // control is an instance of RadEditor 
        }    
    }    

I hope this helps.

Regards,
Stanimir
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
WebParts for SharePoint
Asked by
Tyler
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Tyler
Top achievements
Rank 1
Share this question
or