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

[Solved] Getting a reference to a RadEditor in a RadPageView

1 Answer 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Brian Kowald
Top achievements
Rank 1
Brian Kowald asked on 16 Sep 2009, 08:47 PM
Hi. How can I get a reference to a RadEditor in a

RadPageView? I tried

 

$find("<%=RadEditor1.ClientID%>"); but it returs null. Is it because its in a

 

RadPageView which is inside a RadMultiPage, which is inside a RadPane, which is inside a RadSplitter, etc?

I have a reference to the RadPageView that the RadEditor is in obtained with  multiPage.get_pageViews().getPageView(x)

Thanks,
Brian

 

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 18 Sep 2009, 11:05 AM
Hi Brian,

I suspect you might have added the line of code $find("<%=RadEditor1.ClientID%>"); at the wrong location.

That said, let me suggest you an alternative approach - and it is to use the editor's OnClientLoad event to assign a reference to some global variable which you can then easily access everywhere from your code, e.g.


<telerik:RadEditor OnClientLoad = "OnClientLoad" ..../>
<script>
var globalEditorRef = null;

function OnClientLoad(sender, args)
{
   globalEditorRef = sender;
}
</script>

Once the editor loads on the page, you will be able to reference it through the globalEditorRef variable.

Sincerely yours,
Tervel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Brian Kowald
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or