Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

The Ephox Tiny EditLive! for Java ASP.NET Server Control has been designed to allow easy integration of the WYSIWYG HTML editing capabilities of EditLive! for Java into ASP.NET Web Forms. The EditLive! for Java ASP.NET Server Control has been designed to allow for seamless interaction between the ASP.NET architecture and the EditLive! for Java applet. Once the required files have been included in an ASP.NET Web project EditLive! for Java can be easily included in any of your ASP.NET Web Forms

Requirements

  • IIS 6.0 or 7.0 (for deployment)
  • .NET framework 3.0, 3.5 or 4.0
  • Visual Studio 2005 or later (for development)
  • EditLive! 8.1 or above.

Installing the EditLive!

...

ASP.NET Server Control

When using the EditLive! for Java ASP.NET Server Control, there are several steps that must be followed. The server control file, EditLiveJavaControl.dll, must be installed in the relevant project. In addition to this, the EditLive! for Java source files and libraries must be deployed on the same Web server as the relevant project. Finally, to provide IntelliSense (popup context menu) support for the EditLive! for Java Server Control in the HTML view of the Web Forms editor, an XML schema file must be placed in a specific directory.

Installing the EditLive!

...

Server Control with the Toolbox

The EditLive! for Java Server Control may be added to the Microsoft Visual Studio .NET Toolbox to allow developers to create an instance of the EditLive! for Java Server Control on a page via the drag-and-drop mechanism. To use the EditLive! for Java Server Control in this manner the following steps must be followed:

  1. In the Microsoft Visual Studio .NET IDE, select the Tools > Customize Toolbox... menu item.
  2. Select the .NET Framework Components tab of the Customize Toolbox dialog.
  3. Click Browse...
  4. Browse to the location of the EditLiveJavaControl.dll file. This file can be found in the EditLiveControl_INSTALL/webfolder/aspnet/servercontrol/ directory, where EditLiveControl_INSTALL represents the location you installed the control to.
  5. With the EditLiveJavaControl.dll file selected, click Open.
  6. Ensure that the EditLiveJava control is now available in the list of .NET Framework Components and that the box next to the name of the control is checked.
  7. Click OK.
  8. The EditLive! for Java Server Control should now be available as part of the Microsoft Visual Studio .NET Toolbox.

When using the EditLive! for Java Server Control via the Microsoft Visual Studio .NET Toolbox, the relevant reference will automatically be added to the project when the first instance of the EditLive! for Java Server Control is created.

Installing the EditLive!

...

Server Control as a Project Reference

If the EditLive! for Java Server Control cannot be made available through the use of the Microsoft Visual Studio .NET Toolbox, or you do not wish to make it available, through the use of the Microsoft Visual Studio .NET Toolbox then a reference to it can be added directly to the project. To use the EditLive! for Java Server Control in this manner the following steps must be followed:

  1. In the Microsoft Visual Studio .NET IDE, select the Project > Add Reference... menu item.
  2. Select the .NET tab of the Add Reference dialog.
  3. Click Browse...
  4. Browse to the location of the EditLiveJavaControl.dll file. This file can be found in the EditLiveControl_INSTALL/webfolder/aspnet/servercontrol/ directory, where EditLiveControl_INSTALL represents the location you installed the SDK to.
  5. With the EditLiveJavaControl.dll file selected, click Open.
  6. Ensure that the EditLiveJavaControl.dll file appears in the Selected Components list.
  7. Click OK.

The EditLive! for Java Server Control is now available to reference from the project. Instances of the control can now be created using the tag associated with it.

Installing the EditLive! for Java IntelliSense XML Schema

This is no longer required. ASP.NET 2.0 and later can infer this information from the metadata in the EditLiveJavaControl.dll file.

Other Files Required to Use EditLive!

...

in an ASP.NET Web Application

In addition to including the EditLiveJavaControl.dll file in your ASP.NET project, either through the ASP.NET Toolbox or a project reference, the EditLive! for Java source files and libraries must be present on the same Web server as the relevant project. It is recommended that, in order to ensure that these files are present on the same Web server as the relevant project, that they be added to the project itself. These files can be found within the redistributables/editlivejava directory and its subdirectories.

  • The redistributables/editlivejava directory contains the source files and libraries for use with EditLive! for Java. The files in this directory must be present on the Web server in order to instantiate EditLive! for Java. This directory must be available on the same Web server as the relevant project as relative links to it must be able to be created.

As the Microsoft Visual Studio .NET IDE does not allow directories and their contents to be recursively added to a project, the following method describes a way to easily add the EditLive! for Java source files and libraries to your .NET Web Project:

  1. Copy the redistributables directory and all its subdirectories, which contain the EditLive! for Java source files and libraries, to the relevant Web project directory so that the redistributables directory is a sub-directory within the Web project.
  2. Open the Solution Explorer window by selecting the View > Solution Explorer menu item.
  3. Once the Solution Explorer window is open select the Project > Show All Filesmenu item to reveal all the files within the Web project's directories.

    Note:
    Info

    If the Show All Files option is already selected before performing this step it may have to be unselected and then reselected.

    (INSERT IMAGE HERE)

    Image Added

  4. In the Solution Explorer, select the root directory for the EditLive! for Java source files and libraries which has have not yet been included in the project (files which are not included are represented as uncolored icons, as above). In the example above the relevant directory is the redistributables directory.
  5. With the relevant root directory selected (in the above example, the redistributables directory), select the Project > Include In Project menu item.
  6. The Solution Explorer window should now have colored representations of the EditLive! for Java source files and libraries. It should look similar to the following figure.
    (INSERT IMAGE HERE) Image Added

Constraints

...

Note

By default ASP.NET forms cannot post values containing HTML. In order to successfully post EditLive!'s content, you will need to ensure the page directive contains the validateRequest="false"

...

parameter.

...

The server side code behind view exposes the EditLive! content through properties on the control. It is possible to access content at any stage in the life cycle through these attributes. Updates to content will only be visible in the control when they are made before rendering the applet. This means that content updated in the Page_Load event will be correctly reflected, but changes made in the event handlers for form events will not be reflected in the client control. In order to update content on a form event, the JavaScript APIs for EditLive! will need to be used.

...

In ASP.NET 4.0, you also need to add the following to your web.config, in the <system.web> section:

<httpRuntime requestValidationMode="2.0" />