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

Importing Content from a Microsoft Word Document

Ephox, April 2005

Summary

EditLive! includes greatly improves features for importing content from Microsoft Word.  

When content is pasted into EditLive! from Microsoft Word the end user or the developer have the following options:

  1. Plain Text - all HTML markup is removed from the content and only the text is pasted
  2. Clean HTML - the styles are removed from the content and the EditLive! document's existing or default styles are applied to the content.
  3. Styled HTML - the styles are preserved in the content and the Microsoft Word style definitions are imported into the EditLive! document.

Developers can specify how the content is to be imported or the user can be prompted to choose.

Please note: This EditLive! Word Import feature requires Microsoft Office 2000 or XP to be installed on the client machine.

More Information

EditLive! includes a new feature which allows users to dictate whether content pasted into EditLive! from a Word document maintains all of the formatting applied within Word.

The End-User Experience

When a user pastes in content from Microsoft Word, EditLive! will detect that the content is from Microsoft Word and will present the end user with the option of importing the content with or without the Microsoft Word style rules.

What the Options Mean for the Display of Content

If the end user selects "Styled HTML", the formatting of the content within EditLive! closely resembles the content from Microsoft Word. 

Alternatively, if the end user selects "Clean HTML", all style attributes and definitions will be removed from the Microsoft Word content. The block formatting options are preserved (e.g. H1, P) and the default cascading style sheet (CSS) rules in the EditLive! document are applied to the content.

What Actually Happens Within EditLive!

If the end user selects "Styled HTML", the Microsoft Word document's CSS rules are imported into the EditLive! document. The imported rules are placed in the STYLE element of the HEAD section of the document. Any CSS rules that have been previously defined in either a linked external style sheet or in the EditLive! document's STYLE element will not be imported.

Alternatively, if the end user selects "Clean HTML", all style attributes and definitions will be removed from the Microsoft Word content. The block formatting options are preserved (e.g. H1, P) and the default CSS rules in the EditLive! document are applied to the content.

Developer Options

If, as a developer, you do not want to give the end user the choice of whether the Word formatting is merged with the current document formatting or removed, you can set the WordImportOption property in the EditLive! page source code to force a particular option.

MERGE

When a user pastes content into EditLive! form Microsoft Word this will apply the behavior as if the user had chosen "Use Microsoft Word styles"   The user will not be prompted.

CLEAN

When a user pastes content into EditLive! form Microsoft Word this will apply the behavior as if the user had chosen "Remove Microsoft Word styles".  The user will not be prompted.

USER_PROMPT

This will ensure that the end user is presented with the dialog box. This is the default option which is automatically experienced if this property is not set within the EditLive! page source code.

Additional Properties

StyleElementText

The StyleElementText property allows the CSS rules in the EditLive! document to be returned as a string. This means that if an end user pastes content into EditLive! and the CSS rules for the formatting of this content are added to the STYLE element within EditLive!, this STYLE element can retrieved and stored separately in a database for later use with the EditLive! source.

Related Reading

LoadStyleSheet method

StyleElementText property

WordImportOption property

 

 

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.