Ephox Home Page Ephox Home Page  
Search
Buy/Upgrade
 
 Developers
Developers Home
EditLive! for Java
EditLive! for Windows
System Requirements
Getting Started
Integration Samples
Articles
API Reference
EditLive! for XML
Discussion Forums

Using Images within EditLive!

Ephox, November 2001

Summary

EditLive! allows images to be inserted from the user's local machine, a remote server or anywhere on the Web.  The EditLive! ImageMode property is used to specify which locations images can be inserted from.  Image insertion can occur via FTP or HTTP.

More Information

EditLive! allows images to be inserted from three locations:

  • the end-user's local machine,
  • a specified remote server, or
  • dragged-and-dropped from a Web site.

To allow images to be inserted into EditLive!, you will need to set the EditLive! ImageMode property to an appropriate value within your EditLive! source code. By default, this property is set to None, meaning that images can not be inserted.

The ImageMode property allows the system administrator to specify which combination of these locations the end user may insert images from. For example, if the end user should only be able to insert images from the local machine, the system administrator would need to include the following line of code in the onload function of the EditLive! source pages.

editLive1.setImageMode('LocalOnly');

For more information on the ImageMode property and what parameters it can be assigned please see the ImageMode property page.

Image Insertion from the Local Machine

In order for images that have been inserted from a user's local machine to be visible to all users when the content is published, the images must be uploaded from the local machine to the remote server when the content within EditLive! is saved,.  This uploading is triggered by using EditLive!'s UploadImages method.  This method will upload any local images to the remote server via either FTP or HTTP, based on the EditLive! configuration within the application.  The UploadImages method should be called as the content is submitted before the Source or SourceAll property is used to retrieve the contents of EditLive!. 

function articleForm_onSubmit() 
{
   editLive1.UploadImages();
   document.articleForm.article_body.value = editLive1.getSource();
   document.articleForm.article_styleElementText.value = editLive1.getStyleElementText();
}

For more information on the UploadImages method please see its Reference Page.

Image Insertion via FTP

If inserting images from a remote server and uploading local images via FTP, it is important to ensure that the remote server properties are also set. These properties include:

  • FTPServer,
  • FTPUsername and
  • FTPPassword. Also, if you would like users to only be able to insert images from a specific directory, you may use the FTPInitialDirectory property to specify a directory on the remote server that the user will be restricted to for image insertion. For more information on all of these properties please see the EditLive! API reference guide. For more information on configuring the FTP settings within EditLive! please see the FTP Set-up and Troubleshooting article.

    Image Insertion via HTTP

    If using the HTTP Post method to insert images from a server and upload local images, please go to the article Using HTTP for Image Insertion and Upload in EditLive! for detailed information.

     

  •  

    Copyright © 1999-2005 Ephox Corporation. All Rights Reserved. 'Ephox' is a registered trademark of Ephox Corporation.
    Java and the Java Powered logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.