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
|