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

Insert image is incorrect

1 Answer 32 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Prathiba
Top achievements
Rank 1
Prathiba asked on 23 May 2013, 01:43 PM

We are using telerik(2012.3.1016.40) 

In our application we have a custom control which acts as a wrapper for telerik Rad editor.
In that editor we have the image manager button. On clicking "Image Manager" button it opens the Image manger dialog. We select a image from the list and try to insert. instead of inserting it in the editor, it is being inserted in web page outside the editor.Any help on rectifying this is very much appreciated.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 May 2013, 04:25 PM
Hello,

I have already responded in your other thread on the same issue and I suggest we keep the communication there to make it more concise and easy to follow. What I suspect is the problem is that wrong parameters are passed to the dialog and it does not have the correct context and data to work with. You can use the fire() method RadEditor offers to call a certain manager by registering the script from the code-behind, e.g.:
<telerik:RadEditor ID="RadEditor1" runat="server" ImageManager-ViewPaths="~/images">
</telerik:RadEditor>
<asp:Button ID="addImage" Text="add image" OnClick="addImage_Click" runat="server" />

function fireReManager()
{
    var editor = $find("RadEditor1");
    editor.fire("ImageManager");
    Sys.Application.remove_load(fireReManager);
}
protected void addImage_Click(object sender, EventArgs e)
{
    ScriptManager.RegisterStartupScript(Page, typeof(Page), "fireManagersScript", "Sys.Application.add_load(fireReManager);", true);
}


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Prathiba
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or