New to Telerik UI for ASP.NET AJAX? Download 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.

Document Manager PDF Preview

Solution

To achieve the double click preview feature, do the following:

  • Register the external dialogs of RadEditor:
<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.

2) Open the FileBrowser.ascx file, locate the RadFileExplorer declaration and set the EnableOpenFile property to true.

<telerik:RadFileExplorer ID="RadFileExplorer1" Height="400px" Width="400px" TreePaneWidth="150px" runat="Server" EnableOpenFile="true" AllowPaging="true" PageSize="100" />

3) To disable the file insertion on double click put this JS code under the RadFileExplorer declaration:

<script>
Telerik.Web.UI.Widgets.FileManager.prototype._browserDoubleClickHandler = function () { }
</script>
In this article
Not finding the help you need? Improve this article