ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Server side

Obout.Ajax.UI.HTMLEditor.Popups.IPreview interface

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor.Popups" TagPrefix="obout" %>

All Browsers in the Obout.Ajax.UI.HTMLEditor.Popups namespace implement this interface (ImageBrowser, UrlBrowser, ...).

Using this interface you can create your own Preview class that allows to create previews for files with some extensions you want, see the Preview class.

Below are the methods that should be implemented.
namespace Obout.Ajax.UI.HTMLEditor.Popups
{
  /// <summary>
  /// Interface implements file preview ability
  /// </summary>
  public interface IPreview
  {
    /// <summary>
    /// Gets a control with the file preview
    /// </summary>
    /// <param name="page">Current page</param>
    /// <param name="url">Virtual path to the file to be previewed ('/Images/picture.gif')</param>
    /// <returns>Control with some preview information (thumbnail, width, height, description, .etc)</returns>
    Control OnFlyPreview(Page page, string url);
 
    /// <summary>
    /// Gets the width and height of the object to be available in client-side.
    /// </summary>
    /// <param name="path">Absolute path of the object's file.</param>
    /// <param name="url">Relative URL of the object's file.</param>
    /// <param name="width">Output 'width' parameter.</param>
    /// <param name="height">Output 'height' parameter.</param>
    /// <returns>Whether the 'width' and 'height' where formed for this object</returns>
    bool GetWidthHeight(string path, string url, out string width, out string height);
 
    /// <summary>
    /// Gets additional information about the object to be available in client-side.
    /// </summary>
    /// <param name="path">Absolute path of the object's file.</param>
    /// <param name="url">Relative URL of the object's file.</param>
    /// <param name="info">Output 'info' parameter.</param>
    /// <returns>Whether the 'info' parameter was formed</returns>
    bool GetInfo(string path, string url, out string info);
  }
}

"Thanks for the awesome support and incredible product!"

Andy Mason

Random testimonial   All testimonials