New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Ability to preview PDF documents from the Document Manager
Environment
Product | RadEditor for ASP.NET AJAX |
Description
You can see below how to configure RadEditor's Document manager to enable the PDF File Preview on double click.
Solution
To achieve the double click preview feature, do the following:
- Register the external dialogs of RadEditor:
ASP.NET
<telerik:RadEditor ID="RadEditor1" runat="server" ExternalDialogsPath="~/EditorDialogs">
<DocumentManager ViewPaths="~/Docs" UploadPaths="~/Docs" />
</telerik:RadEditor>
- Copy the EditorDialogs folder from the installation and put it in the root of the application. See this demo for more information about registering the external dialogs: Customize Built-in Dialogs.
- Open the FileBrowser.ascx file, locate the RadFileExplorer declaration and set the EnableOpenFile property to true.
ASP.NET
<telerik:RadFileExplorer ID="RadFileExplorer1" Height="400px" Width="400px" TreePaneWidth="150px" runat="Server" EnableOpenFile="true" AllowPaging="true" PageSize="100" />
- To disable the file insertion on double click put this JS code under the RadFileExplorer declaration:
JavaScript
<script>
Telerik.Web.UI.Widgets.FileManager.prototype._browserDoubleClickHandler = function () { }
</script>