Trial Version 2.7.9
License
The license agreement is contained in License.htm.
Introduction
This control is designed specifically for ASP.NET AJAX.
Features
- Server control implements IScriptControl
- Client control extends Sys.UI.Control
- Self-contained with resources embedded in the assembly
- Configuration and Event properties exposed through Visual Studio
Getting Started
The zip file should be extracted to a new folder. The
files include all files necessary to:
- Demonstrate the HTML Editor for ASP.NET AJAX
- Install the HTML Editor for ASP.NET AJAX as part of an existing or new site
Note:
An ASP.NET 4.0 (Visual Studio 2010) configuration
is included.
System Requirements
- ASP.NET 4.0 must be installed
- Site must be ASP.NET AJAX enabled
Supported Browsers
- Internet Explorer 6+
- Firefox 1.5+
- Opera 9+
- Safari 3+
- Chrome 1+
Included Folders and Files
The zip file includes a folder for the ASP.NET 4.0 configuration. The configuration folder also contains
an appropriate solution file.
Bin Folder
- Winthusiasm.HtmlEditor.dll
Demo
- Demo.aspx
- Demo.aspx.cs
- Demo.full.aspx
- Demo.full.aspx.cs
Emotions Folder
ImageBrowser/Aspx Folder
- ImageUpload.aspx
- Web.config
ImageBrowser/Images Folder
- Example folder
- Example image file
Other
- License.htm
- Readme.htm
- ServerReference.chm
- Web.config
Running the Demo
- Double-click the solution file to open the solution in Visual Studio 2010.
- Set Demo.aspx as the Start Page
- Press F5
Site Installation
Required Steps
- Copy Winthusiasm.HtmlEditor.dll to the Bin folder
- Add a Register statement for the HtmlEditor to the top of the page
- Add a Custom Tag for the HtmlEditor to the page
Use Model
- Use the Text property to set the editor HTML
- Save the HTML when appropriate
- Use the Text property to get the "saved" HTML
Use Model Details: Saving the HTML when Appropriate
The editor's "client-side" Save
method instructs the editor to store the current HTML (converting to XHTML if appropriate)
and clears the modified flag. When
the editor property AutoSave is
set to true (the default), the
client-side Save method is called
automatically as part of the client-side ASP.NET validation process
before the form is submitted. All controls with a
CausesValidation property set to true
(the default) trigger the behavior.
If the AutoSave implementation
is not appropriate or sufficient, the client script to trigger the client-side
Save can be attached through the
optional SaveButtons property or
manually.
Use Model Details: Emotions
To include the Emotions button in the toolbar perform these additional steps:
- Copy the emotions images to a folder on the site
- Set the
EmotionsFolder property to that location (e.g. ~/Images/Emotions)
- Modify the
Emotions property if the images are not the default set
- Include the Emotions button in the
Toolbars property where appropriate
Use Model Details: Image Browser
To enable the Image Browser functionality perform these additional steps:
Required Steps
- Create a folder for ImageUpload.aspx (e.g. ImageBrowser/Aspx)
- Copy ImageUpload.aspx to that folder
- Create a dedicated folder for uploaded images (e.g. ImageBrowser/Images)
- Set the AspxDirectory property to the location of ImageUpload.aspx
- Set the ImagesDirectory property to the dedicated folder
Recommended Steps
- Copy the appropriate Web.config file to the ImageUpload.aspx folder
- Modify its maxRequestLength configuration property
- Set other Image Browser properties as appropriate
Web.config and maxRequestLength
The httpRuntime configuration property
maxRequestLength determines the
ASP.NET maximum size (in KB) of any page request, including uploaded file data.
Requests larger than this length throw an exception on the server in ASP.NET. The
Image Browser catches the
maxRequestLength exception in the ImageUpload.aspx
page error handler and reports the error in the Upload UI as:
"File is too large for the system to upload"
By placing a dedicated Web.config file in the ImageUpload.aspx folder, the site
can specify the maximum size of any upload, albeit including other page data. See
the example Web.config file in the ImageUpload.aspx folder.
Note that the
maxRequestLength limit should be set in addition to the
MaxUploadFileSizeInKB
Image Browser property. In most cases the
maxRequestLength configuration
property should be set just slightly higher than the
MaxUploadFileSizeInKB.