This element configures the manner in which Tiny EditLive! reacts when a user attempts to paste HTML into the editor. This includes HTML copied from external webpages or from EditLive! itself.

This does not apply for HTML documents imported from Microsoft Word. For configuration settings for importing text from Microsoft Word please see the <wordImport> configuration element.

Configuration Element Tree Structure

<editLive>
<htmlImport>

<editLive>
     ...
     <htmlImport ... />
     ...
</editLive>

Optional Attributes

styleOption

This attribute specifies the user prompting and behaviour of EditLive! upon detecting imported content. This attribute has five possible values:

  • user_prompt - Users will be prompted as to whether they wish to import the styles from their imported text 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.
  • merge_embedded_styles - This setting will result in EditLive! importing styles from the selected content with the styles stored in the <head> of the document and class attributes will be applied where relevant.
  • merge_inline_styles - This setting will result in EditLive! importing styles from the selected content with style information applied inline in place of class attributes.
  • clean - The clean setting will result in EditLive! stripping the styles from the imported text. Only structural HTML elements will be imported, such as <b>, <p>, etc.
  • plain_text - The plain_text setting will strip out all style information from the imported text.

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

cleanOption

This boolean value specifies whether the Clean HTML option will appear in the Paste Special... dialog.

Default value: true

mergeInlineStylesOption

This boolean value specifies whether the Styled HTML (Inline) option will appear in the Paste Special... dialog.

Default value: true

mergeEmbeddedStylesOption

This boolean value specifies whether the Styled HTML (Embedded) option will appear in the Paste Special... dialog.

Default value: true

plainTextOption

This boolean value specifies whether the Plain Text option will appear in the Paste Special... dialog.

Default value: true

Example

The following example demonstrates how to set EditLive! to prompt the user with style import options every time a HTML content import is detected.

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

Remarks

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

If the <htmlImport> 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:

<htmlImport styleOption=.../>