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

[Solved] extending the radEditor

2 Answers 202 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Brecht
Top achievements
Rank 1
Brecht asked on 03 Dec 2007, 09:04 AM
Hi,

I wanted to extend the rad editor in 2 ways.

The first thing I wanted to do is change the way files are fetched and stored when using the Imagemanger. Doing this was relatively easy by writing my own FileBrowserContentProvider.

The second thing I wanted add was the possibility for users to select a page within the website in a popup, the result should be a propper URL to the page they selected. I tried to do this by following the tutorial here but i get stuck. I'm able to add the button to the toolbar but i can't get the dialog to show up.

I'm extending the rad Editor in a custom control:
    [ToolboxData("<{0}:cRadEditor runat=server></{0}:cRadEditor>")]
    public class cRadEditor : RadEditor

My problem is that i don't know where to add the code that you put in the page_load of the webpage (in point 4 of the tutorial).

Creating the .ascx dialog shouldn't be a problem.

Anyone having an idea how i should solve this problem?

2 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 05 Dec 2007, 04:08 PM
Hi Brecht,

For your convenience I made a small sample that shows how to achieve the desired behavior - please find it attached to this thread. 
 
Here is what I did:

First I have created my own class overriding Telerik.Web.UI.RadEditor. On PreRender I created the Dialogs,  Buttons,  CSS and  Script declarations. After the declarations are made and everything with the extended editor is done I registered the custom editor to the ASPX page with the following line:

<%
@ Register TagPrefix="custom" Assembly="App_Code" Namespace="CustomRadEditor" %>


I hope this helps.


Kind Regards,
George
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Brecht
Top achievements
Rank 1
answered on 10 Dec 2007, 03:03 PM
Works now,

Thanks for the support!
Tags
Editor
Asked by
Brecht
Top achievements
Rank 1
Answers by
George
Telerik team
Brecht
Top achievements
Rank 1
Share this question
or