Get a Client Side Reference to MOSSRadEditor Instance

5 posts, 0 answers
  1. Tyler
    Tyler avatar
    1 posts
    Member since:
    May 2009

    Posted 21 May 2009 Link to this post

    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!
  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 22 May 2009 Link to this post

    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.

  3. Tyler
    Tyler avatar
    2 posts
    Member since:
    Aug 2008

    Posted 22 May 2009 Link to this post

    Hi Stanmir -- it is the full 5.x version.
  4. Tyler
    Tyler avatar
    2 posts
    Member since:
    Aug 2008

    Posted 22 May 2009 Link to this post

    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.
  5. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 25 May 2009 Link to this post

    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.
Back to Top