|
Article relates to
|
RadEditor for ASP.NET AJAX
|
|
Created by
|
Dobromir Semenliev
|
HOW-TO:
Open a custom dialog from within LinkManager dialog in order to select an item to be linked.
DESCRIPTION:
In some scenarios the users might want to be able to select a file to be linked not using DocumentManager but using a custom pattern - for example an image from a custom gallery. This can be achieved by modifying the built-in LinkManager dialog to open a custom dialog window.
SOLUTION:
In order to modify the built-in Link Manager of RadEditor,
register the external dialogs. After that open the EditorDialogs/LinkManager.ascx file, locate the following code:
and modify it as follows:
The style="display:none" inline attribute will hide the existing button that opens DocumentManager and will insert a custom button that will open the custom dialog by executing the following javascript function
This Javascript function will open a custom dialog from CustomDialog.aspx file by executing the
openUrl() method of dialogOpener.
In the sample project attached to this article you will find a CustomDialog.aspx dialog containing RadFileExplorer used to navigate to a file that will be linked.