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

WordImportOption Property

When EditLive! content is pasted into EditLive! from MS Word, this property sets whether the cascading style sheet (CSS) rules which dictate the formatting of the content are included with the other styles defined within EditLive! or disregarded to allow a standard formatting to be applied to the contents.

Applies To

EditLive Object

Syntax

JavaScript object.setWordImportOption( sStyleOption );

Possible Values

sStyleOption Required.  String that specifies what occurs to the CSS rules when pasting content from MS Word.
 
sStyleOption Values
Description
"USER_PROMPT" User is prompted to decide whether to keep or remove CSS rules of MS Word content.  This is the default value.
"MERGE" Automatically imports the CSS rules of the MS Word content into EditLive!.  If no STYLE elements are currently defined, a STYLE element is added to the HEAD section. Otherwise, these rules are added to the first already existing STYLE element of the HEAD section.
"CLEAN" Automatically removes the CSS style rules from the content before pasting into EditLive! leaving only the block formatting elements (e.g. H1).

 This property is write only.

Examples

JavaScript

The following example would ensure that the MS Word CSS rules were imported into EditLive!.

function EditLive1_onload() {
    editLive1.setEditLiveMode('HTMLString');
    editLive1.setWebRoot('http://www.yourhost.com/');
    editLive1.setImageMode('LocalOnly');
    editLive1.setWordImportOption('MERGE');
}

The following example would prompt users for an option.

function window_onload() {
    editLive1.setEditLiveMode('HTMLString');
    editLive1.setWebRoot('http://www.ephox.com');
    editLive1.setImageMode('LocalOnly');
    editLive1.setWordImportOption('USER_PROMPT');
}

Remarks

If this property is not set, the end user will be prompted when pasting content from Microsoft Word as to whether the formatting should be kept or removed.

Minimum Version

EditLive! 2.0 or greater.

See Also

 

 

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.