<wordImport> Configuration Element

This element configures the manner in which Ephox EditLive! for XML reacts when text is imported from Microsoft Word.

Configuration Element Tree Structure

<editLive>
     ...
     <wordImport ... />
     ...
</editLive>

Optional Attributes

styleOption

This attribute specifies the user prompting and behaviour of EditLive! for XML upon detecting an import from Microsoft Word. This attribute has five possible values; user_prompt, merge_embedded_styles, merge_inline_styles, clean and plain_text.

  • The user_prompt setting will result in EditLive! for XML prompting the user as to whether they wish to import Microsoft Word styles as inline or embedded styles or strip them from the imported text. The dialog used to prompt the user is the same as the Paste Special dialog.

  • The clean setting will result in EditLive! for XML stripping the Microsoft Word Styles from the imported text and only structural HTML elements will be imported, this includes <b>, <p> etc.

  • The merge setting will result in the Microsoft Word styles being merged with the current style information within EditLive! for XML.

    Important

    The merge setting has been deprecated.

  • The merge_embedded_styles setting will result in EditLive! for XML importing styles from Microsoft Word with the styles stored in the <head> of the document and class attributes will be applied where relevant.

  • The merge_inline_styles setting will result in EditLive! for XML importing styles from Microsoft Word with style information applied inline inplace of class attributes.

  • The plain_text setting will strip out all style information from the imported text.

Note

Styles imported from Microsoft Word will not overwrite styles which already exist within the document.

Note

For EditLive! for XML this should always be set to clean or merge_inline_styles.

Example

The following example demonstrates how to set EditLive! for XML to prompt the user with style import options every time a Microsoft Word import is detected.

<editLive>
     ...
     <wordImport styleOption="user_prompt" />
     ...
</editLive> 

Remarks

The <wordImport> element can appear only once within the <editLive> element.

If the <wordImport> element is to be left blank the element must then be a complete tag, it cannot contain a tag body. Therefore the tag must be closed in the same line. It should appear as below:

<wordImport styleOption=.../>