By default, all RadEditor dialogs are embedded as resource files in the Telerik.Web.UI.dll file, which makes their customization harder.In order to provide an easy way to modify the editor's dialogs, the Telerik UI for ASP.NET AJAX suite installation now comes with an extra folder named EditorDialogs which contains the dialogs' ascx files. You can configure RadEditor to use the external dialog files by copying the EditorDialogs folder to the root of the web application and setting the ExternalDialogsPath property to point to it, e.g.
The mentioned dialog files could be located in different folders depending on the chosen type of installation. If the manual installation is used,they could be found in the [Extracted_Directory]\EditorDialogs folder. If your choice is the MSI installation, then the dialogs should be located in the [Installation_Directory]\EditorDialogs folder.
In order to use the external dialogs of the control in a precompiled site scenario you have to manually copy the folder with the modified dialogs to the precompiled version of the site.
<telerik:RadEditor RenderMode="Lightweight" ID="RadEditor1" ExternalDialogsPath="~/EditorDialogs" runat="server"> <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" /> </telerik:RadEditor>
The example below demonstrates how to hide the "New Folder" button in all the dialogs containing FileExplorer. Here are the steps:
- Copy the EditorDialogs folder to the root of the web application.
- Set the ExternalDialogsPath property to point to the EditorDialogs folder
Open the FileBrowser.ascx file, which is in the EditorDialogs folder and locate the following control, which represent the FileExplorer:
<telerik:RadFileExplorer RenderMode="Lightweight" ID="RadFileExplorer1" Height="450px" Width="400px" TreePaneWidth="150px" runat="Server" EnableOpenFile="false" AllowPaging="true" />
To hide the "New Folder" button set the EnableCreateNewFolder property to false.
<telerik:RadFileExplorer RenderMode="Lightweight" ID="RadFileExplorer1" Height="450px" Width="400px" TreePaneWidth="150px" EnableCreateNewFolder="false" runat="Server" EnableOpenFile="false" AllowPaging="true" />
Save the file and test the editor.