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

Update RadEditor From Javascript

1 Answer 75 Views
Editor
This is a migrated thread and some comments may be shown as answers.
sweta
Top achievements
Rank 1
sweta asked on 19 Oct 2010, 01:05 PM

Hello,

I'm using RadEditor in my user control. my user control is rendered in a place holder control of Parent page dynamically.
i have one default.aspx page. from that one child rad window is opening called template list. from that template list i'm opening my send email radwinow. Send email winodow contains radeditor in user control. From Send Email window i'm opening i'm opening 3rd Child Radwindow for some more body text.
i mean i already have content in my radeditor and i want to append more content from 3rd child window.
i'm following the instructions of the thread to refresh the parent window.
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

i have written below function in my 2nd window.

function

 

refreshEditorTest(arg)

 

{
//Append user controls radeditor content with arg

 var editor = GetRadEditor("<%=RadEditor1.ClientID%>");  
        var content = editor.GetHtml();  
editor.SetHtml = Content + "<br/>" + arg;

}


but i'm getting editor object as null.

can you help me how can i update the content of radeditor of user control from parent window.

please suggest some solution.

Thanks
Sweta


1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 22 Oct 2010, 03:35 PM
Hi Sweta,

Could you please clarify which version of RadControls are used in the application? Also, could you please provide the code of the GetRadEditor() function so we can investigate it further?

If the RadWindow containing RadEditor is opening an external page, and the refreshEditorTest() function is not on that page you will not be able to access RadEditor1.ClientID.

On a side note, if you are using RadControls for ASP.NET AJAX there is no GetHtml() and SetHtml() methods of RadEditor. You can find detailed information about the client-side API of RadEditor for ASP.NET AJAX in the following help article:
Getting familiar with Client-Side API

All the best,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
sweta
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or