Examples | ASP.NET Developer's Guide

  1. Getting Started
  2. Applying Stylesheet
  3. Using Asset Manager Add-on
    1. Enabling the Asset Manager Add-on
    2. Localization
    3. Returning Absolute Path
  4. Advanced Settings
  5. Extending the Editor
  6. Toolbar
  7. Localization
  8. FAQ

III. Using Asset Manager Add-on

III.1. Enabling the Asset Manager Add-on

Included in the Editor is an Asset Manager add-on. Using the Asset Manager add-on, you can browse and manage your web assets (upload and delete files, create and delete folders). Asset Manager add-on is located in folder assetmanager. The main file is assetmanager.aspx. To enable the Asset Manager add-on:

  1. Copy the assetmanager folder anywhere in your web server.
  2. specify AssetManager property with the location of the assetmanager.aspx. Then, specify AssetManagerWidth and AssetManagerHeight properties with the dimension (width & height in pixels) of the dialog to open the Asset Manager page (assetmanager.aspx).

    <editor:wysiwygeditor
    Runat="server"
    scriptPath="scripts/"
    AssetManager="/assetmanager/assetmanager.aspx"
    AssetManagerWidth="570"
    AssetManagerHeight="510"
    Content="Hello World!"
    ID="oEdit1" />


    Important:
    Please use 'relative to root' path when specifying the location of the assetmanager.aspx. 'Relative to root' path always starts with "/".

  3. Specify your web assets location. Open assetmanager.aspx (in the assetmanager folder) using your text editor & set the sBase variable with the location of your web assets folder (please use "relative to root" path):

    Private sBase As String = "/assets"

    The above settings means that your web asset files are located in "http://yourserver/assets/"

    Important:
    Your web asset folder must have Write Permission.

If you enable the Asset Manager add-on, these dialogs will automatically show a Browse button :

The Browse button will open the Asset Manager add-on dialog so that you can select a file which can be inserted as hyperlink or object (image, flash, video, etc).

III.2. Localization

If required, you can localize the Asset Manager add-on to be displayed in specific language by setting the c variable in querystring:

<editor:wysiwygeditor
Runat="server"
scriptPath="scripts/"
AssetManager="/assetmanager/assetmanager.aspx?c=de-DE"
AssetManagerWidth="570"
AssetManagerHeight="510"
ID="oEdit1" />

The current available values c variable are: da-DK (Danish), nl-NL (Dutch), fi-FI (Finnish), fr-FR (French), de-DE (German), zh-CHS (Chinese Simplified), zh-CHT (Chinese Traditional), nn-NO (Norwegian), es-ES (Spanish), sv-SE (Swedish). If lang variable is not specified, English version will be displayed.

III.3. Returning Absolute Path

The Asset Manager dialog will return the selected file url in the form of 'relative to root' path, for example:

/assets/image.gif

If required, it can be changed to return absolute path by setting bReturnAbsolute variable in assetmanager.aspx to true:

Private bUseAbsoluteUrl As Boolean = True

This will make the Asset Manager dialog returns:

http://yourservername/assets/image.gif

Inserting images using absolute path usually is required if you use the Editor in web-based email applications.


© 2008, INNOVA STUDIO (www.innovastudio.com). All rights reserved.